From f9b9659bc647c69f9e0b6f72c91b10bd3dc729c4 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Mon, 23 Mar 2020 17:04:09 +0100 Subject: [PATCH] Bugs, Recipes and Storage Blocks - Added Zinc and Brass Block - Added compat for mechanical Saw with BoP's logs - Fixed Crafters and Mixers not handling container items properly - Fixed Shafts not dropping when breaking a belt segment with pulley - Added missing loot table for copper blocks and shingles --- build.gradle | 2 +- .../java/com/simibubi/create/AllBlocks.java | 8 ++-- .../com/simibubi/create/AllSoundEvents.java | 7 ++-- src/main/java/com/simibubi/create/Create.java | 4 +- .../advancement/CriterionTriggerBase.java | 11 ++++-- .../advancement/SandpaperUseTrigger.java | 15 +++---- .../foundation/advancement/SimpleTrigger.java | 11 +++--- .../command/ToggleDebugCommand.java | 1 + .../foundation/item/ItemDescription.java | 30 ++++++++++---- .../foundation/utility/data/Generator.java | 7 ++-- .../utility/data/ICanGenerateJson.java | 4 +- .../foundation/world/AllWorldFeatures.java | 4 +- .../modules/contraptions/WrenchItem.java | 7 ++-- .../base/DirectionalAxisKineticBlock.java | 2 +- .../base/GeneratingKineticTileEntity.java | 6 +-- .../modules/contraptions/base/IRotate.java | 2 +- .../contraptions/base/KineticTileEntity.java | 6 +-- .../components/clock/CuckooClockBlock.java | 2 +- .../contraptions/ContraptionRenderer.java | 2 +- .../contraptions/pulley/PulleyBlock.java | 2 +- .../crafter/MechanicalCrafterTileEntity.java | 17 +++++++- .../MechanicalCrafterTileEntityRenderer.java | 37 ++++++++++-------- .../components/flywheel/FlywheelRenderer.java | 2 +- .../processing/BasinOperatingTileEntity.java | 18 ++++----- .../redstone/AnalogLeverTileEntity.java | 4 +- .../contraptions/relays/belt/BeltBlock.java | 10 ++--- .../relays/elementary/CogWheelBlock.java | 2 +- .../relays/gauge/GaugeTileEntity.java | 10 ++--- .../relays/gauge/SpeedGaugeTileEntity.java | 4 +- .../relays/gauge/StressGaugeTileEntity.java | 5 ++- .../ChromaticCompoundCubeItem.java | 6 ++- .../blockzapper/BlockzapperItemRenderer.java | 2 +- .../TerrainzapperItemRenderer.java | 2 +- src/main/resources/META-INF/mods.toml | 2 +- .../create/blockstates/brass_block.json | 5 +++ .../assets/create/blockstates/zinc_block.json | 5 +++ .../resources/assets/create/lang/en_us.json | 4 +- .../create/models/block/brass_block.json | 6 +++ .../create/models/block/zinc_block.json | 6 +++ .../create/models/item/brass_block.json | 3 ++ .../assets/create/models/item/zinc_block.json | 3 ++ .../create/textures/block/zinc_block.png | Bin 0 -> 642 bytes .../loot_tables/blocks/brass_block.json | 19 +++++++++ .../loot_tables/blocks/copper_block.json | 19 +++++++++ .../loot_tables/blocks/copper_shingles.json | 19 +++++++++ .../create/loot_tables/blocks/zinc_block.json | 19 +++++++++ .../compat/bop/cutting/cherry_log.json | 21 ++++++++++ .../recipes/compat/bop/cutting/dead_log.json | 21 ++++++++++ .../compat/bop/cutting/ethereal_log.json | 21 ++++++++++ .../recipes/compat/bop/cutting/fir_log.json | 21 ++++++++++ .../compat/bop/cutting/hellbark_log.json | 21 ++++++++++ .../compat/bop/cutting/jacaranda_log.json | 21 ++++++++++ .../recipes/compat/bop/cutting/magic_log.json | 21 ++++++++++ .../compat/bop/cutting/mahogany_log.json | 21 ++++++++++ .../recipes/compat/bop/cutting/palm_log.json | 21 ++++++++++ .../compat/bop/cutting/redwood_log.json | 21 ++++++++++ .../bop/cutting/stripped_cherry_log.json | 21 ++++++++++ .../compat/bop/cutting/stripped_dead_log.json | 21 ++++++++++ .../bop/cutting/stripped_ethereal_log.json | 21 ++++++++++ .../compat/bop/cutting/stripped_fir_log.json | 21 ++++++++++ .../bop/cutting/stripped_hellbark_log.json | 21 ++++++++++ .../bop/cutting/stripped_jacaranda_log.json | 21 ++++++++++ .../bop/cutting/stripped_magic_log.json | 21 ++++++++++ .../bop/cutting/stripped_mahogany_log.json | 21 ++++++++++ .../compat/bop/cutting/stripped_palm_log.json | 21 ++++++++++ .../bop/cutting/stripped_redwood_log.json | 21 ++++++++++ .../bop/cutting/stripped_umbran_log.json | 21 ++++++++++ .../bop/cutting/stripped_willow_log.json | 21 ++++++++++ .../compat/bop/cutting/umbran_log.json | 21 ++++++++++ .../compat/bop/cutting/willow_log.json | 21 ++++++++++ .../materials/brass_block.json | 16 ++++++++ .../crafting_shaped/materials/zinc_block.json | 16 ++++++++ .../crafting_shapeless/brass_ingot.json | 12 ++++++ .../crafting_shapeless/zinc_ingot.json | 12 ++++++ .../forge/tags/blocks/storage_blocks.json | 4 +- .../tags/blocks/storage_blocks/brass.json | 6 +++ .../tags/blocks/storage_blocks/zinc.json | 6 +++ .../data/forge/tags/items/storage_blocks.json | 4 +- .../tags/items/storage_blocks/brass.json | 6 +++ .../forge/tags/items/storage_blocks/zinc.json | 6 +++ 80 files changed, 845 insertions(+), 109 deletions(-) create mode 100644 src/main/resources/assets/create/blockstates/brass_block.json create mode 100644 src/main/resources/assets/create/blockstates/zinc_block.json create mode 100644 src/main/resources/assets/create/models/block/brass_block.json create mode 100644 src/main/resources/assets/create/models/block/zinc_block.json create mode 100644 src/main/resources/assets/create/models/item/brass_block.json create mode 100644 src/main/resources/assets/create/models/item/zinc_block.json create mode 100644 src/main/resources/assets/create/textures/block/zinc_block.png create mode 100644 src/main/resources/data/create/loot_tables/blocks/brass_block.json create mode 100644 src/main/resources/data/create/loot_tables/blocks/copper_block.json create mode 100644 src/main/resources/data/create/loot_tables/blocks/copper_shingles.json create mode 100644 src/main/resources/data/create/loot_tables/blocks/zinc_block.json create mode 100644 src/main/resources/data/create/recipes/compat/bop/cutting/cherry_log.json create mode 100644 src/main/resources/data/create/recipes/compat/bop/cutting/dead_log.json create mode 100644 src/main/resources/data/create/recipes/compat/bop/cutting/ethereal_log.json create mode 100644 src/main/resources/data/create/recipes/compat/bop/cutting/fir_log.json create mode 100644 src/main/resources/data/create/recipes/compat/bop/cutting/hellbark_log.json create mode 100644 src/main/resources/data/create/recipes/compat/bop/cutting/jacaranda_log.json create mode 100644 src/main/resources/data/create/recipes/compat/bop/cutting/magic_log.json create mode 100644 src/main/resources/data/create/recipes/compat/bop/cutting/mahogany_log.json create mode 100644 src/main/resources/data/create/recipes/compat/bop/cutting/palm_log.json create mode 100644 src/main/resources/data/create/recipes/compat/bop/cutting/redwood_log.json create mode 100644 src/main/resources/data/create/recipes/compat/bop/cutting/stripped_cherry_log.json create mode 100644 src/main/resources/data/create/recipes/compat/bop/cutting/stripped_dead_log.json create mode 100644 src/main/resources/data/create/recipes/compat/bop/cutting/stripped_ethereal_log.json create mode 100644 src/main/resources/data/create/recipes/compat/bop/cutting/stripped_fir_log.json create mode 100644 src/main/resources/data/create/recipes/compat/bop/cutting/stripped_hellbark_log.json create mode 100644 src/main/resources/data/create/recipes/compat/bop/cutting/stripped_jacaranda_log.json create mode 100644 src/main/resources/data/create/recipes/compat/bop/cutting/stripped_magic_log.json create mode 100644 src/main/resources/data/create/recipes/compat/bop/cutting/stripped_mahogany_log.json create mode 100644 src/main/resources/data/create/recipes/compat/bop/cutting/stripped_palm_log.json create mode 100644 src/main/resources/data/create/recipes/compat/bop/cutting/stripped_redwood_log.json create mode 100644 src/main/resources/data/create/recipes/compat/bop/cutting/stripped_umbran_log.json create mode 100644 src/main/resources/data/create/recipes/compat/bop/cutting/stripped_willow_log.json create mode 100644 src/main/resources/data/create/recipes/compat/bop/cutting/umbran_log.json create mode 100644 src/main/resources/data/create/recipes/compat/bop/cutting/willow_log.json create mode 100644 src/main/resources/data/create/recipes/crafting_shaped/materials/brass_block.json create mode 100644 src/main/resources/data/create/recipes/crafting_shaped/materials/zinc_block.json create mode 100644 src/main/resources/data/create/recipes/crafting_shapeless/brass_ingot.json create mode 100644 src/main/resources/data/create/recipes/crafting_shapeless/zinc_ingot.json create mode 100644 src/main/resources/data/forge/tags/blocks/storage_blocks/brass.json create mode 100644 src/main/resources/data/forge/tags/blocks/storage_blocks/zinc.json create mode 100644 src/main/resources/data/forge/tags/items/storage_blocks/brass.json create mode 100644 src/main/resources/data/forge/tags/items/storage_blocks/zinc.json diff --git a/build.gradle b/build.gradle index 09f922378..171d7fc89 100644 --- a/build.gradle +++ b/build.gradle @@ -13,7 +13,7 @@ apply plugin: 'net.minecraftforge.gradle' apply plugin: 'eclipse' apply plugin: 'maven-publish' -version = 'mc1.14.4_v0.2.1' +version = 'mc1.14.4_v0.2.2' group = 'com.simibubi.create' archivesBaseName = 'create' diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index a4ab83f28..bdc476dce 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -169,7 +169,7 @@ public enum AllBlocks { FLYWHEEL(new FlywheelBlock()), FURNACE_ENGINE(new FurnaceEngineBlock()), ROTATION_SPEED_CONTROLLER(new SpeedControllerBlock()), - + __LOGISTICS__(), CONTACT(new ContactBlock()), REDSTONE_BRIDGE(new RedstoneLinkBlock()), @@ -280,8 +280,10 @@ public enum AllBlocks { __MATERIALS__(), COPPER_ORE(new OxidizingBlock(Properties.from(Blocks.IRON_ORE), 1)), ZINC_ORE(new Block(Properties.from(Blocks.GOLD_ORE).harvestLevel(2).harvestTool(ToolType.PICKAXE))), - COPPER_BLOCK(new OxidizingBlock(Properties.from(Blocks.IRON_BLOCK), 1/32f)), - COPPER_SHINGLES(new OxidizingBlock(Properties.from(Blocks.IRON_BLOCK), 1/32f)), + COPPER_BLOCK(new OxidizingBlock(Properties.from(Blocks.IRON_BLOCK), 1 / 32f)), + COPPER_SHINGLES(new OxidizingBlock(Properties.from(Blocks.IRON_BLOCK), 1 / 32f)), + ZINC_BLOCK(new Block(Properties.from(Blocks.IRON_BLOCK))), + BRASS_BLOCK(new Block(Properties.from(Blocks.IRON_BLOCK))), ; diff --git a/src/main/java/com/simibubi/create/AllSoundEvents.java b/src/main/java/com/simibubi/create/AllSoundEvents.java index 1d99eb2f5..3d0defc41 100644 --- a/src/main/java/com/simibubi/create/AllSoundEvents.java +++ b/src/main/java/com/simibubi/create/AllSoundEvents.java @@ -1,11 +1,15 @@ package com.simibubi.create; +import java.io.IOException; +import java.nio.file.Path; + import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonArray; import com.google.gson.JsonObject; import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.data.ICanGenerateJson; + import net.minecraft.data.DirectoryCache; import net.minecraft.data.IDataProvider; import net.minecraft.util.ResourceLocation; @@ -14,9 +18,6 @@ import net.minecraft.util.SoundEvents; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.registries.IForgeRegistry; -import java.io.IOException; -import java.nio.file.Path; - public enum AllSoundEvents implements ICanGenerateJson { CUCKOO_PIG("creeperclock"), diff --git a/src/main/java/com/simibubi/create/Create.java b/src/main/java/com/simibubi/create/Create.java index 5f2b2a1c1..45518f05a 100644 --- a/src/main/java/com/simibubi/create/Create.java +++ b/src/main/java/com/simibubi/create/Create.java @@ -1,11 +1,10 @@ package com.simibubi.create; -import com.simibubi.create.foundation.advancement.AllTriggers; -import net.minecraft.util.SoundEvent; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import com.simibubi.create.config.AllConfigs; +import com.simibubi.create.foundation.advancement.AllTriggers; import com.simibubi.create.foundation.command.CreateCommand; import com.simibubi.create.foundation.command.ServerLagger; import com.simibubi.create.foundation.world.AllWorldFeatures; @@ -22,6 +21,7 @@ import net.minecraft.item.ItemGroup; import net.minecraft.item.crafting.IRecipeSerializer; import net.minecraft.particles.ParticleType; import net.minecraft.tileentity.TileEntityType; +import net.minecraft.util.SoundEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.crafting.CraftingHelper; import net.minecraftforge.eventbus.api.IEventBus; diff --git a/src/main/java/com/simibubi/create/foundation/advancement/CriterionTriggerBase.java b/src/main/java/com/simibubi/create/foundation/advancement/CriterionTriggerBase.java index 9b8bf41d6..61fc561f6 100644 --- a/src/main/java/com/simibubi/create/foundation/advancement/CriterionTriggerBase.java +++ b/src/main/java/com/simibubi/create/foundation/advancement/CriterionTriggerBase.java @@ -1,16 +1,21 @@ package com.simibubi.create.foundation.advancement; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Supplier; + import com.google.common.collect.Maps; import com.simibubi.create.Create; + import net.minecraft.advancements.ICriterionTrigger; import net.minecraft.advancements.PlayerAdvancements; import net.minecraft.advancements.criterion.CriterionInstance; import net.minecraft.entity.player.ServerPlayerEntity; import net.minecraft.util.ResourceLocation; -import java.util.*; -import java.util.function.Supplier; - public abstract class CriterionTriggerBase implements ICriterionTrigger { public CriterionTriggerBase(String id) { diff --git a/src/main/java/com/simibubi/create/foundation/advancement/SandpaperUseTrigger.java b/src/main/java/com/simibubi/create/foundation/advancement/SandpaperUseTrigger.java index dcf3d0bc2..24b33c26e 100644 --- a/src/main/java/com/simibubi/create/foundation/advancement/SandpaperUseTrigger.java +++ b/src/main/java/com/simibubi/create/foundation/advancement/SandpaperUseTrigger.java @@ -1,16 +1,17 @@ package com.simibubi.create.foundation.advancement; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonObject; -import net.minecraft.advancements.criterion.ItemPredicate; -import net.minecraft.entity.player.ServerPlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; - import java.util.Arrays; import java.util.List; import java.util.function.Supplier; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonObject; + +import net.minecraft.advancements.criterion.ItemPredicate; +import net.minecraft.entity.player.ServerPlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; + public class SandpaperUseTrigger extends CriterionTriggerBase { public SandpaperUseTrigger(String id) { diff --git a/src/main/java/com/simibubi/create/foundation/advancement/SimpleTrigger.java b/src/main/java/com/simibubi/create/foundation/advancement/SimpleTrigger.java index c3ef01e1e..e9df1c110 100644 --- a/src/main/java/com/simibubi/create/foundation/advancement/SimpleTrigger.java +++ b/src/main/java/com/simibubi/create/foundation/advancement/SimpleTrigger.java @@ -1,13 +1,14 @@ package com.simibubi.create.foundation.advancement; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonObject; -import net.minecraft.entity.player.ServerPlayerEntity; -import net.minecraft.util.ResourceLocation; - import java.util.List; import java.util.function.Supplier; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonObject; + +import net.minecraft.entity.player.ServerPlayerEntity; +import net.minecraft.util.ResourceLocation; + public class SimpleTrigger extends CriterionTriggerBase { public SimpleTrigger(String id) { diff --git a/src/main/java/com/simibubi/create/foundation/command/ToggleDebugCommand.java b/src/main/java/com/simibubi/create/foundation/command/ToggleDebugCommand.java index b6003cae4..6f43e2dd7 100644 --- a/src/main/java/com/simibubi/create/foundation/command/ToggleDebugCommand.java +++ b/src/main/java/com/simibubi/create/foundation/command/ToggleDebugCommand.java @@ -4,6 +4,7 @@ import com.mojang.brigadier.arguments.BoolArgumentType; import com.mojang.brigadier.builder.ArgumentBuilder; import com.simibubi.create.AllPackets; import com.simibubi.create.config.AllConfigs; + import net.minecraft.command.CommandSource; import net.minecraft.command.Commands; import net.minecraft.entity.player.ServerPlayerEntity; diff --git a/src/main/java/com/simibubi/create/foundation/item/ItemDescription.java b/src/main/java/com/simibubi/create/foundation/item/ItemDescription.java index 554fd3a21..f77b975f4 100644 --- a/src/main/java/com/simibubi/create/foundation/item/ItemDescription.java +++ b/src/main/java/com/simibubi/create/foundation/item/ItemDescription.java @@ -1,5 +1,26 @@ package com.simibubi.create.foundation.item; +import static com.simibubi.create.foundation.item.TooltipHelper.cutString; +import static net.minecraft.util.text.TextFormatting.AQUA; +import static net.minecraft.util.text.TextFormatting.BLUE; +import static net.minecraft.util.text.TextFormatting.DARK_GRAY; +import static net.minecraft.util.text.TextFormatting.DARK_GREEN; +import static net.minecraft.util.text.TextFormatting.DARK_PURPLE; +import static net.minecraft.util.text.TextFormatting.DARK_RED; +import static net.minecraft.util.text.TextFormatting.GOLD; +import static net.minecraft.util.text.TextFormatting.GRAY; +import static net.minecraft.util.text.TextFormatting.GREEN; +import static net.minecraft.util.text.TextFormatting.LIGHT_PURPLE; +import static net.minecraft.util.text.TextFormatting.RED; +import static net.minecraft.util.text.TextFormatting.STRIKETHROUGH; +import static net.minecraft.util.text.TextFormatting.WHITE; +import static net.minecraft.util.text.TextFormatting.YELLOW; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; + import com.simibubi.create.AllItems; import com.simibubi.create.config.AllConfigs; import com.simibubi.create.config.CKinetics; @@ -11,6 +32,7 @@ import com.simibubi.create.modules.contraptions.components.fan.EncasedFanBlock; import com.simibubi.create.modules.contraptions.components.flywheel.engine.EngineBlock; import com.simibubi.create.modules.contraptions.components.flywheel.engine.FurnaceEngineBlock; import com.simibubi.create.modules.contraptions.components.waterwheel.WaterWheelBlock; + import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.screen.Screen; @@ -21,14 +43,6 @@ import net.minecraft.util.text.StringTextComponent; import net.minecraft.util.text.TextFormatting; import net.minecraftforge.common.ForgeConfigSpec.ConfigValue; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Map; - -import static com.simibubi.create.foundation.item.TooltipHelper.cutString; -import static net.minecraft.util.text.TextFormatting.*; - public class ItemDescription { public static final ItemDescription MISSING = new ItemDescription(null); diff --git a/src/main/java/com/simibubi/create/foundation/utility/data/Generator.java b/src/main/java/com/simibubi/create/foundation/utility/data/Generator.java index 401efaa82..7411a85c7 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/data/Generator.java +++ b/src/main/java/com/simibubi/create/foundation/utility/data/Generator.java @@ -1,12 +1,13 @@ package com.simibubi.create.foundation.utility.data; -import com.simibubi.create.AllSoundEvents; -import net.minecraft.data.DirectoryCache; - import java.io.IOException; import java.nio.file.Path; import java.nio.file.Paths; +import com.simibubi.create.AllSoundEvents; + +import net.minecraft.data.DirectoryCache; + public class Generator { /* diff --git a/src/main/java/com/simibubi/create/foundation/utility/data/ICanGenerateJson.java b/src/main/java/com/simibubi/create/foundation/utility/data/ICanGenerateJson.java index 730ed0865..1caf2acb5 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/data/ICanGenerateJson.java +++ b/src/main/java/com/simibubi/create/foundation/utility/data/ICanGenerateJson.java @@ -1,9 +1,9 @@ package com.simibubi.create.foundation.utility.data; -import net.minecraft.data.DirectoryCache; - import java.nio.file.Path; +import net.minecraft.data.DirectoryCache; + public interface ICanGenerateJson { //path points to the resource1s base folder diff --git a/src/main/java/com/simibubi/create/foundation/world/AllWorldFeatures.java b/src/main/java/com/simibubi/create/foundation/world/AllWorldFeatures.java index 382100e5d..53240e1af 100644 --- a/src/main/java/com/simibubi/create/foundation/world/AllWorldFeatures.java +++ b/src/main/java/com/simibubi/create/foundation/world/AllWorldFeatures.java @@ -19,9 +19,9 @@ public enum AllWorldFeatures { COPPER_ORE_OCEAN( new CountedOreFeature(AllBlocks.COPPER_ORE.get(), 15, 4).between(20, 55).inBiomes(Biome.Category.OCEAN)), - ZINC_ORE(new CountedOreFeature(AllBlocks.ZINC_ORE.get(), 17, 1).between(55, 80)), + ZINC_ORE(new CountedOreFeature(AllBlocks.ZINC_ORE.get(), 8, 1).between(55, 80)), ZINC_ORE_DESERT( - new CountedOreFeature(AllBlocks.ZINC_ORE.get(), 17, 5).between(50, 85).inBiomes(Biome.Category.DESERT)), + new CountedOreFeature(AllBlocks.ZINC_ORE.get(), 10, 5).between(50, 85).inBiomes(Biome.Category.DESERT)), LIMESTONE(new ChanceOreFeature(AllBlocks.LIMESTONE.get(), 128, 1 / 32f).between(30, 70)), WEATHERED_LIMESTONE(new ChanceOreFeature(AllBlocks.WEATHERED_LIMESTONE.get(), 128, 1 / 32f).between(10, 30)), diff --git a/src/main/java/com/simibubi/create/modules/contraptions/WrenchItem.java b/src/main/java/com/simibubi/create/modules/contraptions/WrenchItem.java index a3b65a548..e2344c6df 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/WrenchItem.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/WrenchItem.java @@ -39,9 +39,10 @@ public class WrenchItem extends Item implements IHaveCustomItemModel { if (player.isSneaking()) { if (world instanceof ServerWorld) { if (!player.isCreative()) - Block.getDrops(state, (ServerWorld) world, pos, world.getTileEntity(pos)).forEach(itemStack -> { - player.inventory.placeItemBackInInventory(world, itemStack); - }); + Block.getDrops(state, (ServerWorld) world, pos, world.getTileEntity(pos), player, context.getItem()) + .forEach(itemStack -> { + player.inventory.placeItemBackInInventory(world, itemStack); + }); state.spawnAdditionalDrops(world, pos, ItemStack.EMPTY); world.destroyBlock(pos, false); } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/base/DirectionalAxisKineticBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/base/DirectionalAxisKineticBlock.java index 0478e52c6..2b7078e6e 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/base/DirectionalAxisKineticBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/base/DirectionalAxisKineticBlock.java @@ -8,8 +8,8 @@ import net.minecraft.state.BooleanProperty; import net.minecraft.state.StateContainer.Builder; import net.minecraft.util.ActionResultType; import net.minecraft.util.Direction; -import net.minecraft.util.Rotation; import net.minecraft.util.Direction.Axis; +import net.minecraft.util.Rotation; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IWorldReader; import net.minecraft.world.World; diff --git a/src/main/java/com/simibubi/create/modules/contraptions/base/GeneratingKineticTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/base/GeneratingKineticTileEntity.java index 504240e4b..a2e776018 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/base/GeneratingKineticTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/base/GeneratingKineticTileEntity.java @@ -1,16 +1,16 @@ package com.simibubi.create.modules.contraptions.base; +import java.util.List; + import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.modules.contraptions.KineticNetwork; import com.simibubi.create.modules.contraptions.base.IRotate.SpeedLevel; - import com.simibubi.create.modules.contraptions.goggle.IHaveGoggleInformation; + import net.minecraft.tileentity.TileEntityType; import net.minecraft.util.math.BlockPos; import net.minecraft.util.text.TextFormatting; -import java.util.List; - public abstract class GeneratingKineticTileEntity extends KineticTileEntity { public boolean reActivateSource; diff --git a/src/main/java/com/simibubi/create/modules/contraptions/base/IRotate.java b/src/main/java/com/simibubi/create/modules/contraptions/base/IRotate.java index d28a0408c..870a4a7d1 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/base/IRotate.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/base/IRotate.java @@ -4,8 +4,8 @@ import com.simibubi.create.config.AllConfigs; import com.simibubi.create.foundation.item.ItemDescription; import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.modules.contraptions.IWrenchable; - import com.simibubi.create.modules.contraptions.goggle.IHaveGoggleInformation; + import net.minecraft.block.BlockState; import net.minecraft.util.Direction; import net.minecraft.util.Direction.Axis; diff --git a/src/main/java/com/simibubi/create/modules/contraptions/base/KineticTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/base/KineticTileEntity.java index c38248877..73233dbb4 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/base/KineticTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/base/KineticTileEntity.java @@ -1,5 +1,7 @@ package com.simibubi.create.modules.contraptions.base; +import static net.minecraft.util.text.TextFormatting.GRAY; + import java.util.List; import java.util.Map; @@ -16,8 +18,8 @@ import com.simibubi.create.modules.contraptions.KineticNetwork; import com.simibubi.create.modules.contraptions.RotationPropagator; import com.simibubi.create.modules.contraptions.base.IRotate.SpeedLevel; import com.simibubi.create.modules.contraptions.base.IRotate.StressImpact; - import com.simibubi.create.modules.contraptions.goggle.IHaveGoggleInformation; + import net.minecraft.block.BlockState; import net.minecraft.client.resources.I18n; import net.minecraft.nbt.CompoundNBT; @@ -31,8 +33,6 @@ import net.minecraft.util.text.TextFormatting; import net.minecraft.world.World; import net.minecraftforge.common.ForgeConfigSpec.ConfigValue; -import static net.minecraft.util.text.TextFormatting.GRAY; - public abstract class KineticTileEntity extends SmartTileEntity implements ITickableTileEntity, IHaveGoggleInformation { public @Nullable Long network; diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/clock/CuckooClockBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/clock/CuckooClockBlock.java index 02cc18810..268d15faf 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/clock/CuckooClockBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/clock/CuckooClockBlock.java @@ -12,8 +12,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockRenderLayer; import net.minecraft.util.Direction; -import net.minecraft.util.NonNullList; import net.minecraft.util.Direction.Axis; +import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockReader; import net.minecraft.world.IWorldReader; diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ContraptionRenderer.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ContraptionRenderer.java index 63c2aba24..9a03e703d 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ContraptionRenderer.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ContraptionRenderer.java @@ -14,8 +14,8 @@ import com.simibubi.create.CreateClient; import com.simibubi.create.config.AllConfigs; import com.simibubi.create.foundation.utility.PlacementSimulationWorld; import com.simibubi.create.foundation.utility.SuperByteBuffer; -import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.foundation.utility.SuperByteBufferCache.Compartment; +import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.foundation.utility.WrappedWorld; import net.minecraft.block.BlockRenderType; diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/pulley/PulleyBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/pulley/PulleyBlock.java index b38eb6cb3..2f4e36170 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/pulley/PulleyBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/pulley/PulleyBlock.java @@ -14,8 +14,8 @@ import net.minecraft.state.EnumProperty; import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Direction; -import net.minecraft.util.Hand; import net.minecraft.util.Direction.Axis; +import net.minecraft.util.Hand; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.shapes.ISelectionContext; diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/crafter/MechanicalCrafterTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/components/crafter/MechanicalCrafterTileEntity.java index 7c84d666f..94af97494 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/crafter/MechanicalCrafterTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/crafter/MechanicalCrafterTileEntity.java @@ -2,6 +2,7 @@ package com.simibubi.create.modules.contraptions.components.crafter; import static com.simibubi.create.modules.contraptions.base.HorizontalKineticBlock.HORIZONTAL_FACING; +import java.util.ArrayList; import java.util.LinkedList; import java.util.List; @@ -207,7 +208,19 @@ public class MechanicalCrafterTileEntity extends KineticTileEntity { } ItemStack result = RecipeGridHandler.tryToApplyRecipe(world, groupedItems); if (result != null) { + + List containers = new ArrayList<>(); + groupedItems.grid.values().forEach(stack -> { + if (stack.hasContainerItem()) + containers.add(stack.getContainerItem().copy()); + }); + groupedItems = new GroupedItems(result); + containers.forEach(stack -> { + GroupedItems container = new GroupedItems(stack); + container.mergeOnto(groupedItems, Pointing.LEFT); + }); + phase = Phase.CRAFTING; countDown = 2000; sendData(); @@ -381,8 +394,8 @@ public class MechanicalCrafterTileEntity extends KineticTileEntity { return; if (world.isRemote) return; - List chain = RecipeGridHandler.getAllCraftersOfChainIf(this, - MechanicalCrafterTileEntity::craftingItemPresent); + List chain = + RecipeGridHandler.getAllCraftersOfChainIf(this, MechanicalCrafterTileEntity::craftingItemPresent); if (chain == null) return; chain.forEach(MechanicalCrafterTileEntity::begin); diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/crafter/MechanicalCrafterTileEntityRenderer.java b/src/main/java/com/simibubi/create/modules/contraptions/components/crafter/MechanicalCrafterTileEntityRenderer.java index 9ee6e450d..079d571cb 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/crafter/MechanicalCrafterTileEntityRenderer.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/crafter/MechanicalCrafterTileEntityRenderer.java @@ -32,8 +32,8 @@ import net.minecraft.util.math.Vec3d; @SuppressWarnings("deprecation") public class MechanicalCrafterTileEntityRenderer extends SafeTileEntityRenderer { - public static SpriteShiftEntry animatedTexture = SpriteShifter.get("block/crafter_thingies", - "block/crafter_thingies"); + public static SpriteShiftEntry animatedTexture = + SpriteShifter.get("block/crafter_thingies", "block/crafter_thingies"); @Override public void renderWithGL(MechanicalCrafterTileEntity te, double x, double y, double z, float partialTicks, @@ -44,8 +44,8 @@ public class MechanicalCrafterTileEntityRenderer extends SafeTileEntityRenderer< if (te.phase == Phase.EXPORTING) { Direction targetDirection = MechanicalCrafterBlock.getTargetDirection(te.getBlockState()); - float progress = MathHelper.clamp((1000 - te.countDown + te.getCountDownSpeed() * partialTicks) / 1000f, 0, - 1); + float progress = + MathHelper.clamp((1000 - te.countDown + te.getCountDownSpeed() * partialTicks) / 1000f, 0, 1); vec = vec.add(new Vec3d(targetDirection.getDirectionVec()).scale(progress * .75f)); } @@ -83,23 +83,25 @@ public class MechanicalCrafterTileEntityRenderer extends SafeTileEntityRenderer< if (te.phase == Phase.CRAFTING) { items = te.groupedItemsBeforeCraft; items.calcStats(); - float progress = MathHelper.clamp((2000 - te.countDown + te.getCountDownSpeed() * partialTicks) / 1000f, - 0, 1); + float progress = + MathHelper.clamp((2000 - te.countDown + te.getCountDownSpeed() * partialTicks) / 1000f, 0, 1); float earlyProgress = MathHelper.clamp(progress * 2, 0, 1); float lateProgress = MathHelper.clamp(progress * 2 - 1, 0, 1); -// GlStateManager.rotated(lateProgress * 360, 0, 0, 1); GlStateManager.scaled(1 - lateProgress, 1 - lateProgress, 1 - lateProgress); - - Vec3d centering = new Vec3d(-items.minX + (-items.width + 1) / 2f, - -items.minY + (-items.height + 1) / 2f, 0).scale(earlyProgress); + Vec3d centering = + new Vec3d(-items.minX + (-items.width + 1) / 2f, -items.minY + (-items.height + 1) / 2f, 0) + .scale(earlyProgress); GlStateManager.translated(centering.x * .5f, centering.y * .5f, 0); - distance += (-4 * (progress - .5f) * (progress - .5f) + 1) * .25f; } + boolean onlyRenderFirst = te.phase == Phase.INSERTING || te.phase == Phase.CRAFTING && te.countDown < 1000; final float spacing = distance; items.grid.forEach((pair, stack) -> { + if (onlyRenderFirst && (pair.getLeft().intValue() != 0 || pair.getRight().intValue() != 0)) + return; + GlStateManager.pushMatrix(); GlStateManager.translatef(pair.getKey() * spacing, pair.getValue() * spacing, 0); TessellatorHelper.fightZFighting(pair.hashCode() + te.getPos().hashCode()); @@ -111,8 +113,8 @@ public class MechanicalCrafterTileEntityRenderer extends SafeTileEntityRenderer< if (te.phase == Phase.CRAFTING) { items = te.groupedItems; - float progress = MathHelper.clamp((1000 - te.countDown + te.getCountDownSpeed() * partialTicks) / 1000f, - 0, 1); + float progress = + MathHelper.clamp((1000 - te.countDown + te.getCountDownSpeed() * partialTicks) / 1000f, 0, 1); float earlyProgress = MathHelper.clamp(progress * 2, 0, 1); float lateProgress = MathHelper.clamp(progress * 2 - 1, 0, 1); @@ -123,6 +125,8 @@ public class MechanicalCrafterTileEntityRenderer extends SafeTileEntityRenderer< GlStateManager.scaled(downScaling, downScaling, downScaling); items.grid.forEach((pair, stack) -> { + if (pair.getLeft().intValue() != 0 || pair.getRight().intValue() != 0) + return; Minecraft.getInstance().getItemRenderer().renderItem(stack, TransformType.FIXED); }); } @@ -153,8 +157,8 @@ public class MechanicalCrafterTileEntityRenderer extends SafeTileEntityRenderer< if (MechanicalCrafterBlock.isValidTarget(getWorld(), pos.offset(targetDirection), blockState)) { SuperByteBuffer beltBuffer = renderAndTransform(AllBlockPartials.MECHANICAL_CRAFTER_BELT, blockState, pos); - SuperByteBuffer beltFrameBuffer = renderAndTransform(AllBlockPartials.MECHANICAL_CRAFTER_BELT_FRAME, blockState, - pos); + SuperByteBuffer beltFrameBuffer = + renderAndTransform(AllBlockPartials.MECHANICAL_CRAFTER_BELT_FRAME, blockState, pos); if (te.phase == Phase.EXPORTING) { int textureIndex = (int) ((te.getCountDownSpeed() / 128f * AnimationTickHolder.ticks)); @@ -168,7 +172,8 @@ public class MechanicalCrafterTileEntityRenderer extends SafeTileEntityRenderer< beltFrameBuffer.translate(x, y, z).renderInto(buffer); } else { - SuperByteBuffer arrowBuffer = renderAndTransform(AllBlockPartials.MECHANICAL_CRAFTER_ARROW, blockState, pos); + SuperByteBuffer arrowBuffer = + renderAndTransform(AllBlockPartials.MECHANICAL_CRAFTER_ARROW, blockState, pos); arrowBuffer.translate(x, y, z).renderInto(buffer); } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/flywheel/FlywheelRenderer.java b/src/main/java/com/simibubi/create/modules/contraptions/components/flywheel/FlywheelRenderer.java index 52b060d9c..8e3d99501 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/flywheel/FlywheelRenderer.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/flywheel/FlywheelRenderer.java @@ -14,8 +14,8 @@ import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.util.Direction; import net.minecraft.util.Direction.Axis; import net.minecraft.util.Direction.AxisDirection; -import net.minecraft.util.math.MathHelper; import net.minecraft.util.Rotation; +import net.minecraft.util.math.MathHelper; public class FlywheelRenderer extends KineticTileEntityRenderer { diff --git a/src/main/java/com/simibubi/create/modules/contraptions/processing/BasinOperatingTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/processing/BasinOperatingTileEntity.java index e27841081..eaa5bb9e4 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/processing/BasinOperatingTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/processing/BasinOperatingTileEntity.java @@ -11,9 +11,7 @@ import com.simibubi.create.modules.contraptions.base.KineticTileEntity; import com.simibubi.create.modules.contraptions.processing.BasinTileEntity.BasinInventory; import net.minecraft.inventory.IInventory; -import net.minecraft.item.BucketItem; import net.minecraft.item.ItemStack; -import net.minecraft.item.Items; import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.Ingredient; import net.minecraft.tileentity.TileEntity; @@ -128,8 +126,8 @@ public abstract class BasinOperatingTileEntity extends KineticTileEntity { IItemHandlerModifiable inputs = inv.getInputHandler(); IItemHandlerModifiable outputs = inv.getOutputHandler(); List catalysts = new ArrayList<>(); + List containers = new ArrayList<>(); - int buckets = 0; NonNullList ingredients = lastRecipe.getIngredients(); Ingredients: for (int i = 0; i < ingredients.size(); i++) { Ingredient ingredient = ingredients.get(i); @@ -137,12 +135,11 @@ public abstract class BasinOperatingTileEntity extends KineticTileEntity { if (!ingredient.test(inputs.extractItem(slot, 1, true))) continue; ItemStack extracted = inputs.extractItem(slot, 1, false); - if (extracted.getItem() instanceof BucketItem) - buckets++; - - if ((lastRecipe instanceof ProcessingRecipe)) { - if (((ProcessingRecipe) lastRecipe).getRollableIngredients().get(i).remains()) - catalysts.add(extracted.copy()); + if ((lastRecipe instanceof ProcessingRecipe) + && ((ProcessingRecipe) lastRecipe).getRollableIngredients().get(i).remains()) { + catalysts.add(extracted.copy()); + } else if (extracted.hasContainerItem()) { + containers.add(extracted.getContainerItem().copy()); } continue Ingredients; } @@ -151,8 +148,7 @@ public abstract class BasinOperatingTileEntity extends KineticTileEntity { } ItemHandlerHelper.insertItemStacked(outputs, lastRecipe.getRecipeOutput().copy(), false); - if (buckets > 0) - ItemHandlerHelper.insertItemStacked(outputs, new ItemStack(Items.BUCKET, buckets), false); + containers.forEach(stack -> ItemHandlerHelper.insertItemStacked(outputs, stack, false)); catalysts.forEach(c -> ItemHandlerHelper.insertItemStacked(outputs, c, false)); // Continue mixing diff --git a/src/main/java/com/simibubi/create/modules/contraptions/redstone/AnalogLeverTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/redstone/AnalogLeverTileEntity.java index 79c4a2926..54ed17d28 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/redstone/AnalogLeverTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/redstone/AnalogLeverTileEntity.java @@ -6,12 +6,10 @@ import com.simibubi.create.AllTileEntities; import com.simibubi.create.foundation.behaviour.base.SmartTileEntity; import com.simibubi.create.foundation.behaviour.base.TileEntityBehaviour; import com.simibubi.create.foundation.gui.widgets.InterpolatedChasingValue; - import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.modules.contraptions.goggle.IHaveGoggleInformation; -import net.minecraft.block.BlockState; + import net.minecraft.nbt.CompoundNBT; -import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.MathHelper; public class AnalogLeverTileEntity extends SmartTileEntity implements IHaveGoggleInformation { diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltBlock.java index 619706039..58a46b42f 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltBlock.java @@ -55,6 +55,7 @@ import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.world.IBlockReader; import net.minecraft.world.IWorldReader; import net.minecraft.world.World; +import net.minecraft.world.storage.loot.LootParameter; import net.minecraft.world.storage.loot.LootParameters; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -101,11 +102,12 @@ public class BeltBlock extends HorizontalKineticBlock @SuppressWarnings("deprecation") @Override public List getDrops(BlockState state, net.minecraft.world.storage.loot.LootContext.Builder builder) { - List drops = new ArrayList<>(); - if (state.get(PART) == Part.START || builder.get(LootParameters.THIS_ENTITY) != null) - drops.addAll(super.getDrops(state, builder)); + List drops = super.getDrops(state, builder); if (state.get(CASING)) drops.addAll(AllBlocks.BRASS_CASING.getDefault().getDrops(builder)); + TileEntity tileEntity = builder.get(LootParameters.BLOCK_ENTITY); + if (tileEntity instanceof BeltTileEntity && ((BeltTileEntity) tileEntity).hasPulley()) + drops.addAll(AllBlocks.SHAFT.getDefault().getDrops(builder)); return drops; } @@ -114,8 +116,6 @@ public class BeltBlock extends HorizontalKineticBlock withTileEntityDo(worldIn, pos, te -> { if (worldIn.isRemote) return; - if (te.hasPulley()) - Block.spawnDrops(AllBlocks.SHAFT.get().getDefaultState(), worldIn, pos); if (te.isController()) { BeltInventory inv = te.getInventory(); for (TransportedItemStack s : inv.items) diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/elementary/CogWheelBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/elementary/CogWheelBlock.java index a748285c1..08f271c46 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/relays/elementary/CogWheelBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/elementary/CogWheelBlock.java @@ -14,8 +14,8 @@ import net.minecraft.item.BlockItemUseContext; import net.minecraft.item.ItemGroup; import net.minecraft.item.ItemStack; import net.minecraft.util.Direction; -import net.minecraft.util.NonNullList; import net.minecraft.util.Direction.Axis; +import net.minecraft.util.NonNullList; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.shapes.ISelectionContext; import net.minecraft.util.math.shapes.VoxelShape; diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/gauge/GaugeTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/gauge/GaugeTileEntity.java index aa54c501b..c29393f93 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/relays/gauge/GaugeTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/gauge/GaugeTileEntity.java @@ -1,15 +1,13 @@ package com.simibubi.create.modules.contraptions.relays.gauge; +import java.util.List; + import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.modules.contraptions.base.KineticTileEntity; - import com.simibubi.create.modules.contraptions.goggle.IHaveGoggleInformation; -import net.minecraft.block.BlockState; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntityType; -import java.util.List; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.tileentity.TileEntityType; public class GaugeTileEntity extends KineticTileEntity implements IHaveGoggleInformation { diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/gauge/SpeedGaugeTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/gauge/SpeedGaugeTileEntity.java index 5c7ff0ae4..a13d9077d 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/relays/gauge/SpeedGaugeTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/gauge/SpeedGaugeTileEntity.java @@ -1,5 +1,7 @@ package com.simibubi.create.modules.contraptions.relays.gauge; +import java.util.List; + import com.simibubi.create.AllTileEntities; import com.simibubi.create.config.AllConfigs; import com.simibubi.create.foundation.advancement.AllTriggers; @@ -11,8 +13,6 @@ import com.simibubi.create.modules.contraptions.base.IRotate.SpeedLevel; import net.minecraft.util.math.MathHelper; import net.minecraft.util.text.TextFormatting; -import java.util.List; - public class SpeedGaugeTileEntity extends GaugeTileEntity{ public SpeedGaugeTileEntity() { diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/gauge/StressGaugeTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/gauge/StressGaugeTileEntity.java index c819e6d23..180edce95 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/relays/gauge/StressGaugeTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/gauge/StressGaugeTileEntity.java @@ -1,14 +1,15 @@ package com.simibubi.create.modules.contraptions.relays.gauge; +import java.util.List; + import com.simibubi.create.AllTileEntities; import com.simibubi.create.foundation.item.ItemDescription; import com.simibubi.create.foundation.utility.ColorHelper; import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.modules.contraptions.base.IRotate.StressImpact; import com.simibubi.create.modules.contraptions.goggle.IHaveGoggleInformation; -import net.minecraft.util.text.TextFormatting; -import java.util.List; +import net.minecraft.util.text.TextFormatting; public class StressGaugeTileEntity extends GaugeTileEntity { diff --git a/src/main/java/com/simibubi/create/modules/curiosities/ChromaticCompoundCubeItem.java b/src/main/java/com/simibubi/create/modules/curiosities/ChromaticCompoundCubeItem.java index 13733e007..b6139696f 100644 --- a/src/main/java/com/simibubi/create/modules/curiosities/ChromaticCompoundCubeItem.java +++ b/src/main/java/com/simibubi/create/modules/curiosities/ChromaticCompoundCubeItem.java @@ -25,10 +25,14 @@ import net.minecraft.particles.ParticleTypes; import net.minecraft.tileentity.BeaconTileEntity; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Direction; -import net.minecraft.util.math.*; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos.MutableBlockPos; +import net.minecraft.util.math.MathHelper; +import net.minecraft.util.math.RayTraceContext; import net.minecraft.util.math.RayTraceContext.BlockMode; import net.minecraft.util.math.RayTraceContext.FluidMode; +import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; diff --git a/src/main/java/com/simibubi/create/modules/curiosities/zapper/blockzapper/BlockzapperItemRenderer.java b/src/main/java/com/simibubi/create/modules/curiosities/zapper/blockzapper/BlockzapperItemRenderer.java index bb62182c9..f9363fd65 100644 --- a/src/main/java/com/simibubi/create/modules/curiosities/zapper/blockzapper/BlockzapperItemRenderer.java +++ b/src/main/java/com/simibubi/create/modules/curiosities/zapper/blockzapper/BlockzapperItemRenderer.java @@ -9,8 +9,8 @@ import static com.simibubi.create.modules.curiosities.zapper.blockzapper.Blockza import com.mojang.blaze3d.platform.GLX; import com.mojang.blaze3d.platform.GlStateManager; import com.simibubi.create.foundation.utility.AnimationTickHolder; -import com.simibubi.create.modules.curiosities.zapper.ZapperRenderHandler; import com.simibubi.create.modules.curiosities.zapper.ZapperItemRenderer; +import com.simibubi.create.modules.curiosities.zapper.ZapperRenderHandler; import com.simibubi.create.modules.curiosities.zapper.blockzapper.BlockzapperItem.ComponentTier; import com.simibubi.create.modules.curiosities.zapper.blockzapper.BlockzapperItem.Components; diff --git a/src/main/java/com/simibubi/create/modules/curiosities/zapper/terrainzapper/TerrainzapperItemRenderer.java b/src/main/java/com/simibubi/create/modules/curiosities/zapper/terrainzapper/TerrainzapperItemRenderer.java index fe9d91a28..3d29f1aa1 100644 --- a/src/main/java/com/simibubi/create/modules/curiosities/zapper/terrainzapper/TerrainzapperItemRenderer.java +++ b/src/main/java/com/simibubi/create/modules/curiosities/zapper/terrainzapper/TerrainzapperItemRenderer.java @@ -3,8 +3,8 @@ package com.simibubi.create.modules.curiosities.zapper.terrainzapper; import com.mojang.blaze3d.platform.GLX; import com.mojang.blaze3d.platform.GlStateManager; import com.simibubi.create.foundation.utility.AnimationTickHolder; -import com.simibubi.create.modules.curiosities.zapper.ZapperRenderHandler; import com.simibubi.create.modules.curiosities.zapper.ZapperItemRenderer; +import com.simibubi.create.modules.curiosities.zapper.ZapperRenderHandler; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.player.ClientPlayerEntity; diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 7119bac61..5146cb722 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -4,7 +4,7 @@ loaderVersion="[28,)" [[mods]] modId="create" -version="mc1.14-0.2.1" +version="mc1.14-0.2.2" displayName="Create" #updateJSONURL="" authors="simibubi" diff --git a/src/main/resources/assets/create/blockstates/brass_block.json b/src/main/resources/assets/create/blockstates/brass_block.json new file mode 100644 index 000000000..c5b2d45e1 --- /dev/null +++ b/src/main/resources/assets/create/blockstates/brass_block.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "create:block/brass_block" } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/blockstates/zinc_block.json b/src/main/resources/assets/create/blockstates/zinc_block.json new file mode 100644 index 000000000..df477d821 --- /dev/null +++ b/src/main/resources/assets/create/blockstates/zinc_block.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "create:block/zinc_block" } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/lang/en_us.json b/src/main/resources/assets/create/lang/en_us.json index d9ca6b452..1c22e1a43 100644 --- a/src/main/resources/assets/create/lang/en_us.json +++ b/src/main/resources/assets/create/lang/en_us.json @@ -75,9 +75,11 @@ "item.create.rose_quartz_sword": "Gilded Quartz Blade", "block.create.copper_ore": "Copper Ore", - "block.create.copper_block": "Copper Block", + "block.create.copper_block": "Block of Copper", "block.create.copper_shingles": "Copper Shingles", "block.create.zinc_ore": "Zinc Ore", + "block.create.zinc_block": "Block of Zinc", + "block.create.brass_block": "Block of Brass", "block.create.andesite_casing": "Andesite Casing", "block.create.brass_casing": "Brass Casing", diff --git a/src/main/resources/assets/create/models/block/brass_block.json b/src/main/resources/assets/create/models/block/brass_block.json new file mode 100644 index 000000000..333017081 --- /dev/null +++ b/src/main/resources/assets/create/models/block/brass_block.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "create:block/brass_block" + } +} diff --git a/src/main/resources/assets/create/models/block/zinc_block.json b/src/main/resources/assets/create/models/block/zinc_block.json new file mode 100644 index 000000000..07e62b1b3 --- /dev/null +++ b/src/main/resources/assets/create/models/block/zinc_block.json @@ -0,0 +1,6 @@ +{ + "parent": "block/cube_all", + "textures": { + "all": "create:block/zinc_block" + } +} diff --git a/src/main/resources/assets/create/models/item/brass_block.json b/src/main/resources/assets/create/models/item/brass_block.json new file mode 100644 index 000000000..879defa02 --- /dev/null +++ b/src/main/resources/assets/create/models/item/brass_block.json @@ -0,0 +1,3 @@ +{ + "parent": "create:block/brass_block" +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/zinc_block.json b/src/main/resources/assets/create/models/item/zinc_block.json new file mode 100644 index 000000000..aa3c620f0 --- /dev/null +++ b/src/main/resources/assets/create/models/item/zinc_block.json @@ -0,0 +1,3 @@ +{ + "parent": "create:block/zinc_block" +} \ No newline at end of file diff --git a/src/main/resources/assets/create/textures/block/zinc_block.png b/src/main/resources/assets/create/textures/block/zinc_block.png new file mode 100644 index 0000000000000000000000000000000000000000..c1b565cfbe92ef285547e63570100c13b724b80d GIT binary patch literal 642 zcmV-|0)737P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!T7^_CFJHe?+Q102f~zVHRF)M8A&$o=&x;ygLVU=_DXUSX-v2N#O>;V(*6R&L zQAAN7k{AYA9RKF|hHcL^&0s9cvUE7S$3;9Anx_L zvRvc&8bUaV5_Eg}qu>7|N%fbm|CHy<^OjJns^B>$8GBx>mNi)>=jXbvYp(0GS{+rT z&#sj4l6s%BGioaJ))1W0+BhNIDl<0{8_vaE?95Z8U;xV`JnJDnDA zLit96wA(5KuSjKC!Z%=Sw{Kw%Iw0{kH=j-O;_B*s5bO-2+itgdJwp`hfC2d=i72Ip zpHwSQ>s|jFYpcWn%2$peUijSq$t`xJlyB` z^K3R>ukE5pM3M8nm987xt*`4HLP{vl7^|uh-Q9g7guoS#jsLDO>>LELT#uskFi;Te ce3oT@0Awt5Mx