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 01/11] 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 Date: Wed, 25 Mar 2020 23:42:38 +0100 Subject: [PATCH 02/11] Bug Fixes, Updated zh_cn localization - Mechanical Crafter JEI no longer adds other mods' custom crafting recipe types, addresses #114 - Potential fix for #125 - Blacklisted a few entities from contraption collision, addresses #120 - Contraption Entities no longer spawn water particles, addresses #107 - Fixed floating point errors in RSC, addresses #118 - Added rendering safety check for belts, addresses #108 - Update Chinese translation --- .../simibubi/create/compat/jei/CreateJEI.java | 8 +- .../contraptions/RotationPropagator.java | 85 +- .../modules/contraptions/base/IRotate.java | 4 +- .../contraptions/ContraptionCollider.java | 13 +- .../contraptions/ContraptionEntity.java | 56 +- .../contraptions/IControlContraption.java | 2 + .../bearing/ClockworkBearingTileEntity.java | 40 +- .../bearing/MechanicalBearingTileEntity.java | 33 +- .../piston/LinearActuatorTileEntity.java | 5 + .../advanced/SpeedControllerTileEntity.java | 34 +- .../contraptions/relays/belt/BeltBlock.java | 2 - .../contraptions/relays/belt/BeltColor.java | 2 + .../resources/assets/create/lang/zh_cn.json | 1752 +++++++++++------ 13 files changed, 1330 insertions(+), 706 deletions(-) diff --git a/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java b/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java index 4e5e8e513..e6104d6d6 100644 --- a/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java +++ b/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java @@ -133,12 +133,12 @@ public class CreateJEI implements IModPlugin { registration.addRecipes(findRecipes( r -> (r instanceof MechanicalCraftingRecipe) && MechanicalCraftingCategory.isSmall((ShapedRecipe) r)), smallMechanicalCraftingCategory.getUid()); - registration.addRecipes( - findRecipes(r -> (r instanceof ShapedRecipe) && !(r instanceof MechanicalCraftingRecipe) - && MechanicalCraftingCategory.isSmall((ShapedRecipe) r)), + registration.addRecipes(findRecipes(r -> r.getType() == IRecipeType.CRAFTING && (r instanceof ShapedRecipe) + && !(r instanceof MechanicalCraftingRecipe) && MechanicalCraftingCategory.isSmall((ShapedRecipe) r)), smallMechanicalCraftingCategory.getUid()); registration.addRecipes( - findRecipes(r -> (r instanceof ShapedRecipe) && !MechanicalCraftingCategory.isSmall((ShapedRecipe) r)), + findRecipes(r -> r.getType() == IRecipeType.CRAFTING && (r instanceof ShapedRecipe) + && !MechanicalCraftingCategory.isSmall((ShapedRecipe) r)), largeMechanicalCraftingCategory.getUid()); } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/RotationPropagator.java b/src/main/java/com/simibubi/create/modules/contraptions/RotationPropagator.java index 1cd01d438..0e4252954 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/RotationPropagator.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/RotationPropagator.java @@ -20,6 +20,7 @@ import com.simibubi.create.modules.contraptions.relays.encased.SplitShaftTileEnt import com.simibubi.create.modules.contraptions.relays.gearbox.GearboxTileEntity; import net.minecraft.block.BlockState; +import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Direction; import net.minecraft.util.Direction.Axis; import net.minecraft.util.math.BlockPos; @@ -95,12 +96,6 @@ public class RotationPropagator { if (isLargeToSmallGear(stateTo, stateFrom, diff)) return -.5f; - // Rotation Speed Controller <-> Large Gear - if (isLargeGearToSpeedController(stateFrom, stateTo, diff)) - return SpeedControllerTileEntity.getSpeedModifier(from, to, true); - if (isLargeGearToSpeedController(stateTo, stateFrom, diff)) - return SpeedControllerTileEntity.getSpeedModifier(to, from, false); - // Gear <-> Gear if (connectedByGears) { if (diff.manhattanDistance(BlockPos.ZERO) != 1) @@ -114,6 +109,20 @@ public class RotationPropagator { return 0; } + private static float getConveyedSpeed(KineticTileEntity from, KineticTileEntity to) { + final BlockState stateFrom = from.getBlockState(); + final BlockState stateTo = to.getBlockState(); + final BlockPos diff = to.getPos().subtract(from.getPos()); + + // Rotation Speed Controller <-> Large Gear + if (isLargeGearToSpeedController(stateFrom, stateTo, diff)) + return SpeedControllerTileEntity.getConveyedSpeed(from, to, true); + if (isLargeGearToSpeedController(stateTo, stateFrom, diff)) + return SpeedControllerTileEntity.getConveyedSpeed(to, from, false); + + return from.getTheoreticalSpeed() * getRotationSpeedModifier(from, to); + } + private static boolean isLargeToLargeGear(BlockState from, BlockState to, BlockPos diff) { if (!LARGE_COGWHEEL.typeOf(from) || !LARGE_COGWHEEL.typeOf(to)) return false; @@ -184,31 +193,7 @@ public class RotationPropagator { return; if (!worldIn.isBlockPresent(pos)) return; - if (addedTE.getTheoreticalSpeed() != 0) { - propagateNewSource(addedTE); - return; - } - - for (KineticTileEntity neighbourTE : getConnectedNeighbours(addedTE)) { - final float speedModifier = getRotationSpeedModifier(neighbourTE, addedTE); - - float neighbourSpeed = neighbourTE.getTheoreticalSpeed(); - if (neighbourSpeed == 0) - continue; - if (neighbourTE.hasSource() && neighbourTE.source.equals(addedTE.getPos())) { - addedTE.setSpeed(neighbourSpeed * speedModifier); - addedTE.onSpeedChanged(0); - addedTE.sendData(); - continue; - } - - addedTE.setSpeed(neighbourSpeed * speedModifier); - addedTE.setSource(neighbourTE.getPos()); - addedTE.onSpeedChanged(0); - addedTE.sendData(); - propagateNewSource(addedTE); - return; - } + propagateNewSource(addedTE); } /** @@ -221,12 +206,10 @@ public class RotationPropagator { World world = currentTE.getWorld(); for (KineticTileEntity neighbourTE : getConnectedNeighbours(currentTE)) { - float modFromTo = getRotationSpeedModifier(currentTE, neighbourTE); - float modToFrom = getRotationSpeedModifier(neighbourTE, currentTE); float speedOfCurrent = currentTE.getTheoreticalSpeed(); float speedOfNeighbour = neighbourTE.getTheoreticalSpeed(); - float newSpeed = speedOfCurrent * modFromTo; - float oppositeSpeed = speedOfNeighbour * modToFrom; + float newSpeed = getConveyedSpeed(currentTE, neighbourTE); + float oppositeSpeed = getConveyedSpeed(neighbourTE, currentTE); boolean incompatible = Math.signum(newSpeed) != Math.signum(speedOfNeighbour) && (newSpeed != 0 && speedOfNeighbour != 0); @@ -249,7 +232,7 @@ public class RotationPropagator { // Neighbour faster, overpower the incoming tree if (Math.abs(oppositeSpeed) > Math.abs(speedOfCurrent)) { float prevSpeed = currentTE.getSpeed(); - currentTE.setSpeed(speedOfNeighbour * getRotationSpeedModifier(neighbourTE, currentTE)); + currentTE.setSpeed(oppositeSpeed); currentTE.setSource(neighbourTE.getPos()); currentTE.onSpeedChanged(prevSpeed); currentTE.sendData(); @@ -272,7 +255,7 @@ public class RotationPropagator { currentTE.removeSource(); float prevSpeed = neighbourTE.getSpeed(); - neighbourTE.setSpeed(speedOfCurrent * getRotationSpeedModifier(currentTE, neighbourTE)); + neighbourTE.setSpeed(newSpeed); neighbourTE.setSource(currentTE.getPos()); neighbourTE.onSpeedChanged(prevSpeed); neighbourTE.sendData(); @@ -370,17 +353,33 @@ public class RotationPropagator { } } - private static KineticTileEntity findConnectedNeighbour(KineticTileEntity te, BlockPos neighbourPos) { - BlockState neighbourState = te.getWorld().getBlockState(neighbourPos); + private static KineticTileEntity findConnectedNeighbour(KineticTileEntity currentTE, BlockPos neighbourPos) { + BlockState neighbourState = currentTE.getWorld().getBlockState(neighbourPos); if (!(neighbourState.getBlock() instanceof IRotate)) return null; if (!neighbourState.hasTileEntity()) return null; - - KineticTileEntity neighbour = (KineticTileEntity) te.getWorld().getTileEntity(neighbourPos); - if (getRotationSpeedModifier(te, neighbour) == 0) + TileEntity neighbourTE = currentTE.getWorld().getTileEntity(neighbourPos); + if (!(neighbourTE instanceof KineticTileEntity)) return null; - return neighbour; + KineticTileEntity neighbourKTE = (KineticTileEntity) neighbourTE; + if (!(neighbourKTE.getBlockState().getBlock() instanceof IRotate)) + return null; + if (!isConnected(currentTE, neighbourKTE)) + return null; + return neighbourKTE; + } + + public static boolean isConnected(KineticTileEntity from, KineticTileEntity to) { + final BlockState stateFrom = from.getBlockState(); + final BlockState stateTo = to.getBlockState(); + final BlockPos diff = to.getPos().subtract(from.getPos()); + + if (isLargeGearToSpeedController(stateFrom, stateTo, diff)) + return true; + if (isLargeGearToSpeedController(stateTo, stateFrom, diff)) + return true; + return getRotationSpeedModifier(from, to) != 0; } private static List getConnectedNeighbours(KineticTileEntity te) { 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 870a4a7d1..917ac8c56 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 @@ -68,9 +68,9 @@ public interface IRotate extends IWrenchable { String level = color + ItemDescription.makeProgressBar(3, speedLevel.ordinal()); if (speedLevel == SpeedLevel.MEDIUM) - level += Lang.translate("tooltip.speedRequirements.medium"); + level += Lang.translate("tooltip.speedRequirement.medium"); if (speedLevel == SpeedLevel.FAST) - level += Lang.translate("tooltip.speedRequirements.high"); + level += Lang.translate("tooltip.speedRequirement.high"); level += String.format(" (%s%s) ", IHaveGoggleInformation.format(Math.abs(speed)), Lang.translate("generic.unit.rpm")); diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ContraptionCollider.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ContraptionCollider.java index 4452f949d..9e1efeaeb 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ContraptionCollider.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ContraptionCollider.java @@ -11,6 +11,7 @@ import net.minecraft.block.material.PushReaction; import net.minecraft.client.Minecraft; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityType; +import net.minecraft.entity.IProjectile; import net.minecraft.entity.MoverType; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.util.Direction; @@ -52,7 +53,7 @@ public class ContraptionCollider { return; for (Entity entity : world.getEntitiesWithinAABB((EntityType) null, bounds.grow(1), - e -> e.getPushReaction() == PushReaction.NORMAL)) { + e -> canBeCollidedWith(e))) { ReuseableStream potentialHits = getPotentiallyCollidedShapes(world, contraption, contraptionPosition, entity); @@ -88,6 +89,16 @@ public class ContraptionCollider { } + public static boolean canBeCollidedWith(Entity e) { + if (e instanceof PlayerEntity && e.isSpectator()) + return false; + if (e.noClip) + return false; + if (e instanceof IProjectile) + return false; + return e.getPushReaction() == PushReaction.NORMAL; + } + @OnlyIn(Dist.CLIENT) private static void checkForClientPlayerCollision(Entity entity) { if (entity != Minecraft.getInstance().player) diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ContraptionEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ContraptionEntity.java index 07f52fb32..c4a347028 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ContraptionEntity.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ContraptionEntity.java @@ -54,7 +54,6 @@ public class ContraptionEntity extends Entity implements IEntityAdditionalSpawnD protected Contraption contraption; protected float initialAngle; protected BlockPos controllerPos; - protected IControlContraption controllerTE; protected Vec3d motionBeforeStall; protected boolean stationary; @@ -103,12 +102,22 @@ public class ContraptionEntity extends Entity implements IEntityAdditionalSpawnD public ContraptionEntity controlledBy(T controller) { this.controllerPos = controller.getPos(); - this.controllerTE = controller; return this; } + private IControlContraption getController() { + if (controllerPos == null) + return null; + if (!world.isBlockPresent(controllerPos)) + return null; + TileEntity te = world.getTileEntity(controllerPos); + if (!(te instanceof IControlContraption)) + return null; + return (IControlContraption) te; + } + public boolean collisionEnabled() { - return stationary && controllerTE instanceof LinearActuatorTileEntity; + return getController() instanceof LinearActuatorTileEntity; } @Override @@ -118,7 +127,7 @@ public class ContraptionEntity extends Entity implements IEntityAdditionalSpawnD return; } - attachToController(); + checkController(); Entity mountedEntity = getRidingEntity(); if (mountedEntity != null) { @@ -131,7 +140,7 @@ public class ContraptionEntity extends Entity implements IEntityAdditionalSpawnD move(getMotion().x, getMotion().y, getMotion().z); if (ContraptionCollider.collideBlocks(this)) - controllerTE.collided(); + getController().collided(); tickActors(new Vec3d(posX - prevPosX, posY - prevPosY, posZ - prevPosZ)); @@ -256,8 +265,8 @@ public class ContraptionEntity extends Entity implements IEntityAdditionalSpawnD if (!world.isRemote) { if (!stalledPreviously && contraption.stalled) { setMotion(Vec3d.ZERO); - if (controllerTE != null) - controllerTE.onStall(); + if (getController() != null) + getController().onStall(); AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY.with(() -> this), new ContraptionStallPacket(getEntityId(), posX, posY, posZ, yaw, pitch, roll)); } @@ -368,22 +377,21 @@ public class ContraptionEntity extends Entity implements IEntityAdditionalSpawnD controllerPos = NBTUtil.readBlockPos(compound.getCompound("Controller")); } - public void attachToController() { - if (controllerPos != null && (controllerTE == null || !controllerTE.isValid())) { - if (!world.isBlockPresent(controllerPos)) - return; - TileEntity te = world.getTileEntity(controllerPos); - if (te == null || !(te instanceof IControlContraption)) { - remove(); - return; - } - IControlContraption controllerTE = (IControlContraption) te; - this.controllerTE = controllerTE; - controllerTE.attach(this); - - if (world.isRemote) - setPosition(posX, posY, posZ); + public void checkController() { + if (controllerPos == null) + return; + if (!world.isBlockPresent(controllerPos)) + return; + IControlContraption controller = getController(); + if (controller == null) { + remove(); + return; } + if (controller.isAttachedTo(this)) + return; + controller.attach(this); + if (world.isRemote) + setPosition(posX, posY, posZ); } @Override @@ -424,6 +432,10 @@ public class ContraptionEntity extends Entity implements IEntityAdditionalSpawnD } remove(); } + + @Override + protected void doWaterSplashEffect() { + } public void preventMovedEntitiesFromGettingStuck() { Vec3d stuckTest = new Vec3d(0, -2, 0); diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/IControlContraption.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/IControlContraption.java index 556e08986..1af2b453f 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/IControlContraption.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/IControlContraption.java @@ -6,6 +6,8 @@ import com.simibubi.create.foundation.utility.Lang; public interface IControlContraption { + public boolean isAttachedTo(ContraptionEntity contraption); + public void attach(ContraptionEntity contraption); public void onStall(); diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/ClockworkBearingTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/ClockworkBearingTileEntity.java index 88a7d11c6..a6c53e481 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/ClockworkBearingTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/ClockworkBearingTileEntity.java @@ -203,21 +203,22 @@ public class ClockworkBearingTileEntity extends KineticTileEntity implements IBe @Override public void attach(ContraptionEntity contraption) { - if (contraption.getContraption() instanceof ClockworkContraption) { - ClockworkContraption cc = (ClockworkContraption) contraption.getContraption(); - markDirty(); - Direction facing = getBlockState().get(BlockStateProperties.FACING); - BlockPos anchor = pos.offset(facing, cc.offset + 1); - if (cc.handType == HandType.HOUR) { - this.hourHand = contraption; - hourHand.setPosition(anchor.getX(), anchor.getY(), anchor.getZ()); - } else { - this.minuteHand = contraption; - minuteHand.setPosition(anchor.getX(), anchor.getY(), anchor.getZ()); - } - if (!world.isRemote) - sendData(); + if (!(contraption.getContraption() instanceof ClockworkContraption)) + return; + + ClockworkContraption cc = (ClockworkContraption) contraption.getContraption(); + markDirty(); + Direction facing = getBlockState().get(BlockStateProperties.FACING); + BlockPos anchor = pos.offset(facing, cc.offset + 1); + if (cc.handType == HandType.HOUR) { + this.hourHand = contraption; + hourHand.setPosition(anchor.getX(), anchor.getY(), anchor.getZ()); + } else { + this.minuteHand = contraption; + minuteHand.setPosition(anchor.getX(), anchor.getY(), anchor.getZ()); } + if (!world.isRemote) + sendData(); } @Override @@ -287,4 +288,15 @@ public class ClockworkBearingTileEntity extends KineticTileEntity implements IBe public void collided() { } + @Override + public boolean isAttachedTo(ContraptionEntity contraption) { + if (!(contraption.getContraption() instanceof ClockworkContraption)) + return false; + ClockworkContraption cc = (ClockworkContraption) contraption.getContraption(); + if (cc.handType == HandType.HOUR) + return this.hourHand == contraption; + else + return this.minuteHand == contraption; + } + } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/MechanicalBearingTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/MechanicalBearingTileEntity.java index 398437f39..8033bbd6c 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/MechanicalBearingTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/MechanicalBearingTileEntity.java @@ -1,5 +1,7 @@ package com.simibubi.create.modules.contraptions.components.contraptions.bearing; +import static net.minecraft.state.properties.BlockStateProperties.FACING; + import java.util.List; import com.simibubi.create.AllTileEntities; @@ -14,8 +16,8 @@ import com.simibubi.create.modules.contraptions.components.contraptions.Contrapt import com.simibubi.create.modules.contraptions.components.contraptions.ContraptionEntity; import com.simibubi.create.modules.contraptions.components.contraptions.DirectionalExtenderScrollOptionSlot; +import net.minecraft.block.BlockState; import net.minecraft.nbt.CompoundNBT; -import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.util.Direction; import net.minecraft.util.Direction.Axis; import net.minecraft.util.Direction.AxisDirection; @@ -145,7 +147,7 @@ public class MechanicalBearingTileEntity extends GeneratingKineticTileEntity imp } public void assemble() { - Direction direction = getBlockState().get(BlockStateProperties.FACING); + Direction direction = getBlockState().get(FACING); // Collect Construct BearingContraption contraption = BearingContraption.assembleBearingAt(world, pos, direction); @@ -237,7 +239,7 @@ public class MechanicalBearingTileEntity extends GeneratingKineticTileEntity imp protected void applyRotation() { if (movedContraption != null) { - Axis axis = getBlockState().get(BlockStateProperties.FACING).getAxis(); + Axis axis = getBlockState().get(FACING).getAxis(); Direction direction = Direction.getFacingFromAxis(AxisDirection.POSITIVE, axis); Vec3d vec = new Vec3d(1, 1, 1).scale(angle).mul(new Vec3d(direction.getDirectionVec())); movedContraption.rotateTo(vec.x, vec.y, vec.z); @@ -246,14 +248,18 @@ public class MechanicalBearingTileEntity extends GeneratingKineticTileEntity imp @Override public void attach(ContraptionEntity contraption) { - if (contraption.getContraption() instanceof BearingContraption) { - this.movedContraption = contraption; - markDirty(); - BlockPos anchor = pos.offset(getBlockState().get(BlockStateProperties.FACING)); - movedContraption.setPosition(anchor.getX(), anchor.getY(), anchor.getZ()); - if (!world.isRemote) - sendData(); - } + BlockState blockState = getBlockState(); + if (!(contraption.getContraption() instanceof BearingContraption)) + return; + if (!blockState.has(FACING)) + return; + + this.movedContraption = contraption; + markDirty(); + BlockPos anchor = pos.offset(blockState.get(FACING)); + movedContraption.setPosition(anchor.getX(), anchor.getY(), anchor.getZ()); + if (!world.isRemote) + sendData(); } @Override @@ -279,4 +285,9 @@ public class MechanicalBearingTileEntity extends GeneratingKineticTileEntity imp public void collided() { } + @Override + public boolean isAttachedTo(ContraptionEntity contraption) { + return movedContraption == contraption; + } + } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/piston/LinearActuatorTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/piston/LinearActuatorTileEntity.java index 71713172c..4642683f8 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/piston/LinearActuatorTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/piston/LinearActuatorTileEntity.java @@ -297,4 +297,9 @@ public abstract class LinearActuatorTileEntity extends KineticTileEntity impleme sendData(); } + @Override + public boolean isAttachedTo(ContraptionEntity contraption) { + return movedContraption == contraption; + } + } \ No newline at end of file diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/advanced/SpeedControllerTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/advanced/SpeedControllerTileEntity.java index c0a7fda31..d90c58efe 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/relays/advanced/SpeedControllerTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/advanced/SpeedControllerTileEntity.java @@ -31,8 +31,8 @@ public class SpeedControllerTileEntity extends KineticTileEntity { super.addBehaviours(behaviours); Integer max = AllConfigs.SERVER.kinetics.maxRotationSpeed.get(); - targetSpeed = new ScrollValueBehaviour(Lang.translate("generic.speed"), this, - new ControllerValueBoxTransform()); + targetSpeed = + new ScrollValueBehaviour(Lang.translate("generic.speed"), this, new ControllerValueBoxTransform()); targetSpeed.between(-max, max); targetSpeed.value = DEFAULT_SPEED; targetSpeed.moveText(new Vec3d(9, 0, 10)); @@ -43,7 +43,7 @@ public class SpeedControllerTileEntity extends KineticTileEntity { } private void updateTargetRotation() { - if (hasNetwork()) + if (hasNetwork()) getOrCreateNetwork().remove(this); RotationPropagator.handleRemoved(world, pos, this); removeSource(); @@ -54,38 +54,38 @@ public class SpeedControllerTileEntity extends KineticTileEntity { public boolean hasFastRenderer() { return false; } - - public static float getSpeedModifier(KineticTileEntity cogWheel, KineticTileEntity speedControllerIn, + + public static float getConveyedSpeed(KineticTileEntity cogWheel, KineticTileEntity speedControllerIn, boolean targetingController) { if (!(speedControllerIn instanceof SpeedControllerTileEntity)) - return 1; + return 0; SpeedControllerTileEntity speedController = (SpeedControllerTileEntity) speedControllerIn; + float targetSpeed = speedController.targetSpeed.getValue(); float speed = speedControllerIn.getSpeed(); + float wheelSpeed = cogWheel.getTheoreticalSpeed(); if (targetSpeed == 0) return 0; - float wheelSpeed = cogWheel.getTheoreticalSpeed(); if (targetingController && wheelSpeed == 0) - return 1; - + return 0; if (!speedController.hasSource()) { if (targetingController) - return targetSpeed / wheelSpeed; - return 1; + return targetSpeed; + return 0; } boolean wheelPowersController = speedController.source.equals(cogWheel.getPos()); - + if (wheelPowersController) { if (targetingController) - return targetSpeed / wheelSpeed; - return wheelSpeed / targetSpeed; + return targetSpeed; + return wheelSpeed; } - + if (targetingController) - return speed / targetSpeed; - return targetSpeed / speed; + return speed; + return targetSpeed; } private class ControllerValueBoxTransform extends ValueBoxTransform.Sided { 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 58a46b42f..2073e752e 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 @@ -1,6 +1,5 @@ package com.simibubi.create.modules.contraptions.relays.belt; -import java.util.ArrayList; import java.util.Collections; import java.util.LinkedList; import java.util.List; @@ -55,7 +54,6 @@ 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; diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltColor.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltColor.java index 258cea032..54798894e 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltColor.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltColor.java @@ -13,6 +13,8 @@ class BeltColor implements IBlockColor { @Override public int getColor(BlockState state, IEnviromentBlockReader reader, BlockPos pos, int layer) { + if (reader == null) + return 0; TileEntity tileEntity = reader.getTileEntity(pos); if (tileEntity instanceof BeltTileEntity) { BeltTileEntity te = (BeltTileEntity) tileEntity; diff --git a/src/main/resources/assets/create/lang/zh_cn.json b/src/main/resources/assets/create/lang/zh_cn.json index d8ee57168..73f4e0293 100644 --- a/src/main/resources/assets/create/lang/zh_cn.json +++ b/src/main/resources/assets/create/lang/zh_cn.json @@ -1,601 +1,1173 @@ { - "_comment": "-------------------------] GAME ELEMENTS [------------------------------------------------", + "_comment": "-------------------------] GAME ELEMENTS [------------------------------------------------", - "item.create.symmetry_wand": "对称法杖", - "item.create.placement_handgun": "手持式方块放置器", - "item.create.tree_fertilizer": "树木肥料", - "item.create.empty_blueprint": "空白原理图", - "item.create.andesite_alloy_cube": "安山合金", - "item.create.blaze_brass_cube": "烈焰合金", - "item.create.chorus_chrome_cube": "紫颂合金", - "item.create.chromatic_compound_cube": "Chromatic Compound", - "item.create.shadow_steel_cube": "Shadow Steel", - "item.create.blueprint_and_quill": "原理图与笔", - "item.create.blueprint": "原理图", - "item.create.belt_connector": "传送带", - "item.create.filter": "Filter", - "item.create.rose_quartz": "Rose Quartz", - "item.create.refined_rose_quartz": "Refined Rose Quartz", - "item.create.refined_radiance_cube": "Refined Radiance", - "item.create.iron_sheet": "铁板", - "item.create.gold_sheet": "金板", - "item.create.propeller": "扇叶", - "item.create.flour": "小麦粉", - "item.create.dough": "面团", + "item.create.symmetry_wand": "对称法杖", + "item.create.placement_handgun": "手持式方块放置器", + "item.create.terrain_zapper": "手持式环境塑形器", + "item.create.tree_fertilizer": "树木肥料", + "item.create.empty_blueprint": "空白原理图", + "item.create.andesite_alloy": "安山合金", + "item.create.chromatic_compound": "谜之化合物", + "item.create.shadow_steel": "暗影金属", + "item.create.blueprint_and_quill": "原理图与笔", + "item.create.blueprint": "原理图", + "item.create.belt_connector": "传送带", + "item.create.goggles": "工程师护目镜", + "item.create.filter": "过滤器", + "item.create.property_filter": "属性过滤器", + "item.create.logistical_filter": "Address Filter", + "item.create.rose_quartz": "玫瑰石英", + "item.create.polished_rose_quartz": "磨制玫瑰石英", + "item.create.refined_radiance": "光辉石", + "item.create.iron_sheet": "铁板", + "item.create.gold_sheet": "金板", + "item.create.lapis_plate": "青金石电镀版", + "item.create.obsidian_dust": "黑曜石粉", + "item.create.propeller": "扇叶", + "item.create.whisk": "搅拌器", + "item.create.brass_hand": "机械手部零件", + "item.create.slot_cover": "制造器盖板", + "item.create.zinc_handle": "锌工具手柄", + "item.create.flour": "小麦粉", + "item.create.dough": "面团", + "item.create.wrench": "扳手", + "item.create.deforester": "树林毁灭者", + "item.create.crushed_iron": "碎铁矿", + "item.create.crushed_gold": "碎金矿", + "item.create.sand_paper": "砂纸", + "item.create.red_sand_paper": "红砂纸", - "item.create.blazing_pickaxe": "Blazing Pickaxe", - "item.create.blazing_shovel": "Blazing Shovel", - "item.create.blazing_axe": "Blazing Axe", - "item.create.blazing_sword": "Blazing Longsword", + "item.create.brass_ingot": "黄铜锭", + "item.create.brass_sheet": "黄铜板", + "item.create.brass_nugget": "黄铜粒", + "item.create.crushed_brass": "碎黄铜", + "item.create.zinc_ingot": "锌锭", + "item.create.zinc_nugget": "锌粒", + "item.create.crushed_zinc": "碎锌", + "item.create.copper_sheet": "铜板", + "item.create.copper_ingot": "铜锭", + "item.create.copper_nugget": "铜粒", + "item.create.crushed_copper": "碎铜", - "item.create.shadow_steel_pickaxe": "Shadow Steel Pickaxe", - "item.create.shadow_steel_mattock": "Shadow Steel Garden Mattock", - "item.create.shadow_steel_sword": "Shadow Steel Sword", + "item.create.electron_tube": "电子管", + "item.create.integrated_circuit": "集成电路", - "item.create.rose_quartz_pickaxe": "Gilded Quartz Pickaxe", - "item.create.rose_quartz_shovel": "Gilded Quartz Shovel", - "item.create.rose_quartz_axe": "Gilded Quartz Axe", - "item.create.rose_quartz_sword": "Gilded Quartz Blade", + "item.create.logistical_controller_supply": "Item Supply", + "item.create.logistical_controller_request": "Item Request", + "item.create.logistical_controller_storage": "Item Storage", + "item.create.logistical_controller_calculation": "Ingredient Calculator", + "item.create.logistical_controller_transactions": "Task Manager", + "item.create.logistical_dial": "Logistical Dial", - "block.create.cogwheel": "齿轮", + "item.create.blazing_pickaxe": "烈焰稿", + "item.create.blazing_shovel": "烈焰铲", + "item.create.blazing_axe": "烈焰斧", + "item.create.blazing_sword": "烈焰长剑", + + "item.create.shadow_steel_pickaxe": "暗影金属稿", + "item.create.shadow_steel_mattock": "暗影金属鹤嘴锄", + "item.create.shadow_steel_sword": "暗影金属剑", + + "item.create.rose_quartz_pickaxe": "玫瑰石英稿", + "item.create.rose_quartz_shovel": "玫瑰石英铲", + "item.create.rose_quartz_axe": "玫瑰石英斧", + "item.create.rose_quartz_sword": "玫瑰石英剑", + + "block.create.copper_ore": "铜矿", + "block.create.copper_block": "铜块", + "block.create.copper_shingles": "铜瓦堆", + "block.create.zinc_ore": "锌矿", + + "block.create.andesite_casing": "安山箱", + "block.create.brass_casing": "黄铜箱", + "block.create.copper_casing": "铜箱", + + "block.create.cogwheel": "齿轮", "block.create.large_cogwheel": "大齿轮", "block.create.turntable": "转盘", "block.create.gearbox": "十字齿轮箱", - "block.create.gearshift": "红石齿轮箱", - "block.create.clutch": "离合器", + "block.create.gearshift": "红石齿轮箱", + "block.create.clutch": "离合器", "block.create.shaft": "传动杆", - "block.create.encased_belt": "连携齿轮箱", - "block.create.encased_shaft": "齿轮箱", - "block.create.encased_fan": "鼓风机", - "block.create.motor": "动力马达", - "block.create.belt": "Mechanical Belt", - "block.create.crushing_wheel": "粉碎轮", - "block.create.drill": "动力钻头", - "block.create.harvester": "收割机", - "block.create.water_wheel": "水车", - "block.create.belt_support": "传送带支撑", - "block.create.mechanical_press": "辊压机", - - "block.create.sticky_mechanical_piston": "粘性动力活塞", - "block.create.mechanical_piston": "动力活塞", - "block.create.mechanical_piston_head": "Mechanical Piston Head", - "block.create.piston_pole": "活塞杆", - "block.create.mechanical_bearing": "动力轴承", - "block.create.translation_chassis": "机壳底盘", - "block.create.rotation_chassis": "旋转底盘", - - "block.create.contact": "信号检测器", - "block.create.redstone_bridge": "无线红石信号终端", - "block.create.stockswitch": "存储检测器", - "block.create.flexcrate": "板条箱", - "block.create.extractor": "提取器", - "block.create.belt_funnel": "传送带漏斗", - "block.create.linked_extractor": "无线提取器", - "block.create.pulse_repeater": "脉冲中继器", - "block.create.flexpeater": "高级中继器", - "block.create.entity_detector": "传送带观察者", - - "block.create.andesite_bricks": "安山岩石砖", - "block.create.diorite_bricks": "闪长岩石砖", - "block.create.granite_bricks": "花岗岩石砖", - - "block.create.gabbro": "辉长岩", - "block.create.gabbro_stairs": "辉长岩楼梯", - "block.create.gabbro_slab": "辉长岩台阶", - "block.create.gabbro_wall": "辉长岩墙", - "block.create.polished_gabbro": "磨制辉长岩", - "block.create.gabbro_bricks": "辉长岩石砖", - "block.create.gabbro_bricks_stairs": "辉长岩石砖楼梯", - "block.create.gabbro_bricks_wall": "辉长岩石砖墙", - "block.create.paved_gabbro_bricks": "辉长岩砖块", - "block.create.paved_gabbro_bricks_slab": "辉长岩砖块台阶", - "block.create.indented_gabbro": "平滑辉长岩石砖", - "block.create.indented_gabbro_slab": "平滑辉长岩石砖台阶", - "block.create.slightly_mossy_gabbro_bricks": "辉长岩苔石砖", - "block.create.mossy_gabbro_bricks": "辉长岩苔藓石砖", - - "block.create.weathered_limestone": "风化石灰石", - "block.create.weathered_limestone_stairs": "风化石灰石楼梯", - "block.create.weathered_limestone_wall": "风化石灰石墙", - "block.create.weathered_limestone_slab": "风化石灰石台阶", - "block.create.polished_weathered_limestone": "磨制风化 石灰石", - "block.create.polished_weathered_limestone_slab": "磨制风化石灰石台阶", - "block.create.weathered_limestone_bricks": "风化石灰石砖", - "block.create.weathered_limestone_bricks_stairs": "风化石灰石砖楼梯", - "block.create.weathered_limestone_bricks_wall": "风化石灰石砖墙", - "block.create.weathered_limestone_bricks_slab": "风化石灰石砖台阶", - "block.create.weathered_limestone_pillar": "风化石灰石柱", - - "block.create.dolomite_pillar": "白云岩柱", - "block.create.dolomite": "白云岩", - "block.create.dolomite_stairs": "白云岩楼梯", - "block.create.dolomite_wall": "白云岩墙", - "block.create.dolomite_slab": "白云岩台阶", - "block.create.dolomite_bricks": "白云岩石砖", - "block.create.dolomite_bricks_wall": "白云岩石砖墙", - "block.create.dolomite_bricks_stairs": "白云岩石砖楼梯", - "block.create.dolomite_bricks_slab": "白云岩石砖台阶", - "block.create.polished_dolomite": "磨制白云岩", - - "block.create.limestone": "石灰石", - "block.create.limestone_stairs": "石灰石楼梯", - "block.create.limestone_slab": "石灰石台阶", - "block.create.limestone_wall": "石灰石墙", - "block.create.limestone_bricks": "石灰石砖", - "block.create.limestone_bricks_stairs": "石灰石砖楼梯", - "block.create.limestone_bricks_slab": "石灰石砖台阶", - "block.create.limestone_bricks_wall": "石灰石砖墙", - "block.create.polished_limestone": "磨制石灰石", - "block.create.polished_limestone_slab": "磨制石灰石台阶", - "block.create.limestone_pillar": "石灰石柱", - - "block.create.schematicannon": "加农炮", - "block.create.schematic_table": "Schematic桌", - "block.create.creative_crate": "Schematic创造者", - - "block.create.cocoa_log": "可可木", - - "block.create.shop_shelf": "Shelf", - - "_comment": "-------------------------] UI & MESSAGES [------------------------------------------------", - - "death.attack.create.crush": "%1$s 被压扁了", - "death.attack.create.fan_fire": "%1$s 试图接受热风的洗礼", - "death.attack.create.fan_lava": "%1$s 在接受热风的洗礼中欲火焚身", - "death.attack.create.drill": "%1$s 的钻头是突破天际的钻头", - - "create.recipe.crushing": "批量粉碎", - "create.recipe.splashing": "批量洗涤", - "create.recipe.splashing.fan": "在鼓风机前方倒水", - "create.recipe.smokingViaFan": "批量烟熏", - "create.recipe.smokingViaFan.fan": "在鼓风机前方点火", - "create.recipe.blastingViaFan": "批量冶炼", - "create.recipe.blastingViaFan.fan": "在鼓风机前方倒岩浆", - "create.recipe.pressing": "金属成型机", - "create.recipe.blockzapperUpgrade": "手持式方块放置器", - "create.recipe.processing.chance": "%1$s%% 概率", - - "create.generic.range": "范围", - "create.generic.radius": "半径", - "create.generic.speed": "速度", - "create.generic.delay": "延时", - "create.generic.unit.ticks": "Ticks", - "create.generic.unit.seconds": "Seconds", - "create.generic.unit.minutes": "Minutes", - - "create.action.scroll": "滚轮", - "create.action.confirm": "确认", - "create.action.abort": "退出", - "create.action.saveToFile": "保存", - "create.action.discard": "丢弃", - - "create.keyinfo.toolmenu": "工具菜单", - - "create.gui.scrollInput.defaultTitle": "选择一个选项:", - "create.gui.scrollInput.scrollToModify": "滚动修改", - "create.gui.scrollInput.scrollToSelect": "滚动选择", - "create.gui.scrollInput.shiftScrollsFaster": "潜行时滚动更快", - - "create.gui.toolmenu.focusKey": "按住 [%1$s] 鼠标滚轮选择", - "create.gui.toolmenu.cycle": "[SCROLL] 循环", - - "create.gui.symmetryWand.mirrorType": "镜子类型", - "create.gui.symmetryWand.orientation": "方向", - "create.symmetry.mirror.plane": "镜像", - "create.symmetry.mirror.doublePlane": "矩形", - "create.symmetry.mirror.triplePlane": "八角", - "create.orientation.orthogonal": "垂直", - "create.orientation.diagonal": "对角线", - "create.orientation.horizontal": "水平", - "create.orientation.alongZ": "Along Z", - "create.orientation.alongX": "Along X", - - "create.gui.blockzapper.title": "手持式方块放置机", - "create.gui.blockzapper.replaceMode": "更换模式", - "create.gui.blockzapper.searchDiagonal": "根据对角线", - "create.gui.blockzapper.searchFuzzy": "忽视边界", - "create.gui.blockzapper.range": "扩散范围", - "create.gui.blockzapper.patternSection": "模式", - "create.gui.blockzapper.pattern.solid": "实心", - "create.gui.blockzapper.pattern.checkered": "棋盘", - "create.gui.blockzapper.pattern.inversecheckered": "反转棋盘", - "create.gui.blockzapper.pattern.chance25": "25% ", - "create.gui.blockzapper.pattern.chance50": "50% ", - "create.gui.blockzapper.pattern.chance75": "75% ", - - "create.blockzapper.usingBlock": "使用: %1$s", - "create.blockzapper.componentUpgrades": "组件升级:", - "create.blockzapper.component.body": "机体", - "create.blockzapper.component.amplifier": "增大", - "create.blockzapper.component.accelerator": "加速", - "create.blockzapper.component.retriever": "寻回", - "create.blockzapper.component.scope": "范围", - "create.blockzapper.componentTier.none": "无", - "create.blockzapper.componentTier.blazebrass": "烈焰合金", - "create.blockzapper.componentTier.choruschrome": "紫颂合金", - "create.blockzapper.leftClickToSet": "左键点击方块以设定方块", - "create.blockzapper.empty": "出击!", - - "create.logistics.filter": "过滤器", - "create.logistics.firstFrequency": "频道. #1", - "create.logistics.secondFrequency": "频道. #2", - - "create.gui.flexcrate.title": "板条箱", - "create.gui.flexcrate.storageSpace": "储存空间", - - "create.gui.stockswitch.title": "储存开关", - "create.gui.stockswitch.lowerLimit": "阈值下限", - "create.gui.stockswitch.upperLimit": "阈值上限", - "create.gui.stockswitch.startAt": "启动信号", - "create.gui.stockswitch.startAbove": "Start Signal above", - "create.gui.stockswitch.stopAt": "停止信号", - "create.gui.stockswitch.stopBelow": "Stop Signal below", - - "create.schematicAndQuill.dimensions": "原理图尺寸: %1$sx%2$sx%3$s", - "create.schematicAndQuill.firstPos": "第一个位置.", - "create.schematicAndQuill.secondPos": "第二个位置.", - "create.schematicAndQuill.noTarget": "按住Ctrl选择空气方块.", - "create.schematicAndQuill.abort": "删除选择.", - "create.schematicAndQuill.prompt": "输入原理图的名称:", - "create.schematicAndQuill.fallbackName": "我的原理图", - "create.schematicAndQuill.saved": "另存为 %1$s", - - "create.schematic.invalid": "[!] 无效的项目", - "create.schematic.position": "位置", - "create.schematic.rotation": "旋转", - "create.schematic.rotation.none": "无", - "create.schematic.rotation.cw90": "顺时针90", - "create.schematic.rotation.cw180": "顺时针180", - "create.schematic.rotation.cw270": "顺时针270", - "create.schematic.mirror": "镜像", - "create.schematic.mirror.none": "无", - "create.schematic.mirror.frontBack": "前后", - "create.schematic.mirror.leftRight": "左右", - - "create.schematic.tool.deploy": "部署", - "create.schematic.tool.move": "移动 XZ", - "create.schematic.tool.movey": "移动 Y", - "create.schematic.tool.rotate": "旋转", - "create.schematic.tool.print": "打印", - "create.schematic.tool.flip": "翻转", - - "create.schematic.tool.deploy.description.0": "将结构移到某个位置.", - "create.schematic.tool.deploy.description.1": "在地面上单击鼠标右键以放置.", - "create.schematic.tool.deploy.description.2": "按住Ctrl以固定距离选择.", - "create.schematic.tool.deploy.description.3": "按住Ctrl鼠标滚动更改距离.", - "create.schematic.tool.move.description.0": "水平移动原理图", - "create.schematic.tool.move.description.1": "选定原理图,然后按住Ctrl鼠标滚动移动.", - "create.schematic.tool.move.description.2": "", - "create.schematic.tool.move.description.3": "", - "create.schematic.tool.movey.description.0": "垂直移动原理图", - "create.schematic.tool.movey.description.1": "按住Ctrl鼠标滚动上下移动", - "create.schematic.tool.movey.description.2": "", - "create.schematic.tool.movey.description.3": "", - "create.schematic.tool.rotate.description.0": "围绕原理图中心旋转原理图.", - "create.schematic.tool.rotate.description.1": "按住Ctrl鼠标滚动旋转90度", - "create.schematic.tool.rotate.description.2": "", - "create.schematic.tool.rotate.description.3": "", - "create.schematic.tool.print.description.0": "立即将结构放置在世界上", - "create.schematic.tool.print.description.1": "右键单机确认当前位置.", - "create.schematic.tool.print.description.2": "该工具仅适用于创造模式.", - "create.schematic.tool.print.description.3": "", - "create.schematic.tool.flip.description.0": "沿你选择的面翻转原理图.", - "create.schematic.tool.flip.description.1": "指向原理图,然后按住Ctrl鼠标滚动将其翻转.", - "create.schematic.tool.flip.description.2": "", - "create.schematic.tool.flip.description.3": "", - - "create.schematics.synchronizing": "正在同步...", - "create.schematics.uploadTooLarge": "你的原理图太大", - "create.schematics.maxAllowedSize": "允许的最大原理图文件大小为:", - - "create.gui.schematicTable.title": "原理图桌", - "create.gui.schematicTable.availableSchematics": "可用原理图", - "create.gui.schematicTable.noSchematics": "没有保存的原理图", - "create.gui.schematicTable.uploading": "正在上传...", - "create.gui.schematicTable.finished": "上传完成!", - - "create.gui.schematicannon.title": "原理图加农炮", - "create.gui.schematicannon.settingsTitle": "放置设置", - "create.gui.schematicannon.listPrinter": "物品清单打印机", - "create.gui.schematicannon.gunpowderLevel": "火药 %1$s%%", - "create.gui.schematicannon.shotsRemaining": "发射进度: %1$s", - "create.gui.schematicannon.shotsRemainingWithBackup": "备份: %1$s", - "create.gui.schematicannon.optionEnabled": "当前启用", - "create.gui.schematicannon.optionDisabled": "当前禁用", - "create.gui.schematicannon.option.dontReplaceSolid": "不要替换实体方块", - "create.gui.schematicannon.option.replaceWithSolid": "用普通方块替换实体方块", - "create.gui.schematicannon.option.replaceWithAny": "用任何方块替换", - "create.gui.schematicannon.option.replaceWithEmpty": "用方块替换空气", - "create.gui.schematicannon.option.skipMissing": "绕过缺少的方块", - "create.gui.schematicannon.option.skipTileEntities": "保护存储方块", - - "create.gui.schematicannon.option.skipMissing.description": "如果原理图无法找到所需的放置块,它将在下一个位置继续(译者:看不懂可以直接看视频,因为我也看不懂...).", - "create.gui.schematicannon.option.skipTileEntities.description": "原理图将避免更换存储方块,如箱子.", - "create.gui.schematicannon.option.dontReplaceSolid.description": "加农炮将永远不会替换工作范围内的任何实体方块.", - "create.gui.schematicannon.option.replaceWithSolid.description": "如果原理图在其工作范围内包含实体方块,则加农炮将仅替换实体方块.", - "create.gui.schematicannon.option.replaceWithAny.description": "如果原理图在其工作范围内包含任何块,则加农炮将替换实体方块.", - "create.gui.schematicannon.option.replaceWithEmpty.description": "加农炮将清除其工作范围内的所有阻碍物,包括被空气取代的障碍.", - - "create.schematicannon.status.idle": "闲置", - "create.schematicannon.status.ready": "准备", - "create.schematicannon.status.running": "运行", - "create.schematicannon.status.finished": "完成", - "create.schematicannon.status.paused": "已暂停", - "create.schematicannon.status.stopped": "停止", - "create.schematicannon.status.noGunpowder": "Out of Gunpowder", - "create.schematicannon.status.targetNotLoaded": "方块未加载", - "create.schematicannon.status.targetOutsideRange": "定位目标太远", - "create.schematicannon.status.searching": "搜索", - "create.schematicannon.status.skipping": "跳过", - "create.schematicannon.status.missingBlock": "缺少方块:", - "create.schematicannon.status.placing": "配置", - "create.schematicannon.status.clearing": "清除方块", - "create.schematicannon.status.schematicInvalid": "原理图无效", - "create.schematicannon.status.schematicNotPlaced": "原理图未部署", - "create.schematicannon.status.schematicExpired": "原理图文件已过期", - - "create.tooltip.holdKey": "按住 [%1$s]", - "create.tooltip.holdKeyOrKey": "按住 [%1$s] 或 [%2$s]", - "create.tooltip.keyShift": "Shift", - "create.tooltip.keyCtrl": "Ctrl", - - "_comment": "-------------------------] ITEM DESCRIPTIONS [------------------------------------------------", - - "item.create.example_item.tooltip": "EXAMPLE ITEM (just a marker that this tooltip exists)", - "item.create.example_item.tooltip.summary": "A brief description of the item. _Underscores_ highlight a term.", - "item.create.example_item.tooltip.condition1": "When this", - "item.create.example_item.tooltip.behaviour1": "Then this item does this. (behaviours show on shift)", - "item.create.example_item.tooltip.condition2": "And When this", - "item.create.example_item.tooltip.behaviour2": "You can add as many behaviours as you like", - "item.create.example_item.tooltip.control1": "When Ctrl pressed", - "item.create.example_item.tooltip.action1": "These controls are displayed.", - - "item.create.symmetry_wand.tooltip": "SYMMETRY WAND", - "item.create.symmetry_wand.tooltip.summary": "完美地映射你在已配置平面上的方块放置.", - "item.create.symmetry_wand.tooltip.condition1": "当在热键栏时", - "item.create.symmetry_wand.tooltip.behaviour1": "保持活跃", - "item.create.symmetry_wand.tooltip.control1": "当右键地面时", - "item.create.symmetry_wand.tooltip.action1": "创建或移动镜子", - "item.create.symmetry_wand.tooltip.control2": "当右键空气时", - "item.create.symmetry_wand.tooltip.action2": "删除镜子", - "item.create.symmetry_wand.tooltip.control3": "当潜行右键时", - "item.create.symmetry_wand.tooltip.action3": "打开gui界面", - - "item.create.placement_handgun.tooltip": "BLOCKZAPPER", - "item.create.placement_handgun.tooltip.summary": "新颖的小工具,可以远距离放置或更换方块.", - "item.create.placement_handgun.tooltip.control1": "当左键方块时", - "item.create.placement_handgun.tooltip.action1": "设定放置此方块.", - "item.create.placement_handgun.tooltip.control2": "当右键方块时", - "item.create.placement_handgun.tooltip.action2": "放置或替换目标方块.", - "item.create.placement_handgun.tooltip.control3": "当潜行右键时", - "item.create.placement_handgun.tooltip.action3": "打开gui界面", - - "item.create.tree_fertilizer.tooltip": "TREE FERTILIZER", - "item.create.tree_fertilizer.tooltip.summary": "适用于常见树木的快速肥料", - "item.create.tree_fertilizer.tooltip.condition1": "在树苗上使用时", - "item.create.tree_fertilizer.tooltip.behaviour1": "无论生长时间多少,直接长大", - - "block.create.cocoa_log.tooltip": "COCOA LOG", - "block.create.cocoa_log.tooltip.summary": "增强的可可豆丛林木,更方便实现可可豆自动化", - "block.create.cocoa_log.tooltip.condition1": "成熟时", - "block.create.cocoa_log.tooltip.behaviour1": "四面生长可可豆", - - "item.create.empty_blueprint.tooltip": "EMPTY SCHEMATIC", - "item.create.empty_blueprint.tooltip.summary": "可作为合成材料或在原理图桌使用", - - "item.create.blueprint.tooltip": "SCHEMATIC", - "item.create.blueprint.tooltip.summary": "可以放置在世界中的结构,根据需要放置全息图,并使用原理图加农炮进行构建.", - "item.create.blueprint.tooltip.condition1": "当全息图存在时", - "item.create.blueprint.tooltip.behaviour1": "可以使用屏幕上的工具定位", - "item.create.blueprint.tooltip.control1": "当潜行右键时", - "item.create.blueprint.tooltip.action1": "打开一个用于输入精确坐标的界面.", - - "item.create.blueprint_and_quill.tooltip": "SCHEMATIC AND QUILL", - "item.create.blueprint_and_quill.tooltip.summary": "用于将世界中的结构保存到.nbt文件.", - "item.create.blueprint_and_quill.tooltip.condition1": "第一步", - "item.create.blueprint_and_quill.tooltip.behaviour1": "手持原理图与右键旋转两个点", - "item.create.blueprint_and_quill.tooltip.condition2": "第二步", - "item.create.blueprint_and_quill.tooltip.behaviour2": "按住Ctrl鼠标滚轮选择选区大小,右键空白处保存.", - "item.create.blueprint_and_quill.tooltip.control1": "右键", - "item.create.blueprint_and_quill.tooltip.action1": "选取点/确认保存", - "item.create.blueprint_and_quill.tooltip.control2": "按住Ctrl鼠标滚轮", - "item.create.blueprint_and_quill.tooltip.action2": "在空中选择点滚动以调整距离。", - "item.create.blueprint_and_quill.tooltip.control3": "当潜行右键时", - "item.create.blueprint_and_quill.tooltip.action3": "重置并删除选区.", - - "block.create.creative_crate.tooltip": "CREATIVE CRATE", - "block.create.creative_crate.tooltip.summary": "为相邻的原理图加农炮提供无限能量的方块", - - "block.create.schematicannon.tooltip": "SCHEMATICANNON", - "block.create.schematicannon.tooltip.summary": "发射方块以在世界中重新构建已部署的全息图,使用相邻箱子中的物品及火药作为燃料.", - "block.create.schematicannon.tooltip.control1": "当右键时", - "block.create.schematicannon.tooltip.action1": "打开gui界面", - - "block.create.schematic_table.tooltip": "SCHEMATIC TABLE", - "block.create.schematic_table.tooltip.summary": "将保存的原理图图写入空白原理图", - "block.create.schematic_table.tooltip.condition1": "放入空白原理图时", - "block.create.schematic_table.tooltip.behaviour1": "从Schematics文件夹上传所选文件", - - "block.create.shaft.tooltip": "SHAFT", - "block.create.shaft.tooltip.summary": "传动杆.", - - "block.create.cogwheel.tooltip": "COGWHEEL", - "block.create.cogwheel.tooltip.summary": "传动结构之一.", - - "block.create.large_cogwheel.tooltip": "LARGE COGWHEEL", - "block.create.large_cogwheel.tooltip.summary": "大号齿轮传动结构,连接到小型齿轮时改变其转速.", - - "block.create.encased_shaft.tooltip": "ENCASED SHAFT", - "block.create.encased_shaft.tooltip.summary": "一字齿轮传动结构.", - - "block.create.gearbox.tooltip": "GEARBOX", - "block.create.gearbox.tooltip.summary": "十字传动旋转结构.", - - "block.create.gearshift.tooltip": "GEARSHIFT", - "block.create.gearshift.tooltip.summary": "用于传动的可控旋转开关.", - "block.create.gearshift.tooltip.condition1": "当提供红石信号时", - "block.create.gearshift.tooltip.behaviour1": "更改旋转方向.", - - "block.create.clutch.tooltip": "CLUTCH", - "block.create.clutch.tooltip.summary": "传动控制装置.", - "block.create.clutch.tooltip.condition1": "当提供红石信号时", - "block.create.clutch.tooltip.behaviour1": "停止另一侧的旋转.", - - "block.create.encased_belt.tooltip": "ENCASED_BELT", - "block.create.encased_belt.tooltip.summary": "通过此方块传递动力,比如将动力传递到连接的传送带.", - "block.create.encased_belt.tooltip.condition1": "连接到其他传动或装置时", - "block.create.encased_belt.tooltip.behaviour1": "将具有完全相同的转速和方向.", - - "item.create.belt_connector.tooltip": "BELT CONNECTOR", - "item.create.belt_connector.tooltip.summary": "用传送带连接传动杆,连接的传动杆将具有完全相同的转速和方向.传送带可以传输实体.", - "item.create.belt_connector.tooltip.control1": "当右键传动杆时", - "item.create.belt_connector.tooltip.action1": "选择传动杆作为传送带的传输点,选定的两个传动杆都必须相互垂直,水平或对角平齐.", - "item.create.belt_connector.tooltip.control2": "当潜行右键时", - "item.create.belt_connector.tooltip.action2": "重置传送带的第一个选定位置", - - "block.create.belt_support.tooltip": "BELT SUPPORT", - "block.create.belt_support.tooltip.summary": "纯粹的装饰块.", - "block.create.belt_support.tooltip.condition1": "当放置在传送带下方时", - "block.create.belt_support.tooltip.behaviour1": "支撑传送带顶部,隐藏下半部分.", - - "block.create.motor.tooltip": "MOTOR", - "block.create.motor.tooltip.summary": "可以配置的无限动力来源", - - "block.create.water_wheel.tooltip": "WATER WHEEL", - "block.create.water_wheel.tooltip.summary": "从相邻的流水中获得动力", - - "block.create.encased_fan.tooltip": "ENCASED FAN", - "block.create.encased_fan.tooltip.summary": "有多种用途,主要可以将动力转化为气流.", - "block.create.encased_fan.tooltip.condition1": "在下方点火时", - "block.create.encased_fan.tooltip.behaviour1": "可为连结的传动结构提供动力(热力>动力)", - "block.create.encased_fan.tooltip.condition2": "当旋转时", - "block.create.encased_fan.tooltip.behaviour2": "一面推动实体,一面吸引实体,强度和速度取决于给予的动力.", - "block.create.encased_fan.tooltip.condition3": "当气流通过火,水,岩浆时", - "block.create.encased_fan.tooltip.behaviour3": "获得相应产物(建议配合jei查看).", - - "block.create.turntable.tooltip": "TURNTABLE", - "block.create.turntable.tooltip.summary": "一个普通的转盘.", - - "block.create.crushing_wheel.tooltip": "CRUSHING WHEEL", - "block.create.crushing_wheel.tooltip.summary": "用于建造多方块粉碎机,粉碎轮的齿必须以相同的速度朝相对的方向旋转才可处理各种物品的粉碎合成.", - "block.create.crushing_wheel.tooltip.condition1": "当两个粉碎轮一起运作时", - "block.create.crushing_wheel.tooltip.behaviour1": "粉碎物品并获得相应产物(建议配合jei查看)", - - "block.create.mechanical_press.tooltip": "MECHANICAL PRESS", - "block.create.mechanical_press.tooltip.summary": "一个强里的活塞,用于压制其下方的物品.", - "block.create.mechanical_press.tooltip.condition1": "当提供红石信号时", - "block.create.mechanical_press.tooltip.behaviour1": "压制其下方的物品.", - "block.create.mechanical_press.tooltip.condition2": "在传送带上方时", - "block.create.mechanical_press.tooltip.behaviour2": "自动压缩经过传送带的物品.", - - "block.create.mechanical_piston.tooltip": "MECHANICAL PISTON", - "block.create.mechanical_piston.tooltip.summary": "活塞的高级版本,使用机械动力精确移动粘贴的方块,背面可放置活塞杆延长活塞范围,没有活塞杆将不会工作,使用机壳底盘可以移动多行.", - "block.create.mechanical_piston.tooltip.condition1": "推拉活塞时", - "block.create.mechanical_piston.tooltip.behaviour1": "速度和方向与转速相关.", - - "block.create.sticky_mechanical_piston.tooltip": "STICKY MECHANICAL PISTON", - "block.create.sticky_mechanical_piston.tooltip.summary": "粘性活塞的高级版本,使用机械动力精确移动粘贴的方块,背面可放置活塞杆延长活塞范围,没有活塞杆将不会工作,使用机壳底盘可以移动多行.", - "block.create.sticky_mechanical_piston.tooltip.condition1": "推拉活塞时", - "block.create.sticky_mechanical_piston.tooltip.behaviour1": "速度和方向与转速相关.", - - "block.create.piston_pole.tooltip": "PISTON POLE", - "block.create.piston_pole.tooltip.summary": "用于增加动力活塞范围", - "block.create.piston_pole.tooltip.condition1": "当连接到动力活塞时", - "block.create.piston_pole.tooltip.behaviour1": "活塞的延伸范围将扩大", - - "block.create.mechanical_bearing.tooltip": "MECHANICAL BEARING", - "block.create.mechanical_bearing.tooltip.summary": "用于建造旋转的大型风力动能结构,比如风车.", - "block.create.mechanical_bearing.tooltip.condition1": "当旋转时", - "block.create.mechanical_bearing.tooltip.behaviour1": "就是旋转啊还能怎么样....", - "block.create.mechanical_bearing.tooltip.condition2": "给予红石信号时", - "block.create.mechanical_bearing.tooltip.behaviour2": "开始旋转并为连接的传动方块提供动力(此结构需使用羊毛建造).", - - "block.create.translation_chassis.tooltip": "TRANSLATION CHASSIS", - "block.create.translation_chassis.tooltip.summary": "动力活塞移动的多方块结构基础,这种方块须在活塞前面第一层放置.", - "block.create.translation_chassis.tooltip.condition1": "由动力活塞推动时", - "block.create.translation_chassis.tooltip.behaviour1": "朝相同的方向移动所有连接在一起的机壳底盘;当活塞缩回时,只拉回底盘表面设置数量的方块(详情见Ctrl).", - "block.create.translation_chassis.tooltip.control1": "当用史莱姆球右键时", - "block.create.translation_chassis.tooltip.action1": "变为粘性机壳底盘.", - - "block.create.rotation_chassis.tooltip": "ROTATION CHASSIS", - "block.create.rotation_chassis.tooltip.summary": "使用旋转底盘是旋转结构必须的", - "block.create.rotation_chassis.tooltip.condition1": "当旋转时", - "block.create.rotation_chassis.tooltip.behaviour1": "在其周围的配置范围内旋转所有粘贴到粘性面的方块(详情见Ctrl).", - "block.create.rotation_chassis.tooltip.control1": "当用史莱姆球右键时", - "block.create.rotation_chassis.tooltip.action1": "当底盘旋转同时旋转所有粘贴到粘性面的方块.", - - "block.create.drill.tooltip": "MECHANICAL DRILL", - "block.create.drill.tooltip.summary": "用于破坏方块的装置", - "block.create.drill.tooltip.condition1": "当旋转时", - "block.create.drill.tooltip.behaviour1": "破化正前方的方块,且伤害在一定范围内生物及玩家.", - "block.create.drill.tooltip.condition2": "由动力活塞推动时", - "block.create.drill.tooltip.behaviour2": "横向或纵向破坏相当于活塞杆长度的方块.", - - "block.create.harvester.tooltip": "MECHANICAL HARVESTER", - "block.create.harvester.tooltip.summary": "适用于中型作物自动化的收割机", - "block.create.harvester.tooltip.condition1": "由动力活塞推动时", - "block.create.harvester.tooltip.behaviour1": "收割机移动至成熟作物收割作物并将作物变为初始生长状态.", - - "block.create.stockswitch.tooltip": "STOCKSWITCH", - "block.create.stockswitch.tooltip.summary": "根据连接的容器存储空间大小切换红石信号强度.", - "block.create.stockswitch.tooltip.condition1": "低于下限时", - "block.create.stockswitch.tooltip.behaviour1": "停止提供红石信号", - "block.create.stockswitch.tooltip.condition2": "超过上限时", - "block.create.stockswitch.tooltip.behaviour2": "开始提供红石信号,直到再次到达下限.", - "block.create.stockswitch.tooltip.control1": "当右键方块时", - - "block.create.redstone_bridge.tooltip": "REDSTONE LINK", - "block.create.redstone_bridge.tooltip.summary": "无线红石信号终端,可以使用任何物品编辑终端频道,但距离有限.", - "block.create.redstone_bridge.tooltip.condition1": "当启用时", - "block.create.redstone_bridge.tooltip.behaviour1": "接收相同频道提供的红石信号.", - "block.create.redstone_bridge.tooltip.control1": "当右键方块时", - "block.create.redstone_bridge.tooltip.action1": "手持任意物品为其设置频道,可以组合两个物品.", - "block.create.redstone_bridge.tooltip.control2": "当潜行右键方块时", - "block.create.redstone_bridge.tooltip.action2": "在终端模式和接收模式之间切换.", - - "block.create.contact.tooltip": "REDSTONE CONTACT", - "block.create.contact.tooltip.summary": "一种用于高级红石装置的设备.", - "block.create.contact.tooltip.condition1": "当正对面放置也放置信号检测器时", - "block.create.contact.tooltip.behaviour1": "提供红石信号", - "block.create.contact.tooltip.condition2": "", - "block.create.contact.tooltip.behaviour2": "", - - "block.create.flexcrate.tooltip": "FLEXCRATE", - "block.create.flexcrate.tooltip.summary": "该箱子允许对其容量进行调整,最大可以容纳16组物品.", - "block.create.flexcrate.tooltip.control1": "当右键方块时", - "block.create.flexcrate.tooltip.action1": "打开箱子", - - "block.create.extractor.tooltip": "EXTRACTOR", - "block.create.extractor.tooltip.summary": "从连接的箱子里自动将物品输出到外面,可以设置白名单过滤.", - "block.create.extractor.tooltip.condition1": "当提供红石信号时", - "block.create.extractor.tooltip.behaviour1": "暂停自动输出", - "block.create.extractor.tooltip.action1": "将当前持有的物品设置为物品过滤白名单", - - "block.create.linked_extractor.tooltip": "LINKED EXTRACTOR", - "block.create.linked_extractor.tooltip.summary": "从连接的箱子里自动将物品输出到外面,可以设置白名单过滤,直到上一次输出的物品被清空才会再次输出,可以使用无线红石信号终端控制.", - "block.create.linked_extractor.tooltip.condition1": "当无线红石信号激活时", - "block.create.linked_extractor.tooltip.behaviour1": "暂停输出物品", - "block.create.linked_extractor.tooltip.control1": "右键方块时", - "block.create.linked_extractor.tooltip.action1": "将当前持有的物品数量的物品设置为物品过滤白名单且输出此数量的物品.", - "block.create.linked_extractor.tooltip.control2": "当右键方块侧面时", - "block.create.linked_extractor.tooltip.action2": "手持任意物品为其设置频道,将接收无线红石终端相应频道,可以组合两个物品.", - - "block.create.belt_funnel.tooltip": "BELT FUNNEL", - "block.create.belt_funnel.tooltip.summary": "接收传送带上的物品到连接的储存空间,必须放置在正对传送带的方向及高度.", - - "block.create.entity_detector.tooltip": "BELT OBSERVER", - "block.create.entity_detector.tooltip.summary": "检测前方传送带上的物品经过时输出红石信号,比如在上方放置活塞.", - "block.create.entity_detector.tooltip.condition1": "当物品和过滤器相匹配时", - "block.create.entity_detector.tooltip.behaviour1": "提供一个短暂的红石信号,空置过滤器匹配所有通过的物品.", - "block.create.entity_detector.tooltip.control1": "右键方块时", - "block.create.entity_detector.tooltip.action1": "将当前持有的物品设置为物品过滤白名单,将只会对此物品做出反应(指红石信号.", - - "block.create.pulse_repeater.tooltip": "PULSE REPEATER", - "block.create.pulse_repeater.tooltip.summary": "一个简单的电路,将通过的红石信号变为1tick.", - - "block.create.flexpeater.tooltip": "FLEX REPEATER", - "block.create.flexpeater.tooltip.summary": "高级中继器,最大可设置30分钟延迟", - - "itemGroup.create": "机械动力" -} + "block.create.encased_belt": "连携齿轮箱", + "block.create.encased_shaft": "齿轮箱", + "block.create.encased_fan": "鼓风机", + "block.create.adjustable_pulley": "高级连携齿轮箱", + "block.create.nozzle": "分散网", + "block.create.hand_crank": "曲柄", + "block.create.cuckoo_clock": "布谷鸟鸣钟", + "block.create.creative_motor": "动力马达", + "block.create.belt": "传送带", + "block.create.crushing_wheel": "粉碎轮", + "block.create.drill": "动力钻头", + "block.create.portable_storage_interface": "移动式储物接口", + "block.create.harvester": "收割机", + "block.create.saw": "切割机", + "block.create.water_wheel": "水车", + "block.create.mechanical_press": "辊压机", + "block.create.mechanical_mixer": "搅拌器", + "block.create.deployer": "机械手", + "block.create.basin": "工作盆", + "block.create.mechanical_crafter": "机械制造机", + "block.create.flywheel": "飞轮", + "block.create.furnace_engine": "熔炉引擎", + "block.create.speed_gauge": "速度表", + "block.create.stress_gauge": "应力表", + "block.create.cart_assembler": "矿车装配器", + "block.create.analog_lever": "可调节推杆", + "block.create.rotation_speed_controller": "旋转速度控制器", + + "block.create.sticky_mechanical_piston": "粘性动力活塞", + "block.create.mechanical_piston": "动力活塞", + "block.create.mechanical_piston_head": "Mechanical Piston Head", + "block.create.piston_pole": "活塞杆", + "block.create.mechanical_bearing": "动力轴承", + "block.create.clockwork_bearing": "时钟轴承", + "block.create.rope_pulley": "绳索滑轮", + "block.create.rope": "Rope", + "block.create.pulley_magnet": "Pulley Magnet", + "block.create.translation_chassis": "机壳底盘", + "block.create.rotation_chassis": "旋转底盘", + + "block.create.contact": "信号检测器", + "block.create.redstone_bridge": "无线红石信号终端", + "block.create.stockswitch": "存储检测器", + "block.create.flexcrate": "板条箱", + "block.create.extractor": "提取器", + "block.create.belt_funnel": "传送带漏斗", + "block.create.linked_extractor": "无线提取器", + "block.create.transposer": "传输器", + "block.create.linked_transposer": "无线传输器", + "block.create.pulse_repeater": "脉冲中继器", + "block.create.flexpulsepeater": "高级脉冲中继器", + "block.create.redstone_latch": "锁存器", + "block.create.toggle_latch": "T触发器", + "block.create.flexpeater": "高级中继器", + "block.create.entity_detector": "传送带观察者", + "block.create.logistical_casing": "Logistical Casing", + "block.create.logistical_controller": "Logistical Controller", + "block.create.logistical_index": "Logistical Index", + "block.create.logisticians_table": "Logistician's Table", + "block.create.package_funnel": "Package Funnel", + "block.create.belt_tunnel": "传送带隧道", + "block.create.sequenced_gearshift": "可编程齿轮箱", + + "block.create.tiled_glass": "玻璃瓦", + "block.create.framed_glass": "大型玻璃窗", + "block.create.vertical_framed_glass": "竖直玻璃窗", + "block.create.horizontal_framed_glass": "水平玻璃窗", + "block.create.oak_glass": "橡木窗", + "block.create.spruce_glass": "云杉木窗", + "block.create.birch_glass": "桦木窗", + "block.create.jungle_glass": "从林木窗", + "block.create.dark_oak_glass": "深色橡木窗", + "block.create.acacia_glass": "合金欢木窗", + "block.create.iron_glass": "华丽的铁窗", + + "block.create.tiled_glass_pane": "玻璃瓦片板", + "block.create.framed_glass_pane": "大型玻璃窗板", + "block.create.vertical_framed_glass_pane": "竖直玻璃窗板", + "block.create.horizontal_framed_glass_pane": "水平玻璃窗板", + "block.create.oak_glass_pane": "橡木窗板", + "block.create.spruce_glass_pane": "云杉木窗板", + "block.create.birch_glass_pane": "桦木窗板", + "block.create.jungle_glass_pane": "从林木窗板", + "block.create.dark_oak_glass_pane": "深色橡木窗板", + "block.create.acacia_glass_pane": "合金欢木窗板", + "block.create.iron_glass_pane": "华丽的铁窗板", + + "block.create.window_in_a_block": "玻璃板块", + "block.create.andesite_bricks": "安山岩石砖", + "block.create.andesite_layers": "层叠安山岩", + "block.create.diorite_bricks": "闪长岩石砖", + "block.create.diorite_layers": "层叠闪长岩", + "block.create.granite_bricks": "花岗岩石砖", + "block.create.granite_layers": "层叠花岗岩", + + "block.create.gabbro": "辉长岩", + "block.create.gabbro_stairs": "辉长岩楼梯", + "block.create.gabbro_slab": "辉长岩台阶", + "block.create.gabbro_wall": "辉长岩墙", + "block.create.polished_gabbro": "磨制辉长岩", + "block.create.gabbro_bricks": "辉长岩石砖", + "block.create.gabbro_bricks_stairs": "辉长岩石砖楼梯", + "block.create.gabbro_bricks_wall": "辉长岩石砖墙", + "block.create.paved_gabbro_bricks": "辉长岩砖块", + "block.create.paved_gabbro_bricks_slab": "辉长岩砖块台阶", + "block.create.indented_gabbro": "平滑辉长岩石砖", + "block.create.indented_gabbro_slab": "平滑辉长岩石砖台阶", + "block.create.slightly_mossy_gabbro_bricks": "辉长岩苔石砖", + "block.create.mossy_gabbro_bricks": "辉长岩苔藓石砖", + "block.create.gabbro_layers": "层叠辉长岩", + + "block.create.weathered_limestone": "风化石灰石", + "block.create.weathered_limestone_stairs": "风化石灰石楼梯", + "block.create.weathered_limestone_wall": "风化石灰石墙", + "block.create.weathered_limestone_slab": "风化石灰石台阶", + "block.create.polished_weathered_limestone": "磨制风化 石灰石", + "block.create.polished_weathered_limestone_slab": "磨制风化石灰石台阶", + "block.create.weathered_limestone_bricks": "风化石灰石砖", + "block.create.weathered_limestone_bricks_stairs": "风化石灰石砖楼梯", + "block.create.weathered_limestone_bricks_wall": "风化石灰石砖墙", + "block.create.weathered_limestone_bricks_slab": "风化石灰石砖台阶", + "block.create.weathered_limestone_pillar": "风化石灰石柱", + "block.create.weathered_limestone_layers": "层叠风化石灰石", + + "block.create.dolomite_pillar": "白云岩柱", + "block.create.dolomite": "白云岩", + "block.create.dolomite_stairs": "白云岩楼梯", + "block.create.dolomite_wall": "白云岩墙", + "block.create.dolomite_slab": "白云岩台阶", + "block.create.dolomite_bricks": "白云岩石砖", + "block.create.dolomite_bricks_wall": "白云岩石砖墙", + "block.create.dolomite_bricks_stairs": "白云岩石砖楼梯", + "block.create.dolomite_bricks_slab": "白云岩石砖台阶", + "block.create.polished_dolomite": "磨制白云岩", + "block.create.dolomite_layers": "层叠白云岩", + + "block.create.limesand": "石灰沙", + "block.create.limestone": "石灰石", + "block.create.limestone_stairs": "石灰石楼梯", + "block.create.limestone_slab": "石灰石台阶", + "block.create.limestone_wall": "石灰石墙", + "block.create.limestone_bricks": "石灰石砖", + "block.create.limestone_bricks_stairs": "石灰石砖楼梯", + "block.create.limestone_bricks_slab": "石灰石砖台阶", + "block.create.limestone_bricks_wall": "石灰石砖墙", + "block.create.polished_limestone": "磨制石灰石", + "block.create.polished_limestone_slab": "磨制石灰石台阶", + "block.create.limestone_pillar": "石灰石柱", + "block.create.limestone_layers": "层叠石灰石", + + "block.create.natural_scoria": "天然熔渣", + "block.create.scoria": "熔渣", + "block.create.scoria_stairs": "熔渣楼梯", + "block.create.scoria_slab": "熔渣台阶", + "block.create.scoria_wall": "熔渣墙", + "block.create.scoria_bricks": "熔渣砖块", + "block.create.polished_scoria": "磨制熔渣", + "block.create.polished_scoria_slab": "磨制熔渣台阶", + "block.create.scoria_pillar": "熔渣柱", + "block.create.scoria_layers": "层叠熔渣", + + "block.create.dark_scoria": "深色熔渣", + "block.create.polished_dark_scoria": "磨制深色熔渣", + "block.create.dark_scoria_tiles": "深色熔渣瓦", + "block.create.dark_scoria_tiles_stairs": "深色熔渣瓦楼梯", + "block.create.dark_scoria_tiles_slab": "深色熔渣瓦台阶", + "block.create.dark_scoria_bricks": "深色熔渣砖", + "block.create.dark_scoria_bricks_stairs": "深色熔渣砖楼梯", + "block.create.dark_scoria_bricks_slab": "深色熔渣砖台阶", + "block.create.dark_scoria_bricks_wall": "深色熔渣砖墙", + + "block.create.schematicannon": "加农炮", + "block.create.schematic_table": "Schematic桌", + "block.create.creative_crate": "Schematic创造者", + + "block.create.cocoa_log": "可可木", + + "block.create.shop_shelf": "Shelf", + + "_comment": "-------------------------] UI & MESSAGES [------------------------------------------------", + + "death.attack.create.crush": "%1$s 被压扁了", + "death.attack.create.fan_fire": "%1$s 试图接受热风的洗礼", + "death.attack.create.fan_lava": "%1$s 在接受热风的洗礼中欲火焚身", + "death.attack.create.drill": "%1$s 的钻头是突破天际的钻头", + "death.attack.create.saw": "%1$s 被圆锯切成了两截", + "create.block.deployer.damage_source_name": "a rogue Deployer", + "death.attack.create.curse_polish": "%1$s 试图祛魔时受到了诅咒", + "death.attack.create.cuckoo_clock_explosion": "%1$s被布谷鸟闹钟炸得粉身碎骨", + + "create.recipe.crushing": "批量粉碎", + "create.recipe.splashing": "批量洗涤", + "create.recipe.splashing.fan": "在鼓风机前方倒水", + "create.recipe.smokingViaFan": "批量烟熏", + "create.recipe.smokingViaFan.fan": "在鼓风机前方点火", + "create.recipe.blastingViaFan": "批量冶炼", + "create.recipe.blastingViaFan.fan": "在鼓风机前方倒岩浆", + "create.recipe.pressing": "金属压片", + "create.recipe.mixing": "混合搅拌", + "create.recipe.packing": "压块塑形", + "create.recipe.sawing": "木材切割", + "create.recipe.mechanical_crafting": "自动合成", + "create.recipe.block_cutting": "方块切割", + "create.recipe.blockzapperUpgrade": "手持式方块放置器", + "create.recipe.sandpaper_polishing": "砂纸抛光", + "create.recipe.mystery_conversion": "化合物变异", + "create.recipe.processing.catalyst": "催化剂", + "create.recipe.processing.chance": "%1$s%% 概率", + "create.recipe.processing.chanceToReturn": "%1$s%% 概率返还", + + "create.generic.range": "范围", + "create.generic.radius": "半径", + "create.generic.width": "宽度", + "create.generic.height": "高度", + "create.generic.length": "长度", + "create.generic.speed": "速度", + "create.generic.delay": "延时", + "create.generic.unit.ticks": "Ticks", + "create.generic.unit.seconds": "Seconds", + "create.generic.unit.minutes": "Minutes", + "create.generic.unit.rpm": "RPM", + "create.generic.unit.stress": "su", + "create.generic.unit.degrees": "°", + + "create.action.scroll": "滚轮", + "create.action.confirm": "确认", + "create.action.abort": "退出", + "create.action.saveToFile": "保存", + "create.action.discard": "丢弃", + + "create.keyinfo.toolmenu": "工具菜单", + + "create.gui.scrollInput.defaultTitle": "选择一个选项:", + "create.gui.scrollInput.scrollToModify": "滚动修改", + "create.gui.scrollInput.scrollToAdjustAmount": "滚动修改数量", + "create.gui.scrollInput.scrollToSelect": "滚动选择", + "create.gui.scrollInput.shiftScrollsFaster": "按住Shift滚动更快", + + "create.gui.toolmenu.focusKey": "按住 [%1$s] 鼠标滚轮选择", + "create.gui.toolmenu.cycle": "[SCROLL] 循环", + + "create.gui.symmetryWand.mirrorType": "镜子类型", + "create.gui.symmetryWand.orientation": "方向", + "create.symmetry.mirror.plane": "镜像", + "create.symmetry.mirror.doublePlane": "矩形", + "create.symmetry.mirror.triplePlane": "八角", + "create.orientation.orthogonal": "垂直", + "create.orientation.diagonal": "对角线", + "create.orientation.horizontal": "水平", + "create.orientation.alongZ": "Along Z", + "create.orientation.alongX": "Along X", + + "create.gui.blockzapper.title": "手持式方块放置机", + "create.gui.blockzapper.replaceMode": "更换模式", + "create.gui.blockzapper.searchDiagonal": "根据对角线", + "create.gui.blockzapper.searchFuzzy": "忽视边界", + "create.gui.blockzapper.range": "扩散范围", + "create.gui.blockzapper.needsUpgradedAmplifier": "需要升级扩散器", + "create.gui.blockzapper.patternSection": "模式", + "create.gui.blockzapper.pattern.solid": "实心", + "create.gui.blockzapper.pattern.checkered": "棋盘", + "create.gui.blockzapper.pattern.inversecheckered": "反转棋盘", + "create.gui.blockzapper.pattern.chance25": "25% ", + "create.gui.blockzapper.pattern.chance50": "50% ", + "create.gui.blockzapper.pattern.chance75": "75% ", + + "create.gui.terrainzapper.title": "手持式环境塑形器", + "create.gui.terrainzapper.placement": "放置模式", + "create.gui.terrainzapper.placement.merged": "结合", + "create.gui.terrainzapper.placement.attached": "依附", + "create.gui.terrainzapper.placement.inserted": "插入", + "create.gui.terrainzapper.brush": "塑形类型", + "create.gui.terrainzapper.brush.cuboid": "矩形体", + "create.gui.terrainzapper.brush.sphere": "球体", + "create.gui.terrainzapper.brush.cylinder": "圆柱体", + "create.gui.terrainzapper.tool": "填充类型", + "create.gui.terrainzapper.tool.fill": "填充", + "create.gui.terrainzapper.tool.place": "复写", + "create.gui.terrainzapper.tool.replace": "替换", + "create.gui.terrainzapper.tool.clear": "清除", + "create.gui.terrainzapper.tool.overlay": "覆盖", + "create.gui.terrainzapper.tool.flatten": "平整", + "create.terrainzapper.shiftRightClickToSet": "Shift+鼠标右键 以设置塑形类型", + + "create.blockzapper.usingBlock": "使用: %1$s", + "create.blockzapper.componentUpgrades": "组件升级:", + "create.blockzapper.component.body": "机体", + "create.blockzapper.component.amplifier": "增大", + "create.blockzapper.component.accelerator": "加速", + "create.blockzapper.component.retriever": "寻回", + "create.blockzapper.component.scope": "范围", + "create.blockzapper.componentTier.none": "无", + "create.blockzapper.componentTier.blazebrass": "烈焰合金", + "create.blockzapper.componentTier.choruschrome": "紫颂合金", + "create.blockzapper.leftClickToSet": "左键点击方块以设定方块", + "create.blockzapper.empty": "出击!", + + "create.contraptions.movement_mode": "Movement Mode", + "create.contraptions.movement_mode.move_place": "Always Place when Stopped", + "create.contraptions.movement_mode.move_place_returned": "Place only in Starting Position", + "create.contraptions.movement_mode.move_never_place": "Place only when Anchor Destroyed", + "create.contraptions.movement_mode.rotate_place": "Always Place when Stopped", + "create.contraptions.movement_mode.rotate_place_returned": "Only Place near Initial Angle", + "create.contraptions.movement_mode.rotate_never_place": "Only Place when Anchor Destroyed", + + "create.logistics.filter": "过滤器", + "create.logistics.firstFrequency": "频道. #1", + "create.logistics.secondFrequency": "频道. #2", + + "create.gui.goggles.generator_stats": "Generator 状态:", + "create.gui.goggles.kinetic_stats": "Kinetic 状态:", + "create.gui.goggles.at_current_speed": "当前速度应力值", + "create.gui.goggles.base_value": "应力基础值", + + "create.gui.gauge.info_header": "仪表信息:", + "create.gui.speed_gauge.title": "旋转速度", + "create.gui.stress_gauge.title": "网络应力", + "create.gui.stress_gauge.capacity": "剩余应力", + "create.gui.stress_gauge.overstressed": "超载", + "create.gui.stress_gauge.no_rotation": "无旋转", + + "create.gui.contraptions.not_fast_enough": "显然 %1$s 没有足够的转速.", + + "create.gui.flexcrate.title": "板条箱", + "create.gui.flexcrate.storageSpace": "储存空间", + + "create.gui.stockswitch.title": "储存开关", + "create.gui.stockswitch.lowerLimit": "阈值下限", + "create.gui.stockswitch.upperLimit": "阈值上限", + "create.gui.stockswitch.startAt": "启动信号", + "create.gui.stockswitch.startAbove": "Start Signal above", + "create.gui.stockswitch.stopAt": "停止信号", + "create.gui.stockswitch.stopBelow": "Stop Signal below", + + "create.gui.sequenced_gearshift.title": "可编程齿轮箱", + "create.gui.sequenced_gearshift.instruction": "指令", + "create.gui.sequenced_gearshift.instruction.turn_angle": "旋转", + "create.gui.sequenced_gearshift.instruction.turn_angle.angle": "角度", + "create.gui.sequenced_gearshift.instruction.turn_distance": "驱动活塞", + "create.gui.sequenced_gearshift.instruction.turn_distance.distance": "距离", + "create.gui.sequenced_gearshift.instruction.wait": "等待", + "create.gui.sequenced_gearshift.instruction.wait.duration": "间隔", + "create.gui.sequenced_gearshift.instruction.end": "停止", + "create.gui.sequenced_gearshift.speed": "速度, 速度方向", + "create.gui.sequenced_gearshift.speed.forward": "一倍速, 正向", + "create.gui.sequenced_gearshift.speed.forward_fast": "两倍速, 正向", + "create.gui.sequenced_gearshift.speed.back": "一倍速, 反向", + "create.gui.sequenced_gearshift.speed.back_fast": "两倍速, 反向", + + "create.schematicAndQuill.dimensions": "原理图尺寸: %1$sx%2$sx%3$s", + "create.schematicAndQuill.firstPos": "第一个位置.", + "create.schematicAndQuill.secondPos": "第二个位置.", + "create.schematicAndQuill.noTarget": "按住Ctrl选择空气方块.", + "create.schematicAndQuill.abort": "删除选择.", + "create.schematicAndQuill.prompt": "输入原理图的名称:", + "create.schematicAndQuill.fallbackName": "我的原理图", + "create.schematicAndQuill.saved": "另存为 %1$s", + + "create.schematic.invalid": "[!] 无效的项目", + "create.schematic.position": "位置", + "create.schematic.rotation": "旋转", + "create.schematic.rotation.none": "无", + "create.schematic.rotation.cw90": "顺时针90", + "create.schematic.rotation.cw180": "顺时针180", + "create.schematic.rotation.cw270": "顺时针270", + "create.schematic.mirror": "镜像", + "create.schematic.mirror.none": "无", + "create.schematic.mirror.frontBack": "前后", + "create.schematic.mirror.leftRight": "左右", + + "create.schematic.tool.deploy": "部署", + "create.schematic.tool.move": "移动 XZ", + "create.schematic.tool.movey": "移动 Y", + "create.schematic.tool.rotate": "旋转", + "create.schematic.tool.print": "打印", + "create.schematic.tool.flip": "翻转", + + "create.schematic.tool.deploy.description.0": "将结构移到某个位置.", + "create.schematic.tool.deploy.description.1": "在地面上单击鼠标右键以放置.", + "create.schematic.tool.deploy.description.2": "按住Ctrl以固定距离选择.", + "create.schematic.tool.deploy.description.3": "按住Ctrl鼠标滚动更改距离.", + "create.schematic.tool.move.description.0": "水平移动原理图", + "create.schematic.tool.move.description.1": "选定原理图,然后按住Ctrl鼠标滚动移动.", + "create.schematic.tool.move.description.2": "", + "create.schematic.tool.move.description.3": "", + "create.schematic.tool.movey.description.0": "垂直移动原理图", + "create.schematic.tool.movey.description.1": "按住Ctrl鼠标滚动上下移动", + "create.schematic.tool.movey.description.2": "", + "create.schematic.tool.movey.description.3": "", + "create.schematic.tool.rotate.description.0": "围绕原理图中心旋转原理图.", + "create.schematic.tool.rotate.description.1": "按住Ctrl鼠标滚动旋转90度", + "create.schematic.tool.rotate.description.2": "", + "create.schematic.tool.rotate.description.3": "", + "create.schematic.tool.print.description.0": "立即将结构放置在世界上", + "create.schematic.tool.print.description.1": "右键单机确认当前位置.", + "create.schematic.tool.print.description.2": "该工具仅适用于创造模式.", + "create.schematic.tool.print.description.3": "", + "create.schematic.tool.flip.description.0": "沿你选择的面翻转原理图.", + "create.schematic.tool.flip.description.1": "指向原理图,然后按住Ctrl鼠标滚动将其翻转.", + "create.schematic.tool.flip.description.2": "", + "create.schematic.tool.flip.description.3": "", + + "create.schematics.synchronizing": "正在同步...", + "create.schematics.uploadTooLarge": "你的原理图太大", + "create.schematics.maxAllowedSize": "允许的最大原理图文件大小为:", + + "create.gui.schematicTable.title": "原理图桌", + "create.gui.schematicTable.availableSchematics": "可用原理图", + "create.gui.schematicTable.noSchematics": "没有保存的原理图", + "create.gui.schematicTable.uploading": "正在上传...", + "create.gui.schematicTable.finished": "上传完成!", + + "create.gui.schematicannon.title": "原理图加农炮", + "create.gui.schematicannon.settingsTitle": "放置设置", + "create.gui.schematicannon.listPrinter": "物品清单打印机", + "create.gui.schematicannon.gunpowderLevel": "火药 %1$s%%", + "create.gui.schematicannon.shotsRemaining": "发射进度: %1$s", + "create.gui.schematicannon.shotsRemainingWithBackup": "备份: %1$s", + "create.gui.schematicannon.optionEnabled": "当前启用", + "create.gui.schematicannon.optionDisabled": "当前禁用", + "create.gui.schematicannon.option.dontReplaceSolid": "不要替换实体方块", + "create.gui.schematicannon.option.replaceWithSolid": "用普通方块替换实体方块", + "create.gui.schematicannon.option.replaceWithAny": "用任何方块替换", + "create.gui.schematicannon.option.replaceWithEmpty": "用方块替换空气", + "create.gui.schematicannon.option.skipMissing": "绕过缺少的方块", + "create.gui.schematicannon.option.skipTileEntities": "保护存储方块", + + "create.gui.schematicannon.option.skipMissing.description": "如果原理图无法找到所需的放置块,它将在下一个位置继续(译者:看不懂可以直接看视频,因为我也看不懂...).", + "create.gui.schematicannon.option.skipTileEntities.description": "原理图将避免更换存储方块,如箱子.", + "create.gui.schematicannon.option.dontReplaceSolid.description": "加农炮将永远不会替换工作范围内的任何实体方块.", + "create.gui.schematicannon.option.replaceWithSolid.description": "如果原理图在其工作范围内包含实体方块,则加农炮将仅替换实体方块.", + "create.gui.schematicannon.option.replaceWithAny.description": "如果原理图在其工作范围内包含任何块,则加农炮将替换实体方块.", + "create.gui.schematicannon.option.replaceWithEmpty.description": "加农炮将清除其工作范围内的所有阻碍物,包括被空气取代的障碍.", + + "create.schematicannon.status.idle": "闲置", + "create.schematicannon.status.ready": "准备", + "create.schematicannon.status.running": "运行", + "create.schematicannon.status.finished": "完成", + "create.schematicannon.status.paused": "已暂停", + "create.schematicannon.status.stopped": "停止", + "create.schematicannon.status.noGunpowder": "Out of Gunpowder", + "create.schematicannon.status.targetNotLoaded": "方块未加载", + "create.schematicannon.status.targetOutsideRange": "定位目标太远", + "create.schematicannon.status.searching": "搜索", + "create.schematicannon.status.skipping": "跳过", + "create.schematicannon.status.missingBlock": "缺少方块:", + "create.schematicannon.status.placing": "配置", + "create.schematicannon.status.clearing": "清除方块", + "create.schematicannon.status.schematicInvalid": "原理图无效", + "create.schematicannon.status.schematicNotPlaced": "原理图未部署", + "create.schematicannon.status.schematicExpired": "原理图文件已过期", + + "create.gui.index.title": "Logistical Index", + "create.gui.index.targetAddressSelect": "Destination Address", + "create.gui.index.confirmOrder": "Confirm Order", + + "create.logistics.priority": "Priority", + "create.logistics.priority.lowest": "Lowest", + "create.logistics.priority.low": "Low", + "create.logistics.priority.high": "High", + "create.logistics.priority.highest": "Highest", + "create.gui.logistical_controller.active_mode": "Active Mode", + "create.gui.logistical_controller.passive_mode": "Passive Mode", + "create.gui.requester.requestedItemCount": "Requested Amount", + "create.gui.storage.passiveModeOnly": "Item Storage is Passive Only", + + "create.gui.filter.blacklist": "黑名单", + "create.gui.filter.blacklist.description": "只通过不在黑名单中的物品,如果黑名单为空,所有物品都可以通过", + "create.gui.filter.whitelist": "白名单", + "create.gui.filter.whitelist.description": "只通过在白名单中的物品,如果白名单为空,所有物品都无法通过", + "create.gui.filter.respect_data": "匹配物品属性", + "create.gui.filter.respect_data.description": "只有物品的耐久、附魔等其他属性相同时才可以匹配", + "create.gui.filter.ignore_data": "忽视物品属性", + "create.gui.filter.ignore_data.description": "就是跟属性无关", + + "create.item_attributes.placeable": "可放置", + "create.item_attributes.consumable": "可食用", + "create.item_attributes.enchanted": "已被附魔", + "create.item_attributes.damaged": "已损坏", + "create.item_attributes.badly_damaged": "严重受损", + "create.item_attributes.not_stackable": "无法堆叠", + "create.item_attributes.equipable": "可装备", + "create.item_attributes.furnace_fuel": "是燃料", + "create.item_attributes.in_tag": "标签是%1$s", + "create.item_attributes.in_item_group": "属于 %1$s", + "create.item_attributes.added_by": "由%1$s添加", + + "create.gui.attribute_filter.no_selected_attributes": "没有任何属性", + "create.gui.attribute_filter.selected_attributes": "已选择的属性:", + "create.gui.attribute_filter.whitelist_disjunctive": "任意匹配白名单 (Any)", + "create.gui.attribute_filter.whitelist_disjunctive.description": "只要有其中一项属性符合,就可以通过", + "create.gui.attribute_filter.whitelist_conjunctive": "全匹配白名单 (All)", + "create.gui.attribute_filter.whitelist_conjunctive.description": "只有所有属性都匹配才可以通过", + "create.gui.attribute_filter.blacklist": "黑名单", + "create.gui.attribute_filter.blacklist.description": "只要没有上述属性,就可以通过", + "create.gui.attribute_filter.add_reference_item": "添加参考物品", + + "create.tooltip.holdKey": "按住 [%1$s]", + "create.tooltip.holdKeyOrKey": "按住 [%1$s] 或 [%2$s]", + "create.tooltip.keyShift": "Shift", + "create.tooltip.keyCtrl": "Ctrl", + + "create.tooltip.speedRequirement": "需求速度: %1$s", + "create.tooltip.speedRequirement.none": "无", + "create.tooltip.speedRequirement.medium": "适当的", + "create.tooltip.speedRequirement.high": "飞快的", + + "create.tooltip.stressImpact": "应力消耗: %1$s", + "create.tooltip.stressImpact.low": "低", + "create.tooltip.stressImpact.medium": "中", + "create.tooltip.stressImpact.high": "高", + + "create.tooltip.capacityProvided": "应力容量: %1$s", + "create.tooltip.capacityProvided.low": "小", + "create.tooltip.capacityProvided.medium": "中", + "create.tooltip.capacityProvided.high": "大", + "create.tooltip.capacityProvided.asGenerator": "(作为 Generator)", + "create.tooltip.generationSpeed": "产生 %1$s %2$s", + + "create.tooltip.analogStrength": "Analog Strength: %1$s/15", + + "create.tooltip.wip": "WIP", + "create.tooltip.workInProgress": "Work in progress!", + + "create.tooltip.randomWipDescription0": "Please keep this item away from children.", + "create.tooltip.randomWipDescription1": "A baby panda dies every time you use this item. Every. Time.", + "create.tooltip.randomWipDescription2": "Use at your own risk.", + "create.tooltip.randomWipDescription3": "This is not the item you are looking for, *finger-wiggles* please disperse.", + "create.tooltip.randomWipDescription4": "This item will self-destruct in 10 seconds. 10, 9, 8...", + "create.tooltip.randomWipDescription5": "Believe me, it's useless.", + "create.tooltip.randomWipDescription6": "By using this item, you hereby consent to our disclaimer and agree to its terms.", + "create.tooltip.randomWipDescription7": "This one maybe isn't for you. What about that one?", + "create.tooltip.randomWipDescription8": "Use it and regret your decision immediately.", + + "create.mechanical_mixer.min_ingredients": "最小的物品数", + + "create.command.killTPSCommand": "killtps", + "create.command.killTPSCommand.status.slowed_by.0": "[Create]: Server tick is currently slowed by %s ms :o", + "create.command.killTPSCommand.status.slowed_by.1": "[Create]: Server tick is slowed by %s ms now >:)", + "create.command.killTPSCommand.status.slowed_by.2": "[Create]: Server tick is back to regular speed :D", + "create.command.killTPSCommand.status.usage.0": "[Create]: use /killtps stop to bring back server tick to regular speed", + "create.command.killTPSCommand.status.usage.1": "[Create]: use /killtps start to artificially slow down the server tick", + "create.command.killTPSCommand.argument.tickTime": "tickTime", + + "advancement.create:root": "机械纪元的开始", + "advancement.create:root.desc": "是时候开始创造各种机械了!", + "advancement.create:andesite_alloy": "新的材料", + "advancement.create:andesite_alloy.desc": "机械动力中有许多的材料,例如安山合金.", + "advancement.create:andesite_casing": "安山纪元", + "advancement.create:andesite_casing.desc": "使用安山合金、原木、木板可以合成一个基础箱子", + "advancement.create:crushing_wheel": "巨人兄弟", + "advancement.create:crushing_wheel.desc": "合成两个粉碎轮,用粉碎轮碾碎一些材料", + "advancement.create:rotation": "动起来了!", + "advancement.create:rotation.desc": "看看你的第一个运动的齿轮", + "advancement.create:overstressed": "超载", + "advancement.create:overstressed.desc": "第一次尝到超载的滋味", + "advancement.create:sand_paper": "抛光", + "advancement.create:sand_paper.desc": "用砂纸让方块更加光滑", + "advancement.create:polished_rose_quartz": "粉色钻石", + "advancement.create:polished_rose_quartz.desc": "将玫瑰石英抛光到能够透过光线", + "advancement.create:sand_paper_secret": "升级抛光", + "advancement.create:sand_paper_secret.desc": "用你的砂纸去抛光砂纸", + "advancement.create:press": "Duang!", + "advancement.create:press.desc": "用压片机去碾压你的材料", + "advancement.create:mixer": "搅拌~搅拌~", + "advancement.create:mixer.desc": "制造一个搅拌器", + "advancement.create:brass": "真的合金", + "advancement.create:brass.desc": "使用铜和锌合成黄铜", + "advancement.create:brass_casing": "黄铜纪元", + "advancement.create:brass_casing.desc": "用黄铜来合成新的箱子", + "advancement.create:deployer": "第三只手", + "advancement.create:deployer.desc": "创造一个机械手,让它工作起来", + "advancement.create:deployer_secret": "别打了别打了!", + "advancement.create:deployer_secret.desc": "让两个机械手互相挥拳", + "advancement.create:chromatic_compound": "两极材料", + "advancement.create:chromatic_compound.desc": "创造一个谜之化合物", + "advancement.create:shadow_steel": "没有收获?", + "advancement.create:shadow_steel.desc": "获得一种来自虚空的材料——暗影金属", + "advancement.create:refined_radiance": "光辉照耀", + "advancement.create:refined_radiance.desc": "获得一个光辉石, 充满着光辉的物质", + "advancement.create:refined_radiance_secret": "用光明来锻造", + "advancement.create:refined_radiance_secret.desc": "找到另一种获得光辉石的方法", + "advancement.create:speed_secret": "车速太快了", + "advancement.create:speed_secret.desc": "速度表显示的数值超过69 rpm.", + + "create.subtitle.schematicannon_launch_block": "Schematicannon shoots", + "create.subtitle.schematicannon_finish": "Schematicannon finishes", + "create.subtitle.slime_added": "Slime squishes", + "create.subtitle.mechanical_press_activation": "Mechanical Press activates", + "create.subtitle.mechanical_press_item_break": "Metal clanks", + "create.subtitle.blockzapper_place": "Blocks zap into place", + "create.subtitle.blockzapper_confirm": "Affirmative Ding", + "create.subtitle.blockzapper_deny": "Declining Boop", + "create.subtitle.block_funnel_eat": "Funnel CHOMPS", + + "_comment": "-------------------------] ITEM DESCRIPTIONS [------------------------------------------------", + + "item.create.example_item.tooltip": "EXAMPLE ITEM (just a marker that this tooltip exists)", + "item.create.example_item.tooltip.summary": "A brief description of the item. _Underscores_ highlight a term.", + "item.create.example_item.tooltip.condition1": "When this", + "item.create.example_item.tooltip.behaviour1": "Then this item does this. (behaviours show on shift)", + "item.create.example_item.tooltip.condition2": "And When this", + "item.create.example_item.tooltip.behaviour2": "You can add as many behaviours as you like", + "item.create.example_item.tooltip.control1": "When Ctrl pressed", + "item.create.example_item.tooltip.action1": "These controls are displayed.", + + "item.create.symmetry_wand.tooltip": "SYMMETRY WAND", + "item.create.symmetry_wand.tooltip.summary": "完美地映射你在已配置平面上的方块放置.", + "item.create.symmetry_wand.tooltip.condition1": "当在热键栏时", + "item.create.symmetry_wand.tooltip.behaviour1": "保持活跃", + "item.create.symmetry_wand.tooltip.control1": "当右键地面时", + "item.create.symmetry_wand.tooltip.action1": "创建或移动镜子", + "item.create.symmetry_wand.tooltip.control2": "当右键空气时", + "item.create.symmetry_wand.tooltip.action2": "删除镜子", + "item.create.symmetry_wand.tooltip.control3": "当潜行右键时", + "item.create.symmetry_wand.tooltip.action3": "打开gui界面", + + "item.create.placement_handgun.tooltip": "BLOCKZAPPER", + "item.create.placement_handgun.tooltip.summary": "新颖的小工具,可以远距离放置或更换方块.", + "item.create.placement_handgun.tooltip.control1": "当左键方块时", + "item.create.placement_handgun.tooltip.action1": "设定放置此方块.", + "item.create.placement_handgun.tooltip.control2": "当右键方块时", + "item.create.placement_handgun.tooltip.action2": "放置或替换目标方块.", + "item.create.placement_handgun.tooltip.control3": "当潜行右键时", + "item.create.placement_handgun.tooltip.action3": "打开gui界面", + + "item.create.terrain_zapper.tooltip": "HANDHELD WORLDSHAPER", + "item.create.terrain_zapper.tooltip.summary": "创造大陆和山脉的手持工具", + "item.create.terrain_zapper.tooltip.control1": "当左键方块时", + "item.create.terrain_zapper.tooltip.action1": "设定放置此方块", + "item.create.terrain_zapper.tooltip.control2": "当右键方块时", + "item.create.terrain_zapper.tooltip.action2": "放置或替换目标方块", + "item.create.terrain_zapper.tooltip.control3": "当潜行右键时", + "item.create.terrain_zapper.tooltip.action3": "打开工具的_gui界面_", + + "item.create.tree_fertilizer.tooltip": "TREE FERTILIZER", + "item.create.tree_fertilizer.tooltip.summary": "适用于常见树木的快速肥料", + "item.create.tree_fertilizer.tooltip.condition1": "在树苗上使用时", + "item.create.tree_fertilizer.tooltip.behaviour1": "无论生长时间多少,直接长大", + + "item.create.deforester.tooltip": "DEFORESTER", + "item.create.deforester.tooltip.summary": "树林毁灭者,能够瞬间_砍倒_一棵树", + + "item.create.filter.tooltip": "FILTER", + "item.create.filter.tooltip.summary": "以更高的精度控制后勤设备的输出和输入,将它们与一组item或多个嵌套过滤器相匹配.(机翻)", + "item.create.filter.tooltip.condition1": "当处于过滤器槽中", + "item.create.filter.tooltip.behaviour1": "根据过滤器的配置,控制物品流经过滤器", + "item.create.filter.tooltip.condition2": "当右键时", + "item.create.filter.tooltip.behaviour2": "打开_配置面板_", + + "item.create.property_filter.tooltip": "ATTRIBUTE FILTER", + "item.create.property_filter.tooltip.summary": "以更高的精度控制物流设备的输出和输入,将它们与一组itme属性匹配.(机翻)", + "item.create.property_filter.tooltip.condition1": "当处于过滤器槽中", + "item.create.property_filter.tooltip.behaviour1": "根据过滤器的配置,控制物品流经过滤器", + "item.create.property_filter.tooltip.condition2": "当右键时", + "item.create.property_filter.tooltip.behaviour2": "打开_配置面板_", + + "block.create.cocoa_log.tooltip": "COCOA LOG", + "block.create.cocoa_log.tooltip.summary": "增强的可可豆丛林木,更方便实现可可豆自动化", + "block.create.cocoa_log.tooltip.condition1": "成熟时", + "block.create.cocoa_log.tooltip.behaviour1": "四面生长可可豆", + + "item.create.empty_blueprint.tooltip": "EMPTY SCHEMATIC", + "item.create.empty_blueprint.tooltip.summary": "可作为合成材料或在原理图桌使用", + + "item.create.blueprint.tooltip": "SCHEMATIC", + "item.create.blueprint.tooltip.summary": "可以放置在世界中的结构,根据需要放置全息图,并使用原理图加农炮进行构建.", + "item.create.blueprint.tooltip.condition1": "当全息图存在时", + "item.create.blueprint.tooltip.behaviour1": "可以使用屏幕上的工具定位", + "item.create.blueprint.tooltip.control1": "当潜行右键时", + "item.create.blueprint.tooltip.action1": "打开一个用于输入精确坐标的界面.", + + "item.create.blueprint_and_quill.tooltip": "SCHEMATIC AND QUILL", + "item.create.blueprint_and_quill.tooltip.summary": "用于将世界中的结构保存到.nbt文件.", + "item.create.blueprint_and_quill.tooltip.condition1": "第一步", + "item.create.blueprint_and_quill.tooltip.behaviour1": "手持原理图与右键旋转两个点", + "item.create.blueprint_and_quill.tooltip.condition2": "第二步", + "item.create.blueprint_and_quill.tooltip.behaviour2": "按住Ctrl鼠标滚轮选择选区大小,右键空白处保存.", + "item.create.blueprint_and_quill.tooltip.control1": "右键", + "item.create.blueprint_and_quill.tooltip.action1": "选取点/确认保存", + "item.create.blueprint_and_quill.tooltip.control2": "按住Ctrl鼠标滚轮", + "item.create.blueprint_and_quill.tooltip.action2": "在_空中_选择点滚动以调整距离。", + "item.create.blueprint_and_quill.tooltip.control3": "当潜行右键时", + "item.create.blueprint_and_quill.tooltip.action3": "_重置_并删除选区.", + + "block.create.creative_crate.tooltip": "CREATIVE CRATE", + "block.create.creative_crate.tooltip.summary": "为相邻的原理图加农炮提供无限能量的方块", + + "block.create.schematicannon.tooltip": "SCHEMATICANNON", + "block.create.schematicannon.tooltip.summary": "发射方块以在世界中重新构建已部署的全息图,使用相邻箱子中的物品及火药作为燃料.", + "block.create.schematicannon.tooltip.control1": "当右键时", + "block.create.schematicannon.tooltip.action1": "打开gui界面", + + "block.create.schematic_table.tooltip": "SCHEMATIC TABLE", + "block.create.schematic_table.tooltip.summary": "将保存的原理图图写入空白原理图", + "block.create.schematic_table.tooltip.condition1": "放入空白原理图时", + "block.create.schematic_table.tooltip.behaviour1": "从Schematics文件夹上传所选文件", + + "block.create.shaft.tooltip": "SHAFT", + "block.create.shaft.tooltip.summary": "传动杆.", + + "block.create.cogwheel.tooltip": "COGWHEEL", + "block.create.cogwheel.tooltip.summary": "传动结构之一.", + + "block.create.large_cogwheel.tooltip": "LARGE COGWHEEL", + "block.create.large_cogwheel.tooltip.summary": "大号齿轮传动结构,连接到小型齿轮时改变其转速.", + + "block.create.encased_shaft.tooltip": "ENCASED SHAFT", + "block.create.encased_shaft.tooltip.summary": "一字齿轮传动结构.", + + "block.create.gearbox.tooltip": "GEARBOX", + "block.create.gearbox.tooltip.summary": "十字传动旋转结构.", + + "block.create.gearshift.tooltip": "GEARSHIFT", + "block.create.gearshift.tooltip.summary": "用于传动的可控旋转开关.", + "block.create.gearshift.tooltip.condition1": "当提供红石信号时", + "block.create.gearshift.tooltip.behaviour1": "_更改_旋转方向.", + + "block.create.clutch.tooltip": "CLUTCH", + "block.create.clutch.tooltip.summary": "传动控制装置.", + "block.create.clutch.tooltip.condition1": "当提供红石信号时", + "block.create.clutch.tooltip.behaviour1": "_停止_另一侧的旋转.", + + "block.create.encased_belt.tooltip": "ENCASED_BELT", + "block.create.encased_belt.tooltip.summary": "通过此方块传递动力,比如将动力传递到连接的传送带.", + "block.create.encased_belt.tooltip.condition1": "连接到其他传动或装置时", + "block.create.encased_belt.tooltip.behaviour1": "将具有完全相同的转速和方向.", + + "block.create.adjustable_pulley.tooltip": "ANALOG BELT PULLEY", + "block.create.adjustable_pulley.tooltip.summary": "通过此方块传递动力,比如将动力传递到连接的传送带.当方块接收到信号时旋转速度将会改变", + "block.create.adjustable_pulley.tooltip.condition1": "当提供不同红石信号强度时", + "block.create.adjustable_pulley.tooltip.behaviour1": "如果没有红石信号_不会加速_,最强的红石信号将会提升至_两倍速_", + + "item.create.belt_connector.tooltip": "BELT CONNECTOR", + "item.create.belt_connector.tooltip.summary": "用传送带连接传动杆,连接的传动杆将具有完全相同的转速和方向.传送带可以传输实体.", + "item.create.belt_connector.tooltip.control1": "当右键传动杆时", + "item.create.belt_connector.tooltip.action1": "选择传动杆作为传送带的传输点,选定的两个传动杆都必须相互垂直,水平或对角平齐.", + "item.create.belt_connector.tooltip.control2": "当潜行右键时", + "item.create.belt_connector.tooltip.action2": "重置传送带的第一个选定位置", + + "item.create.goggles.tooltip": "GOGGLES", + "item.create.goggles.tooltip.summary": "一副特殊的眼镜,能够让你看见 _Kinetic_ 的信息.", + "item.create.goggles.tooltip.condition1": "当装备时", + "item.create.goggles.tooltip.behaviour1": "将会展示Kinetic的速度、应力等信息", + "item.create.goggles.tooltip.condition2": "当看向仪表时", + "item.create.goggles.tooltip.behaviour2": "将会展示仪表连接网络的速度、应力等信息.", + + "item.create.wrench.tooltip": "WRENCH", + "item.create.wrench.tooltip.summary": "一种有用的工具,能够调整_Kinetic_的_方向_、_配置_等.", + "item.create.wrench.tooltip.control1": "当右键Kinetic时", + "item.create.wrench.tooltip.action1": "旋转Kinetic的方向至你点击的面", + "item.create.wrench.tooltip.control2": "当潜行右键时", + "item.create.wrench.tooltip.action2": "将物品取下并移动到你的背包中.", + + "block.create.creative_motor.tooltip": "CREATIVE MOTOR", + "block.create.creative_motor.tooltip.summary": "可以配置的_无限动力_来源", + + "block.create.water_wheel.tooltip": "WATER WHEEL", + "block.create.water_wheel.tooltip.summary": "从相邻的流水中获得动力", + + "block.create.encased_fan.tooltip": "ENCASED FAN", + "block.create.encased_fan.tooltip.summary": "有多种用途,主要可以将动力转化为气流.", + "block.create.encased_fan.tooltip.condition1": "在下方点火时", + "block.create.encased_fan.tooltip.behaviour1": "可为连结的传动结构提供动力(热力>动力)", + "block.create.encased_fan.tooltip.condition2": "当旋转时", + "block.create.encased_fan.tooltip.behaviour2": "一面推动实体,一面吸引实体,强度和速度取决于给予的动力.", + "block.create.encased_fan.tooltip.condition3": "当气流通过火,水,岩浆时", + "block.create.encased_fan.tooltip.behaviour3": "获得相应产物(建议配合jei查看).", + + "block.create.nozzle.tooltip": "NOZZLE", + "block.create.nozzle.tooltip.summary": "依附在鼓风机上,能够将鼓风机的风到_分散_各个方向.", + + "block.create.hand_crank.tooltip": "HAND CRANK", + "block.create.hand_crank.tooltip.summary": "一种简单的旋转能源,需要人工转动.", + "block.create.hand_crank.tooltip.condition1": "当使用时", + "block.create.hand_crank.tooltip.behaviour1": "向依附的结构提供动力,潜行时将会提供反向的旋转动力", + + "block.create.cuckoo_clock.tooltip": "CUCKOO CLOCK", + "block.create.cuckoo_clock.tooltip.summary": "精致的工艺品,能够记录时间", + "block.create.cuckoo_clock.tooltip.condition1": "当旋转时", + "block.create.cuckoo_clock.tooltip.behaviour1": "显示 _当前时间_ 并且一天会咕咕_两次_. ", + + "block.create.turntable.tooltip": "TURNTABLE", + "block.create.turntable.tooltip.summary": "一个普通的转盘.", + + "block.create.crushing_wheel.tooltip": "CRUSHING WHEEL", + "block.create.crushing_wheel.tooltip.summary": "用于建造多方块粉碎机,粉碎轮的齿必须以相同的速度朝相对的方向旋转才可处理各种物品的粉碎合成.", + "block.create.crushing_wheel.tooltip.condition1": "当两个粉碎轮一起运作时", + "block.create.crushing_wheel.tooltip.behaviour1": "粉碎物品并获得相应产物(建议配合jei查看)", + + "block.create.mechanical_press.tooltip": "MECHANICAL PRESS", + "block.create.mechanical_press.tooltip.summary": "一个强力的活塞,用于压制其下方的物品.", + "block.create.mechanical_press.tooltip.condition1": "当提供红石信号时", + "block.create.mechanical_press.tooltip.behaviour1": "压制其下方的物品.", + "block.create.mechanical_press.tooltip.condition2": "在传送带上方时", + "block.create.mechanical_press.tooltip.behaviour2": "自动压缩经过传送带的物品.", + "block.create.mechanical_mixer.tooltip.condition3": "当下方是工作盆时", + "block.create.mechanical_mixer.tooltip.behaviour3": "只要盆中有必要的物品,就会将物品压缩组合.", + + "block.create.basin.tooltip": "BASIN", + "block.create.basin.tooltip.summary": "一种方便的物品容器,常常用于辊压机和搅拌机,可以被红石比较器检测", + + "block.create.mechanical_mixer.tooltip": "MECHANICAL MIXER", + "block.create.mechanical_mixer.tooltip.summary": "一种能够动态进行搅拌的机器,需要恒定的速度并且下方需要放置工作盆(中间需要一格宽)", + "block.create.mechanical_mixer.tooltip.condition1": "当位于工作盆上方", + "block.create.mechanical_mixer.tooltip.behaviour1": "只要工作盆中有必要的物品,就会将物品进行搅拌", + "block.create.mechanical_mixer.tooltip.condition2": "当使用扳手时", + "block.create.mechanical_mixer.tooltip.behaviour2": "配置配方中物品的最小数目,通过这个配置能够避免不需要的、相似的配方", + + "block.create.mechanical_crafter.tooltip": "MECHANICAL CRAFTER", + "block.create.mechanical_crafter.tooltip.summary": "一种动态制作的工作台,根据你配置的配方进行合成.", + "block.create.mechanical_crafter.tooltip.condition1": "当旋转时", + "block.create.mechanical_crafter.tooltip.behaviour1": "当机器中的物品槽有物品时,将会启动所有的制造机来工作.", + "block.create.mechanical_crafter.tooltip.control1": "当前方使用扳手时", + "block.create.mechanical_crafter.tooltip.action1": "将会改变物品移动的方向.为了构建一个工作网格,需要将网格中所有的物品,移动到最后的网格,最后的网格需要离开工作网格", + "block.create.mechanical_crafter.tooltip.control2": "当后方使用扳手时", + "block.create.mechanical_crafter.tooltip.action2": "连接相邻的制造机的物品栏..", + + "block.create.furnace_engine.tooltip": "FURNACE ENGINE", + "block.create.furnace_engine.tooltip.summary": "一种强力的能量旋转能量来源,但是需要正在工作的炉", + "block.create.furnace_engine.tooltip.condition1": "当连接正在燃烧的炉", + "block.create.furnace_engine.tooltip.behaviour1": "将会带动相连的飞轮(需要间隔一格),用高炉速度更快", + + "block.create.flywheel.tooltip": "FLYWHEEL", + "block.create.flywheel.tooltip.summary": "一种大型的金属轮,能过够提供稳定的旋转动力,动力来自熔炉引擎,需要与熔炉引擎间隔一个方块", + "block.create.flywheel.tooltip.condition1": "当连接正在燃烧的炉", + "block.create.flywheel.tooltip.behaviour1": "将会提供相应的旋转力.", + + "block.create.portable_storage_interface.tooltip": "PORTABLE STORAGE INTERFACE", + "block.create.portable_storage_interface.tooltip.summary": "一种便携的物品接口,能够将移动的结构上的物品进行交换移动", + "block.create.portable_storage_interface.tooltip.condition1": "当处于移动时", + "block.create.portable_storage_interface.tooltip.behaviour1": "与固定的_传输器_ 交互.", + + "block.create.rotation_speed_controller.tooltip": "ROTATION SPEED CONTROLLER", + "block.create.rotation_speed_controller.tooltip.summary": "一个可以变换绑定的齿轮旋转速度的方块", + "block.create.rotation_speed_controller.tooltip.condition1": "当连接大齿轮时", + "block.create.rotation_speed_controller.tooltip.behaviour1": "将输入的旋转改变速度后,传递给绑定的齿轮,绑定的齿轮要放在上方.", + + "block.create.mechanical_piston.tooltip": "MECHANICAL PISTON", + "block.create.mechanical_piston.tooltip.summary": "活塞的高级版本,使用机械动力精确移动粘贴的方块,背面可放置活塞杆延长活塞范围,没有活塞杆将不会工作,使用机壳底盘可以移动多行.", + "block.create.mechanical_piston.tooltip.condition1": "推拉活塞时", + "block.create.mechanical_piston.tooltip.behaviour1": "速度和方向与转速相关.", + + "block.create.sticky_mechanical_piston.tooltip": "STICKY MECHANICAL PISTON", + "block.create.sticky_mechanical_piston.tooltip.summary": "粘性活塞的高级版本,使用机械动力精确移动粘贴的方块,背面可放置活塞杆延长活塞范围,没有活塞杆将不会工作,使用机壳底盘可以移动多行.", + "block.create.sticky_mechanical_piston.tooltip.condition1": "推拉活塞时", + "block.create.sticky_mechanical_piston.tooltip.behaviour1": "速度和方向与转速相关.", + + "block.create.piston_pole.tooltip": "PISTON POLE", + "block.create.piston_pole.tooltip.summary": "用于增加动力活塞范围", + "block.create.piston_pole.tooltip.condition1": "当连接到动力活塞时", + "block.create.piston_pole.tooltip.behaviour1": "活塞的延伸范围将扩大", + + "block.create.mechanical_bearing.tooltip": "MECHANICAL BEARING", + "block.create.mechanical_bearing.tooltip.summary": "用于建造旋转的大型风力动能结构,比如风车.", + "block.create.mechanical_bearing.tooltip.condition1": "当旋转时", + "block.create.mechanical_bearing.tooltip.behaviour1": "就是旋转啊还能怎么样....", + "block.create.mechanical_bearing.tooltip.condition2": "给予红石信号时", + "block.create.mechanical_bearing.tooltip.behaviour2": "开始旋转并为连接的传动方块提供动力(此结构需使用羊毛建造).", + + "block.create.clockwork_bearing.tooltip": "CLOCKWORK BEARING", + "block.create.clockwork_bearing.tooltip.summary": "一种高级的机械轴承,可以根据当前游戏时间旋转两个时针", + "block.create.clockwork_bearing.tooltip.condition1": "当旋转时", + "block.create.clockwork_bearing.tooltip.behaviour1": "旋转第一个连接的结构作为时针,第二个连接的结构作为分针", + + "block.create.sequenced_gearshift.tooltip": "SEQUENCED GEARSHIFT", + "block.create.sequenced_gearshift.tooltip.summary": "一种可编程的组件,可以根据内部的指令改变旋转的角度.使用机械轴承,活塞等物品时可以控制他们的速度和时间.高速旋转时可能会变得不精确.", + "block.create.sequenced_gearshift.tooltip.condition1": "当给予红石信号时", + "block.create.sequenced_gearshift.tooltip.behaviour1": "在输入旋转速度下,执行指令.", + "block.create.sequenced_gearshift.tooltip.condition2": "当右键时", + "block.create.sequenced_gearshift.tooltip.behaviour2": "将打开配置指令的界面_", + + "block.create.cart_assembler.tooltip": "CART ASSEMBLER", + "block.create.cart_assembler.tooltip.summary": "将连接当前方块的结构连接在矿车上", + "block.create.cart_assembler.tooltip.condition1": "当给予红石信号时", + "block.create.cart_assembler.tooltip.behaviour1": "将解除已连接的矿车上的结构.", + + "block.create.rope_pulley.tooltip": "ROPE PULLEY", + "block.create.rope_pulley.tooltip.summary": "移动绳索相连的结构.", + "block.create.rope_pulley.tooltip.condition1": "当旋转时", + "block.create.rope_pulley.tooltip.behaviour1": "根据输入的旋转速度,移动链接的结构.", + + "block.create.translation_chassis.tooltip": "TRANSLATION CHASSIS", + "block.create.translation_chassis.tooltip.summary": "动力活塞移动的多方块结构基础,这种方块须在活塞前面第一层放置.", + "block.create.translation_chassis.tooltip.condition1": "由动力活塞推动时", + "block.create.translation_chassis.tooltip.behaviour1": "朝相同的方向移动所有连接在一起的机壳底盘;当活塞缩回时,只拉回底盘表面设置数量的方块(详情见Ctrl).", + "block.create.translation_chassis.tooltip.condition2": "当使用扳手时", + "block.create.translation_chassis.tooltip.behaviour2": "配置连接的方块的范围.按住_Ctrl_可以同时配置相连的其他方块.", + "block.create.translation_chassis.tooltip.control1": "当用史莱姆球右键时", + "block.create.translation_chassis.tooltip.action1": "变为粘性机壳底盘.", + + "block.create.rotation_chassis.tooltip": "ROTATION CHASSIS", + "block.create.rotation_chassis.tooltip.summary": "使用旋转底盘是旋转结构必须的", + "block.create.rotation_chassis.tooltip.condition1": "当旋转时", + "block.create.rotation_chassis.tooltip.behaviour1": "在其周围的配置范围内旋转所有粘贴到粘性面的方块(详情见Ctrl).", + "block.create.rotation_chassis.tooltip.condition2": "当使用扳手时", + "block.create.rotation_chassis.tooltip.behaviour2": "配置连接的方块的范围.按住_Ctrl_可以同时配置相连的其他方块.", + "block.create.rotation_chassis.tooltip.control1": "当用史莱姆球右键时", + "block.create.rotation_chassis.tooltip.action1": "当底盘旋转同时旋转所有粘贴到粘性面的方块.", + + "block.create.drill.tooltip": "MECHANICAL DRILL", + "block.create.drill.tooltip.summary": "用于破坏方块的装置", + "block.create.drill.tooltip.condition1": "当旋转时", + "block.create.drill.tooltip.behaviour1": "破化正前方的方块,且伤害在一定范围内生物及玩家.", + "block.create.drill.tooltip.condition2": "由动力活塞推动时", + "block.create.drill.tooltip.behaviour2": "横向或纵向破坏相当于活塞杆长度的方块.", + + "block.create.harvester.tooltip": "MECHANICAL HARVESTER", + "block.create.harvester.tooltip.summary": "适用于中型作物自动化的收割机", + "block.create.harvester.tooltip.condition1": "由动力活塞推动时", + "block.create.harvester.tooltip.behaviour1": "收割机移动至成熟作物收割作物并将作物变为初始生长状态.", + + "block.create.saw.tooltip": "MECHANICAL SAW", + "block.create.saw.tooltip.summary": "可以用于砍树,也可以用于切割方块.", + "block.create.saw.tooltip.condition1": "当方向向上时", + "block.create.saw.tooltip.behaviour1": "可以切割各种物品(建议配合jei查看)", + "block.create.saw.tooltip.condition2": "当方向在水平面时", + "block.create.saw.tooltip.behaviour2": "可以砍到面前的树木", + "block.create.saw.tooltip.condition3": "当移动时", + "block.create.saw.tooltip.behaviour3": "将会切割碰撞到的树木.", + + "block.create.stockswitch.tooltip": "STOCKSWITCH", + "block.create.stockswitch.tooltip.summary": "根据连接的容器存储空间大小切换红石信号强度.", + "block.create.stockswitch.tooltip.condition1": "低于下限时", + "block.create.stockswitch.tooltip.behaviour1": "停止提供红石信号", + "block.create.stockswitch.tooltip.condition2": "超过上限时", + "block.create.stockswitch.tooltip.behaviour2": "开始提供红石信号,直到再次到达下限.", + "block.create.stockswitch.tooltip.control1": "当右键方块时", + "block.create.stockswitch.tooltip.action1": "打开配置面板", + + "block.create.redstone_bridge.tooltip": "REDSTONE LINK", + "block.create.redstone_bridge.tooltip.summary": "无线红石信号终端,可以使用任何物品编辑终端频道,但距离有限.", + "block.create.redstone_bridge.tooltip.condition1": "当启用时", + "block.create.redstone_bridge.tooltip.behaviour1": "接收相同频道提供的红石信号.", + "block.create.redstone_bridge.tooltip.control1": "当右键方块时", + "block.create.redstone_bridge.tooltip.action1": "手持任意物品为其设置频道,可以组合两个物品.", + "block.create.redstone_bridge.tooltip.control2": "当潜行右键方块时", + "block.create.redstone_bridge.tooltip.action2": "在终端模式和接收模式之间切换.", + + "block.create.contact.tooltip": "REDSTONE CONTACT", + "block.create.contact.tooltip.summary": "一种用于高级红石装置的设备.", + "block.create.contact.tooltip.condition1": "当正对面放置也放置信号检测器时", + "block.create.contact.tooltip.behaviour1": "提供红石信号", + "block.create.contact.tooltip.condition2": "当移动时", + "block.create.contact.tooltip.behaviour2": "将会触发途径的固定触发点", + + "block.create.flexcrate.tooltip": "FLEXCRATE", + "block.create.flexcrate.tooltip.summary": "该箱子允许对其容量进行调整,最大可以容纳16组物品.", + "block.create.flexcrate.tooltip.control1": "当右键方块时", + "block.create.flexcrate.tooltip.action1": "打开箱子", + + "block.create.extractor.tooltip": "EXTRACTOR", + "block.create.extractor.tooltip.summary": "从连接的箱子里自动将物品输出到外面,可以设置白名单过滤.", + "block.create.extractor.tooltip.condition1": "当提供红石信号时", + "block.create.extractor.tooltip.behaviour1": "暂停自动输出", + "block.create.extractor.tooltip.condition2": "放置在传送带上时", + "block.create.extractor.tooltip.behaviour2": "当传送带被黄铜箱加固时,使用提取器可以将传送带上的物品提取出来. 当提取器堵塞时,传送带将会停下.", + "block.create.extractor.tooltip.control1": "当右键过滤框时", + "block.create.extractor.tooltip.action1": "将当前持有的物品设置为物品过滤白名单", + + "block.create.transposer.tooltip": "TRANSPOSER", + "block.create.transposer.tooltip.summary": "将绑定的物品栏中的物品传送到指定的物品栏.", + "block.create.transposer.tooltip.condition1": "当给予红石信号时", + "block.create.transposer.tooltip.behaviour1": "暂停传输.", + "block.create.transposer.tooltip.condition2": "放置在传送带上时", + "block.create.transposer.tooltip.behaviour2": "当传送带被黄铜箱加固时,使用传输器可以将传送带上的物品提取出来. 当传输器堵塞时,传送带将会停下.", + "block.create.transposer.tooltip.control1": "当右键过滤框时", + "block.create.transposer.tooltip.action1": "将当前持有的物品设置为物品过滤白名单.", + + "block.create.deployer.tooltip": "DEPLOYER", + "block.create.deployer.tooltip.summary": "它是一个机械手,将尽可能模仿玩家的行为,能够将物品拿出来,也可以将物品放入物品栏中. 可以设置白名单.", + "block.create.deployer.tooltip.condition1": "当旋转时", + "block.create.deployer.tooltip.behaviour1": "将可以伸出手臂2m长", + "block.create.deployer.tooltip.condition2": "当使用扳手时", + "block.create.deployer.tooltip.behaviour2": "将会启用拳头模式,在拳头模式之下,机械臂将会试图使用手中的物品破坏方块,或者攻击实体.", + + "block.create.linked_extractor.tooltip": "LINKED EXTRACTOR", + "block.create.linked_extractor.tooltip.summary": "从连接的箱子里自动将物品输出到外面,可以设置白名单过滤,直到上一次输出的物品被清空才会再次输出,可以使用无线红石信号终端控制.", + "block.create.linked_extractor.tooltip.condition1": "当无线红石信号激活时", + "block.create.linked_extractor.tooltip.behaviour1": "暂停输出物品", + "block.create.linked_extractor.tooltip.control1": "右键方块时", + "block.create.linked_extractor.tooltip.action1": "将当前持有的物品数量的物品设置为物品过滤白名单且输出此数量的物品.", + "block.create.linked_extractor.tooltip.control2": "当右键方块侧面时", + "block.create.linked_extractor.tooltip.action2": "手持任意物品为其设置频道,将接收无线红石终端相应频道,可以组合两个物品.", + + "block.create.linked_transposer.tooltip": "LINKED TRANSPOSER", + "block.create.linked_transposer.tooltip.summary": "将绑定的物品栏中的物品传送到指定的物品栏.能够使用无线红石信号控制", + "block.create.linked_transposer.tooltip.condition1": "当无线红石信号触发时", + "block.create.linked_transposer.tooltip.behaviour1": "暂停传输", + "block.create.linked_transposer.tooltip.control1": "当右键过滤框时", + "block.create.linked_transposer.tooltip.action1": "将当前持有的物品数量的物品设置为物品过滤白名单且输出此数量的物品.", + "block.create.linked_transposer.tooltip.control2": "当右键频道框时", + "block.create.linked_transposer.tooltip.action2": "手持任意物品为其设置频道,将接收无线红石终端相应频道,可以组合两个物品.", + + "block.create.belt_funnel.tooltip": "FUNNEL", + "block.create.belt_funnel.tooltip.summary": "接收传送带上的物品到连接的储存空间,必须放置在正对传送带的方向及高度.", + "block.create.belt_funnel.tooltip.condition1": "接收传送带物品", + "block.create.belt_funnel.tooltip.behaviour1": "位于传送带边上或者终点时,传送带漏斗可以将物品从传送带上拿出. 如果在传送带边上且传动带漏斗阻塞时,不会阻塞传送带.", + + "block.create.belt_tunnel.tooltip": "BELT TUNNEL", + "block.create.belt_tunnel.tooltip.summary": "这是一种美观的方块,能够让传送带穿过墙壁,但是传送带必须被黄铜箱包装.如果启动了同步模式,且旁边有传送带隧道时,将会等待另一个周围的传送带隧道的物品,一起通过. [Ctrl]", + "block.create.belt_tunnel.tooltip.control1": "当使用扳手右键前面时", + "block.create.belt_tunnel.tooltip.action1": "启动同步模式", + "block.create.belt_tunnel.tooltip.control2": "当使用扳手右键边上时", + "block.create.belt_tunnel.tooltip.action2": "当传送带隧道出现玻璃窗时,右键将会关闭玻璃窗", + + "block.create.brass_casing.tooltip": "BRASS CASING", + "block.create.brass_casing.tooltip.summary": "一种坚固的外壳,有多种用处.", + "block.create.brass_casing.tooltip.condition1": "当被使用在传送带上时", + "block.create.brass_casing.tooltip.behaviour1": "当传送带上装配有黄铜箱时,可以提供传送带两侧安装传送带隧道、提取器、传输器、传送带漏斗等物品", + + "block.create.entity_detector.tooltip": "BELT OBSERVER", + "block.create.entity_detector.tooltip.summary": "检测传送带上经过观察者的物品、实体. 使用扳手将可以修改它的模式.", + "block.create.entity_detector.tooltip.condition1": "观测模式", + "block.create.entity_detector.tooltip.behaviour1": "当观测到传送带上有物品或者实体时,将会提供红石信号", + "block.create.entity_detector.tooltip.condition2": "脉冲模式", + "block.create.entity_detector.tooltip.behaviour2": "当观察者中心线匹配到物品时,将会发出脉冲", + "block.create.entity_detector.tooltip.condition3": "弹射模式", + "block.create.entity_detector.tooltip.behaviour3": "将匹配的物品弹射出传送带. 如果目标位置被堵塞,物品将会停下等待弹射.", + "block.create.entity_detector.tooltip.condition4": "分裂模式", + "block.create.entity_detector.tooltip.behaviour4": "将匹配的物品分成两部分,一部分弹射到传送带出.", + + "block.create.pulse_repeater.tooltip": "PULSE REPEATER", + "block.create.pulse_repeater.tooltip.summary": "一个简单的电路,将通过的红石信号变为1tick.", + + "block.create.flexpeater.tooltip": "FLEX REPEATER", + "block.create.flexpeater.tooltip.summary": "高级中继器,最大可设置30分钟延迟", + + "block.create.flexpulsepeater.tooltip": "FLEX PULSE REPEATER", + "block.create.flexpulsepeater.tooltip.summary": "一种红石中继器可以调节延时至30m", + + "block.create.analog_lever.tooltip": "ANALOG LEVER", + "block.create.analog_lever.tooltip.summary": "一种可以调节信号强度的推杆", + + "block.create.toggle_latch.tooltip": "POWERED TOGGLE LATCH", + "block.create.toggle_latch.tooltip.summary": "一种拉杆,在红石电路中可以用作触发器", + + "block.create.redstone_latch.tooltip": "POWERED LATCH", + "block.create.redstone_latch.tooltip.summary": "一种拉杆,在红石电路中用作锁存器,从后方输入将会启用这个拉杆,从侧边输入将会重置这个拉杆.", + + "block.create.speed_gauge.tooltip": "SPEEDOMETER", + "block.create.speed_gauge.tooltip.summary": "测量并展示连接网络的旋转速度,支持使用红石比较器", + "block.create.speed_gauge.tooltip.condition1": "当旋转时", + "block.create.speed_gauge.tooltip.behaviour1": "将会用颜色展示速度的大小,绿-慢、蓝-中、紫-快.", + + "block.create.stress_gauge.tooltip": "STRESSOMETER", + "block.create.stress_gauge.tooltip.summary": "测量并展示连接网络的应力值,支持红石比较器", + "block.create.stress_gauge.tooltip.condition1": "当旋转时", + "block.create.stress_gauge.tooltip.behaviour1": "将会用颜色展示承受的应力", + + "item.create.refined_radiance.tooltip": "REFINED RADIANCE", + "item.create.refined_radiance.tooltip.summary": "一种用光辉锻造的化合物材料.", + + "item.create.shadow_steel.tooltip": "SHADOW STEEL", + "item.create.shadow_steel.tooltip.summary": "一种用虚空锻造的化合物材料.", + + "item.create.slot_cover.tooltip": "SLOT COVER", + "item.create.slot_cover.tooltip.summary": "用来标记制造机不放入物品.", + + "tool.create.shadow_steel.tooltip": "SHADOW STEEL TOOLS", + "tool.create.shadow_steel.tooltip.summary": "一种强力的武器,破坏方块将会掉落更多物品. 杀死怪物将会掉落更多经验值", + + "tool.create.blazing.tooltip": "BLAZING TOOLS", + "tool.create.blazing.tooltip.summary": "将会融化破坏的方块,并且点燃怪物,在地狱中不会减少耐久", + + "tool.create.rose_quartz.tooltip": "ROSE QUARTZ TOOLS", + "tool.create.rose_quartz.tooltip.summary": "这个工具将会让你更容易使用副手放置或破坏方块.", + + "item.create.logistical_controller_calculation.tooltip": "WIP", + "item.create.logistical_controller_request.tooltip": "WIP", + "item.create.logistical_controller_storage.tooltip": "WIP", + "item.create.logistical_controller_supply.tooltip": "WIP", + "item.create.logistical_controller_transactions.tooltip": "WIP", + "block.create.logistical_index.tooltip": "WIP", + "block.create.package_funnel.tooltip": "WIP", + "block.create.logisticians_table.tooltip": "WIP", + "item.create.logistical_dial.tooltip": "WIP", + "item.create.logistical_filter.tooltip": "WIP", + + "itemGroup.create": "机械动力" +} \ No newline at end of file From c3f781b76288133d892b295b53ccf0d4f4bc26dd Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Thu, 26 Mar 2020 23:03:56 +0100 Subject: [PATCH 03/11] The Millstone - Added Millstone - Added Milling recipe type - Crushing wheels can apply milling recipes - Added a command for clearing the buffer cache - Any cog-containing machine can now connect to large cogwheels - Added French localization by Kiro - Removed unused lang entries --- .../com/simibubi/create/AllBlockPartials.java | 1 + .../java/com/simibubi/create/AllBlocks.java | 2 + .../java/com/simibubi/create/AllRecipes.java | 2 + .../com/simibubi/create/AllTileEntities.java | 5 + .../simibubi/create/compat/jei/CreateJEI.java | 2 + .../compat/jei/category/CrushingCategory.java | 14 +- .../create/config/StressConfigDefaults.java | 1 + .../command/ClearBufferCacheCommand.java | 27 + .../foundation/command/CreateCommand.java | 9 +- .../create/foundation/utility/AllShapes.java | 30 +- .../contraptions/RotationPropagator.java | 32 +- .../modules/contraptions/base/IRotate.java | 4 +- .../contraptions/base/KineticBlock.java | 2 +- .../crafter/MechanicalCrafterBlock.java | 4 +- .../crusher/AbstractCrushingRecipe.java | 20 + .../components/crusher/CrushingRecipe.java | 3 +- .../CrushingWheelControllerTileEntity.java | 15 +- .../components/millstone/MillingRecipe.java | 33 + .../components/millstone/MillstoneBlock.java | 53 + .../millstone/MillstoneRenderer.java | 16 + .../millstone/MillstoneTileEntity.java | 175 +++ .../mixer/MechanicalMixerBlock.java | 4 +- .../relays/elementary/CogWheelBlock.java | 6 +- .../assets/create/blockstates/millstone.json | 5 + .../resources/assets/create/lang/en_us.json | 41 +- .../resources/assets/create/lang/fr_fr.json | 1174 +++++++++++++++++ .../create/models/block/millstone/casing.json | 163 +++ .../create/models/block/millstone/inner.json | 150 +++ .../create/models/block/millstone/item.json | 211 +++ .../assets/create/models/item/millstone.json | 3 + .../create/textures/block/millstone.png | Bin 0 -> 933 bytes .../create/loot_tables/blocks/millstone.json | 19 + .../contraptions/millstone.json | 32 + .../recipes/{crushing => milling}/allium.json | 2 +- .../{crushing => milling}/andesite.json | 2 +- .../{crushing => milling}/azure_bluet.json | 2 +- .../{crushing => milling}/blue_orchid.json | 2 +- .../recipes/{crushing => milling}/bone.json | 2 +- .../{crushing => milling}/bone_meal.json | 2 +- .../recipes/{crushing => milling}/cactus.json | 2 +- .../{crushing => milling}/charcoal.json | 2 +- .../recipes/{crushing => milling}/clay.json | 2 +- .../recipes/{crushing => milling}/coal.json | 2 +- .../{crushing => milling}/cobblestone.json | 2 +- .../{crushing => milling}/cocoa_beans.json | 2 +- .../{crushing => milling}/cornflower.json | 2 +- .../{crushing => milling}/dandelion.json | 2 +- .../diamond_horse_armor.json | 2 +- .../{crushing => milling}/diorite.json | 2 +- .../recipes/{crushing => milling}/fern.json | 2 +- .../golden_horse_armor.json | 2 +- .../{crushing => milling}/granite.json | 2 +- .../recipes/{crushing => milling}/grass.json | 2 +- .../recipes/{crushing => milling}/gravel.json | 2 +- .../{crushing => milling}/ink_sac.json | 2 +- .../iron_horse_armor.json | 2 +- .../{crushing => milling}/lapis_lazuli.json | 2 +- .../{crushing => milling}/large_fern.json | 2 +- .../leather_horse_armor.json | 2 +- .../recipes/{crushing => milling}/lilac.json | 2 +- .../lily_of_the_valley.json | 2 +- .../{crushing => milling}/orange_tulip.json | 2 +- .../{crushing => milling}/oxeye_daisy.json | 2 +- .../recipes/{crushing => milling}/peony.json | 2 +- .../{crushing => milling}/pink_tulip.json | 2 +- .../recipes/{crushing => milling}/poppy.json | 2 +- .../{crushing => milling}/red_tulip.json | 2 +- .../{crushing => milling}/rose_bush.json | 2 +- .../recipes/{crushing => milling}/saddle.json | 2 +- .../recipes/{crushing => milling}/sand.json | 2 +- .../{crushing => milling}/sugar_cane.json | 2 +- .../{crushing => milling}/sunflower.json | 2 +- .../{crushing => milling}/tall_grass.json | 2 +- .../{crushing => milling}/terracotta.json | 2 +- .../recipes/{crushing => milling}/wheat.json | 2 +- .../{crushing => milling}/white_tulip.json | 2 +- .../{crushing => milling}/wither_rose.json | 2 +- .../recipes/{crushing => milling}/wool.json | 2 +- 78 files changed, 2212 insertions(+), 136 deletions(-) create mode 100644 src/main/java/com/simibubi/create/foundation/command/ClearBufferCacheCommand.java create mode 100644 src/main/java/com/simibubi/create/modules/contraptions/components/crusher/AbstractCrushingRecipe.java create mode 100644 src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillingRecipe.java create mode 100644 src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneBlock.java create mode 100644 src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneRenderer.java create mode 100644 src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneTileEntity.java create mode 100644 src/main/resources/assets/create/blockstates/millstone.json create mode 100644 src/main/resources/assets/create/lang/fr_fr.json create mode 100644 src/main/resources/assets/create/models/block/millstone/casing.json create mode 100644 src/main/resources/assets/create/models/block/millstone/inner.json create mode 100644 src/main/resources/assets/create/models/block/millstone/item.json create mode 100644 src/main/resources/assets/create/models/item/millstone.json create mode 100644 src/main/resources/assets/create/textures/block/millstone.png create mode 100644 src/main/resources/data/create/loot_tables/blocks/millstone.json create mode 100644 src/main/resources/data/create/recipes/crafting_shaped/contraptions/millstone.json rename src/main/resources/data/create/recipes/{crushing => milling}/allium.json (91%) rename src/main/resources/data/create/recipes/{crushing => milling}/andesite.json (85%) rename src/main/resources/data/create/recipes/{crushing => milling}/azure_bluet.json (89%) rename src/main/resources/data/create/recipes/{crushing => milling}/blue_orchid.json (89%) rename src/main/resources/data/create/recipes/{crushing => milling}/bone.json (91%) rename src/main/resources/data/create/recipes/{crushing => milling}/bone_meal.json (89%) rename src/main/resources/data/create/recipes/{crushing => milling}/cactus.json (93%) rename src/main/resources/data/create/recipes/{crushing => milling}/charcoal.json (89%) rename src/main/resources/data/create/recipes/{crushing => milling}/clay.json (91%) rename src/main/resources/data/create/recipes/{crushing => milling}/coal.json (88%) rename src/main/resources/data/create/recipes/{crushing => milling}/cobblestone.json (85%) rename src/main/resources/data/create/recipes/{crushing => milling}/cocoa_beans.json (89%) rename src/main/resources/data/create/recipes/{crushing => milling}/cornflower.json (85%) rename src/main/resources/data/create/recipes/{crushing => milling}/dandelion.json (89%) rename src/main/resources/data/create/recipes/{crushing => milling}/diamond_horse_armor.json (92%) rename src/main/resources/data/create/recipes/{crushing => milling}/diorite.json (84%) rename src/main/resources/data/create/recipes/{crushing => milling}/fern.json (88%) rename src/main/resources/data/create/recipes/{crushing => milling}/golden_horse_armor.json (94%) rename src/main/resources/data/create/recipes/{crushing => milling}/granite.json (85%) rename src/main/resources/data/create/recipes/{crushing => milling}/grass.json (86%) rename src/main/resources/data/create/recipes/{crushing => milling}/gravel.json (91%) rename src/main/resources/data/create/recipes/{crushing => milling}/ink_sac.json (89%) rename src/main/resources/data/create/recipes/{crushing => milling}/iron_horse_armor.json (94%) rename src/main/resources/data/create/recipes/{crushing => milling}/lapis_lazuli.json (89%) rename src/main/resources/data/create/recipes/{crushing => milling}/large_fern.json (91%) rename src/main/resources/data/create/recipes/{crushing => milling}/leather_horse_armor.json (89%) rename src/main/resources/data/create/recipes/{crushing => milling}/lilac.json (91%) rename src/main/resources/data/create/recipes/{crushing => milling}/lily_of_the_valley.json (91%) rename src/main/resources/data/create/recipes/{crushing => milling}/orange_tulip.json (89%) rename src/main/resources/data/create/recipes/{crushing => milling}/oxeye_daisy.json (91%) rename src/main/resources/data/create/recipes/{crushing => milling}/peony.json (91%) rename src/main/resources/data/create/recipes/{crushing => milling}/pink_tulip.json (89%) rename src/main/resources/data/create/recipes/{crushing => milling}/poppy.json (88%) rename src/main/resources/data/create/recipes/{crushing => milling}/red_tulip.json (88%) rename src/main/resources/data/create/recipes/{crushing => milling}/rose_bush.json (91%) rename src/main/resources/data/create/recipes/{crushing => milling}/saddle.json (91%) rename src/main/resources/data/create/recipes/{crushing => milling}/sand.json (91%) rename src/main/resources/data/create/recipes/{crushing => milling}/sugar_cane.json (88%) rename src/main/resources/data/create/recipes/{crushing => milling}/sunflower.json (91%) rename src/main/resources/data/create/recipes/{crushing => milling}/tall_grass.json (86%) rename src/main/resources/data/create/recipes/{crushing => milling}/terracotta.json (85%) rename src/main/resources/data/create/recipes/{crushing => milling}/wheat.json (91%) rename src/main/resources/data/create/recipes/{crushing => milling}/white_tulip.json (89%) rename src/main/resources/data/create/recipes/{crushing => milling}/wither_rose.json (89%) rename src/main/resources/data/create/recipes/{crushing => milling}/wool.json (88%) diff --git a/src/main/java/com/simibubi/create/AllBlockPartials.java b/src/main/java/com/simibubi/create/AllBlockPartials.java index 6b8f9ace1..667f577ca 100644 --- a/src/main/java/com/simibubi/create/AllBlockPartials.java +++ b/src/main/java/com/simibubi/create/AllBlockPartials.java @@ -67,6 +67,7 @@ public enum AllBlockPartials { ROPE_COIL("pulley/rope_coil"), ROPE_HALF("pulley/rope_half"), ROPE_HALF_MAGNET("pulley/rope_half_magnet"), + MILL_STONE_COG("millstone/inner"), ; diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index bdc476dce..0ccf8401c 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -31,6 +31,7 @@ import com.simibubi.create.modules.contraptions.components.fan.EncasedFanBlock; import com.simibubi.create.modules.contraptions.components.fan.NozzleBlock; import com.simibubi.create.modules.contraptions.components.flywheel.FlywheelBlock; import com.simibubi.create.modules.contraptions.components.flywheel.engine.FurnaceEngineBlock; +import com.simibubi.create.modules.contraptions.components.millstone.MillstoneBlock; import com.simibubi.create.modules.contraptions.components.mixer.MechanicalMixerBlock; import com.simibubi.create.modules.contraptions.components.motor.MotorBlock; import com.simibubi.create.modules.contraptions.components.press.MechanicalPressBlock; @@ -131,6 +132,7 @@ public enum AllBlocks { CUCKOO_CLOCK(new CuckooClockBlock(false)), MYSTERIOUS_CUCKOO_CLOCK(new CuckooClockBlock(true)), + MILLSTONE(new MillstoneBlock()), CRUSHING_WHEEL(new CrushingWheelBlock()), CRUSHING_WHEEL_CONTROLLER(new CrushingWheelControllerBlock()), MECHANICAL_PRESS(new MechanicalPressBlock()), diff --git a/src/main/java/com/simibubi/create/AllRecipes.java b/src/main/java/com/simibubi/create/AllRecipes.java index fea4f12fc..b92c1ccdd 100644 --- a/src/main/java/com/simibubi/create/AllRecipes.java +++ b/src/main/java/com/simibubi/create/AllRecipes.java @@ -7,6 +7,7 @@ import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.modules.contraptions.components.crafter.MechanicalCraftingRecipe; import com.simibubi.create.modules.contraptions.components.crusher.CrushingRecipe; import com.simibubi.create.modules.contraptions.components.fan.SplashingRecipe; +import com.simibubi.create.modules.contraptions.components.millstone.MillingRecipe; import com.simibubi.create.modules.contraptions.components.mixer.MixingRecipe; import com.simibubi.create.modules.contraptions.components.press.PressingRecipe; import com.simibubi.create.modules.contraptions.components.saw.CuttingRecipe; @@ -30,6 +31,7 @@ public enum AllRecipes { BLOCKZAPPER_UPGRADE(BlockzapperUpgradeRecipe.Serializer::new, IRecipeType.CRAFTING), MECHANICAL_CRAFTING(MechanicalCraftingRecipe.Serializer::new), CRUSHING(processingSerializer(CrushingRecipe::new)), + MILLING(processingSerializer(MillingRecipe::new)), SPLASHING(processingSerializer(SplashingRecipe::new)), PRESSING(processingSerializer(PressingRecipe::new)), CUTTING(processingSerializer(CuttingRecipe::new)), diff --git a/src/main/java/com/simibubi/create/AllTileEntities.java b/src/main/java/com/simibubi/create/AllTileEntities.java index f23f5cd83..6ed91379b 100644 --- a/src/main/java/com/simibubi/create/AllTileEntities.java +++ b/src/main/java/com/simibubi/create/AllTileEntities.java @@ -34,6 +34,8 @@ import com.simibubi.create.modules.contraptions.components.flywheel.FlywheelRend import com.simibubi.create.modules.contraptions.components.flywheel.FlywheelTileEntity; import com.simibubi.create.modules.contraptions.components.flywheel.engine.EngineRenderer; import com.simibubi.create.modules.contraptions.components.flywheel.engine.FurnaceEngineTileEntity; +import com.simibubi.create.modules.contraptions.components.millstone.MillstoneRenderer; +import com.simibubi.create.modules.contraptions.components.millstone.MillstoneTileEntity; import com.simibubi.create.modules.contraptions.components.mixer.MechanicalMixerTileEntity; import com.simibubi.create.modules.contraptions.components.mixer.MechanicalMixerTileEntityRenderer; import com.simibubi.create.modules.contraptions.components.motor.MotorTileEntity; @@ -129,6 +131,8 @@ public enum AllTileEntities { HARVESTER(HarvesterTileEntity::new, AllBlocks.HARVESTER), FLYWHEEL(FlywheelTileEntity::new, AllBlocks.FLYWHEEL), FURNACE_ENGINE(FurnaceEngineTileEntity::new, AllBlocks.FURNACE_ENGINE), + + MILLSTONE(MillstoneTileEntity::new, AllBlocks.MILLSTONE), CRUSHING_WHEEL(CrushingWheelTileEntity::new, AllBlocks.CRUSHING_WHEEL), CRUSHING_WHEEL_CONTROLLER(CrushingWheelControllerTileEntity::new, AllBlocks.CRUSHING_WHEEL_CONTROLLER), WATER_WHEEL(WaterWheelTileEntity::new, AllBlocks.WATER_WHEEL), @@ -216,6 +220,7 @@ public enum AllTileEntities { bind(PulleyTileEntity.class, new PulleyRenderer()); bind(HarvesterTileEntity.class, new HarvesterTileEntityRenderer()); + bind(MillstoneTileEntity.class, new MillstoneRenderer()); bind(CrushingWheelTileEntity.class, new KineticTileEntityRenderer()); bind(MechanicalPressTileEntity.class, new MechanicalPressTileEntityRenderer()); bind(MechanicalMixerTileEntity.class, new MechanicalMixerTileEntityRenderer()); diff --git a/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java b/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java index e6104d6d6..61a021107 100644 --- a/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java +++ b/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java @@ -108,6 +108,8 @@ public class CreateJEI implements IModPlugin { @Override public void registerRecipes(IRecipeRegistration registration) { registration.addRecipes(findRecipes(AllRecipes.CRUSHING), crushingCategory.getUid()); + registration.addRecipes(findRecipesByTypeExcluding(AllRecipes.MILLING.getType(), AllRecipes.CRUSHING.getType()), + crushingCategory.getUid()); registration.addRecipes(findRecipes(AllRecipes.SPLASHING), splashingCategory.getUid()); registration.addRecipes(findRecipes(AllRecipes.PRESSING), pressingCategory.getUid()); registration.addRecipes(findRecipesById(AllRecipes.BLOCKZAPPER_UPGRADE.serializer.getRegistryName()), diff --git a/src/main/java/com/simibubi/create/compat/jei/category/CrushingCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/CrushingCategory.java index 28f23f364..8a4da5a26 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/CrushingCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/CrushingCategory.java @@ -12,7 +12,7 @@ import com.simibubi.create.compat.jei.DoubleItemIcon; import com.simibubi.create.compat.jei.EmptyBackground; import com.simibubi.create.compat.jei.category.animations.AnimatedCrushingWheels; import com.simibubi.create.foundation.utility.Lang; -import com.simibubi.create.modules.contraptions.components.crusher.CrushingRecipe; +import com.simibubi.create.modules.contraptions.components.crusher.AbstractCrushingRecipe; import com.simibubi.create.modules.contraptions.processing.ProcessingOutput; import mezz.jei.api.constants.VanillaTypes; @@ -24,7 +24,7 @@ import mezz.jei.api.recipe.category.IRecipeCategory; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; -public class CrushingCategory implements IRecipeCategory { +public class CrushingCategory implements IRecipeCategory { private static ResourceLocation ID = new ResourceLocation(Create.ID, "crushing"); private AnimatedCrushingWheels crushingWheels = new AnimatedCrushingWheels(); @@ -47,8 +47,8 @@ public class CrushingCategory implements IRecipeCategory { } @Override - public Class getRecipeClass() { - return CrushingRecipe.class; + public Class getRecipeClass() { + return AbstractCrushingRecipe.class; } @Override @@ -62,13 +62,13 @@ public class CrushingCategory implements IRecipeCategory { } @Override - public void setIngredients(CrushingRecipe recipe, IIngredients ingredients) { + public void setIngredients(AbstractCrushingRecipe recipe, IIngredients ingredients) { ingredients.setInputIngredients(recipe.getIngredients()); ingredients.setOutputs(VanillaTypes.ITEM, recipe.getPossibleOutputs()); } @Override - public void setRecipe(IRecipeLayout recipeLayout, CrushingRecipe recipe, IIngredients ingredients) { + public void setRecipe(IRecipeLayout recipeLayout, AbstractCrushingRecipe recipe, IIngredients ingredients) { IGuiItemStackGroup itemStacks = recipeLayout.getItemStacks(); itemStacks.init(0, true, 50, 2); itemStacks.set(0, Arrays.asList(recipe.getIngredients().get(0).getMatchingStacks())); @@ -85,7 +85,7 @@ public class CrushingCategory implements IRecipeCategory { } @Override - public void draw(CrushingRecipe recipe, double mouseX, double mouseY) { + public void draw(AbstractCrushingRecipe recipe, double mouseX, double mouseY) { List results = recipe.getRollableResults(); ScreenResources.JEI_SLOT.draw(50, 2); ScreenResources.JEI_DOWN_ARROW.draw(72, 7); diff --git a/src/main/java/com/simibubi/create/config/StressConfigDefaults.java b/src/main/java/com/simibubi/create/config/StressConfigDefaults.java index 84fa82524..9887d95dc 100644 --- a/src/main/java/com/simibubi/create/config/StressConfigDefaults.java +++ b/src/main/java/com/simibubi/create/config/StressConfigDefaults.java @@ -40,6 +40,7 @@ public class StressConfigDefaults { case SAW: case DEPLOYER: case MECHANICAL_MIXER: + case MILLSTONE: return 4; case MECHANICAL_CRAFTER: diff --git a/src/main/java/com/simibubi/create/foundation/command/ClearBufferCacheCommand.java b/src/main/java/com/simibubi/create/foundation/command/ClearBufferCacheCommand.java new file mode 100644 index 000000000..2398d9406 --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/command/ClearBufferCacheCommand.java @@ -0,0 +1,27 @@ +package com.simibubi.create.foundation.command; + +import com.mojang.brigadier.builder.ArgumentBuilder; +import com.simibubi.create.CreateClient; + +import net.minecraft.command.CommandSource; +import net.minecraft.command.Commands; +import net.minecraft.util.text.StringTextComponent; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.fml.DistExecutor; + +public class ClearBufferCacheCommand { + + static ArgumentBuilder register() { + return Commands.literal("clearRenderBuffers").requires(cs -> cs.hasPermissionLevel(0)).executes(ctx -> { + DistExecutor.runWhenOn(Dist.CLIENT, () -> ClearBufferCacheCommand::execute); + ctx.getSource().sendFeedback(new StringTextComponent("Cleared rendering buffers."), true); + return 1; + }); + } + + @OnlyIn(Dist.CLIENT) + private static void execute() { + CreateClient.bufferCache.invalidate(); + } +} diff --git a/src/main/java/com/simibubi/create/foundation/command/CreateCommand.java b/src/main/java/com/simibubi/create/foundation/command/CreateCommand.java index f8b7b747e..cc55eb455 100644 --- a/src/main/java/com/simibubi/create/foundation/command/CreateCommand.java +++ b/src/main/java/com/simibubi/create/foundation/command/CreateCommand.java @@ -1,6 +1,7 @@ package com.simibubi.create.foundation.command; import com.mojang.brigadier.CommandDispatcher; +import com.mojang.brigadier.builder.ArgumentBuilder; import net.minecraft.command.CommandSource; import net.minecraft.command.Commands; @@ -9,6 +10,12 @@ public class CreateCommand { public CreateCommand(CommandDispatcher dispatcher) { // KillTPSCommand.register(dispatcher); Commented out for release - dispatcher.register(Commands.literal("create").then(ToggleDebugCommand.register())); + addCreateCommand(dispatcher, ToggleDebugCommand.register()); + addCreateCommand(dispatcher, ClearBufferCacheCommand.register()); + } + + public void addCreateCommand(CommandDispatcher dispatcher, + ArgumentBuilder register) { + dispatcher.register(Commands.literal("create").then(register)); } } diff --git a/src/main/java/com/simibubi/create/foundation/utility/AllShapes.java b/src/main/java/com/simibubi/create/foundation/utility/AllShapes.java index c0ac78e51..ed2d7f670 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/AllShapes.java +++ b/src/main/java/com/simibubi/create/foundation/utility/AllShapes.java @@ -29,10 +29,10 @@ public class AllShapes { SIX_VOXEL_POLE = shape(5, 0, 5, 11, 16, 11).forAxis(), BELT_FUNNEL = shape(3, -4, 11, 13, 8, 17).forHorizontal(SOUTH), FUNNEL = shape(1, 1, 13, 15, 15, 17).forDirectional(SOUTH), - EXTRACTOR = shape(4, 2, 11, 12, 10, 17).forDirectional(SOUTH) - .withVerticalShapes(cuboid(4, 11, 4, 12, 17, 12)), - TRANSPOSER = shape(4, 4, -1, 12, 12, 1).add(5, 5, 0, 11, 11, 16).add(4, 4, 11, 12, 12, 17) - .forDirectional(SOUTH), + EXTRACTOR = + shape(4, 2, 11, 12, 10, 17).forDirectional(SOUTH).withVerticalShapes(cuboid(4, 11, 4, 12, 17, 12)), + TRANSPOSER = + shape(4, 4, -1, 12, 12, 1).add(5, 5, 0, 11, 11, 16).add(4, 4, 11, 12, 12, 17).forDirectional(SOUTH), FURNACE_ENGINE = shape(1, 1, 0, 15, 15, 16).add(0, 0, 9, 16, 16, 14).forHorizontal(Direction.SOUTH), PORTABLE_STORAGE_INTERFACE = shape(0, 0, 0, 16, 12, 16).add(3, 12, 3, 13, 16, 13).forDirectional(), PULLEY = shape(0, 0, 0, 16, 16, 2).add(1, 1, 2, 15, 15, 14).add(0, 0, 14, 16, 16, 16).forHorizontalAxis(), @@ -57,6 +57,7 @@ public class AllShapes { BELT_COLLISION_MASK = cuboid(0, 0, 0, 16, 19, 16), SCHEMATICANNON_SHAPE = shape(1, 0, 1, 15, 8, 15).add(0.5, 8, 0.5, 15.5, 11, 15.5).build(), PULLEY_MAGNET = shape(3, 0, 3, 13, 2, 13).add(FOUR_VOXEL_POLE.get(UP)).build(), + MILLSTONE = shape(0, 0, 0, 16, 6, 16).add(2, 6, 2, 14, 13, 14).add(3, 13, 3, 13, 16, 13).build(), GAUGE_SHAPE_UP = shape(1, 0, 0, 15, 2, 16).add(2, 2, 1, 14, 14, 15).build() ; @@ -64,15 +65,16 @@ public class AllShapes { // Internally Shared Shapes private static final VoxelShape - PISTON_HEAD = Blocks.PISTON_HEAD.getDefaultState().with(DirectionalBlock.FACING, UP) - .with(PistonHeadBlock.SHORT, true).getShape(null, null), + PISTON_HEAD = + Blocks.PISTON_HEAD.getDefaultState().with(DirectionalBlock.FACING, UP).with(PistonHeadBlock.SHORT, true) + .getShape(null, null), PISTON_EXTENDED = shape(CASING_12PX.get(UP)).add(FOUR_VOXEL_POLE.get(Axis.Y)).build(), SMALL_GEAR_SHAPE = cuboid(2, 6, 2, 14, 10, 14), LARGE_GEAR_SHAPE = cuboid(0, 6, 0, 16, 10, 16), VERTICAL_TABLET_SHAPE = cuboid(3, 1, -1, 13, 15, 3), SQUARE_TABLET_SHAPE = cuboid(2, 2, -1, 14, 14, 3), - LOGISTICS_TABLE_SLOPE = shape(0, 10, 15, 16, 14, 10.667).add(0, 12, 10.667, 16, 16, 6.333) - .add(0, 14, 6.333, 16, 18, 2).build(), - SCHEMATICS_TABLE_SLOPE = shape(0, 10, 16, 16, 14, 11).add(0, 12, 11, 16, 16, 6).add(0, 14, 6, 16, 18, 1) - .build() + LOGISTICS_TABLE_SLOPE = + shape(0, 10, 15, 16, 14, 10.667).add(0, 12, 10.667, 16, 16, 6.333).add(0, 14, 6.333, 16, 18, 2).build(), + SCHEMATICS_TABLE_SLOPE = + shape(0, 10, 16, 16, 14, 11).add(0, 12, 11, 16, 16, 6).add(0, 14, 6, 16, 18, 1).build() ; @@ -84,8 +86,8 @@ public class AllShapes { SMALL_GEAR = shape(SMALL_GEAR_SHAPE).add(SIX_VOXEL_POLE.get(Axis.Y)).forAxis(), LARGE_GEAR = shape(LARGE_GEAR_SHAPE).add(SIX_VOXEL_POLE.get(Axis.Y)).forAxis(), LOGISTICAL_CONTROLLER = shape(SQUARE_TABLET_SHAPE).forDirectional(SOUTH), - REDSTONE_BRIDGE = shape(VERTICAL_TABLET_SHAPE).forDirectional(SOUTH) - .withVerticalShapes(LOGISTICAL_CONTROLLER.get(UP)), + REDSTONE_BRIDGE = + shape(VERTICAL_TABLET_SHAPE).forDirectional(SOUTH).withVerticalShapes(LOGISTICAL_CONTROLLER.get(UP)), LOGISTICS_TABLE = shape(TABLE_POLE_SHAPE).add(LOGISTICS_TABLE_SLOPE).forHorizontal(SOUTH), SCHEMATICS_TABLE = shape(TABLE_POLE_SHAPE).add(SCHEMATICS_TABLE_SLOPE).forDirectional(SOUTH) @@ -120,8 +122,8 @@ public class AllShapes { } Builder erase(double x1, double y1, double z1, double x2, double y2, double z2) { - this.shape = VoxelShapes.combineAndSimplify(shape, cuboid(x1, y1, z1, x2, y2, z2), - IBooleanFunction.ONLY_FIRST); + this.shape = + VoxelShapes.combineAndSimplify(shape, cuboid(x1, y1, z1, x2, y2, z2), IBooleanFunction.ONLY_FIRST); return this; } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/RotationPropagator.java b/src/main/java/com/simibubi/create/modules/contraptions/RotationPropagator.java index 0e4252954..15bfe06ba 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/RotationPropagator.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/RotationPropagator.java @@ -1,7 +1,6 @@ package com.simibubi.create.modules.contraptions; import static com.simibubi.create.AllBlocks.BELT; -import static com.simibubi.create.AllBlocks.COGWHEEL; import static com.simibubi.create.AllBlocks.LARGE_COGWHEEL; import static net.minecraft.state.properties.BlockStateProperties.AXIS; @@ -58,8 +57,8 @@ public class RotationPropagator { alignedAxes && definitionFrom.hasShaftTowards(world, from.getPos(), stateFrom, direction) && definitionTo.hasShaftTowards(world, to.getPos(), stateTo, direction.getOpposite()); - boolean connectedByGears = definitionFrom.hasCogsTowards(world, from.getPos(), stateFrom, direction) - && definitionTo.hasCogsTowards(world, to.getPos(), stateTo, direction.getOpposite()); + boolean connectedByGears = definitionFrom.hasIntegratedCogwheel(world, from.getPos(), stateFrom) + && definitionTo.hasIntegratedCogwheel(world, to.getPos(), stateTo); // Belt <-> Belt if (from instanceof BeltTileEntity && to instanceof BeltTileEntity && !connectedByAxis) { @@ -91,10 +90,12 @@ public class RotationPropagator { } // Gear <-> Large Gear - if (isLargeToSmallGear(stateFrom, stateTo, diff)) - return -2f; - if (isLargeToSmallGear(stateTo, stateFrom, diff)) - return -.5f; + if (LARGE_COGWHEEL.typeOf(stateFrom) && definitionTo.hasIntegratedCogwheel(world, to.getPos(), stateTo)) + if (isLargeToSmallGear(stateFrom, stateTo, definitionTo, diff)) + return -2f; + if (LARGE_COGWHEEL.typeOf(stateTo) && definitionFrom.hasIntegratedCogwheel(world, from.getPos(), stateFrom)) + if (isLargeToSmallGear(stateTo, stateFrom, definitionFrom, diff)) + return -.5f; // Gear <-> Gear if (connectedByGears) { @@ -102,6 +103,8 @@ public class RotationPropagator { return 0; if (LARGE_COGWHEEL.typeOf(stateTo)) return 0; + if (direction.getAxis() == definitionFrom.getRotationAxis(stateFrom)) + return 0; if (definitionFrom.getRotationAxis(stateFrom) == definitionTo.getRotationAxis(stateTo)) return -1; } @@ -157,11 +160,9 @@ public class RotationPropagator { return 1; } - private static boolean isLargeToSmallGear(BlockState from, BlockState to, BlockPos diff) { - if (!LARGE_COGWHEEL.typeOf(from) || !COGWHEEL.typeOf(to)) - return false; + private static boolean isLargeToSmallGear(BlockState from, BlockState to, IRotate defTo, BlockPos diff) { Axis axisFrom = from.get(AXIS); - if (axisFrom != to.get(AXIS)) + if (axisFrom != defTo.getRotationAxis(to)) return false; if (axisFrom.getCoordinate(diff.getX(), diff.getY(), diff.getZ()) != 0) return false; @@ -407,8 +408,13 @@ public class RotationPropagator { BlockState blockState = te.getBlockState(); boolean isLargeWheel = LARGE_COGWHEEL.typeOf(blockState); - if (COGWHEEL.typeOf(blockState) || isLargeWheel || BELT.typeOf(blockState)) { - Axis axis = ((IRotate) blockState.getBlock()).getRotationAxis(blockState); + if (!(blockState.getBlock() instanceof IRotate)) + return neighbours; + IRotate block = (IRotate) blockState.getBlock(); + + if (block.hasIntegratedCogwheel(te.getWorld(), te.getPos(), blockState) || isLargeWheel + || BELT.typeOf(blockState)) { + Axis axis = block.getRotationAxis(blockState); BlockPos.getAllInBox(new BlockPos(-1, -1, -1), new BlockPos(1, 1, 1)).forEach(offset -> { if (!isLargeWheel && axis.getCoordinate(offset.getX(), offset.getY(), offset.getZ()) != 0) 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 917ac8c56..2c1ea85bb 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 @@ -118,8 +118,8 @@ public interface IRotate extends IWrenchable { } public boolean hasShaftTowards(IWorldReader world, BlockPos pos, BlockState state, Direction face); - - public boolean hasCogsTowards(IWorldReader world, BlockPos pos, BlockState state, Direction face); + + public boolean hasIntegratedCogwheel(IWorldReader world, BlockPos pos, BlockState state); public Axis getRotationAxis(BlockState state); diff --git a/src/main/java/com/simibubi/create/modules/contraptions/base/KineticBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/base/KineticBlock.java index 215172baa..f74aab4f4 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/base/KineticBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/base/KineticBlock.java @@ -55,7 +55,7 @@ public abstract class KineticBlock extends Block implements IRotate { } @Override - public boolean hasCogsTowards(IWorldReader world, BlockPos pos, BlockState state, Direction face) { + public boolean hasIntegratedCogwheel(IWorldReader world, BlockPos pos, BlockState state) { return false; } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/crafter/MechanicalCrafterBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/crafter/MechanicalCrafterBlock.java index 9f13847b3..78c0f96d4 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/crafter/MechanicalCrafterBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/crafter/MechanicalCrafterBlock.java @@ -67,8 +67,8 @@ public class MechanicalCrafterBlock extends HorizontalKineticBlock } @Override - public boolean hasCogsTowards(IWorldReader world, BlockPos pos, BlockState state, Direction face) { - return state.get(HORIZONTAL_FACING).getAxis() != face.getAxis(); + public boolean hasIntegratedCogwheel(IWorldReader world, BlockPos pos, BlockState state) { + return true; } @Override diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/AbstractCrushingRecipe.java b/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/AbstractCrushingRecipe.java new file mode 100644 index 000000000..a3bc18aa2 --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/AbstractCrushingRecipe.java @@ -0,0 +1,20 @@ +package com.simibubi.create.modules.contraptions.components.crusher; + +import java.util.List; + +import com.simibubi.create.AllRecipes; +import com.simibubi.create.modules.contraptions.processing.ProcessingIngredient; +import com.simibubi.create.modules.contraptions.processing.ProcessingOutput; +import com.simibubi.create.modules.contraptions.processing.ProcessingRecipe; + +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.items.wrapper.RecipeWrapper; + +public abstract class AbstractCrushingRecipe extends ProcessingRecipe { + + public AbstractCrushingRecipe(AllRecipes recipeType, ResourceLocation id, String group, + List ingredients, List results, int processingDuration) { + super(recipeType, id, group, ingredients, results, processingDuration); + } + +} diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingRecipe.java b/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingRecipe.java index 0d424da82..159056b95 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingRecipe.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingRecipe.java @@ -5,13 +5,12 @@ import java.util.List; import com.simibubi.create.AllRecipes; import com.simibubi.create.modules.contraptions.processing.ProcessingIngredient; import com.simibubi.create.modules.contraptions.processing.ProcessingOutput; -import com.simibubi.create.modules.contraptions.processing.ProcessingRecipe; import net.minecraft.util.ResourceLocation; import net.minecraft.world.World; import net.minecraftforge.items.wrapper.RecipeWrapper; -public class CrushingRecipe extends ProcessingRecipe { +public class CrushingRecipe extends AbstractCrushingRecipe { public CrushingRecipe(ResourceLocation id, String group, List ingredients, List results, int processingDuration) { diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingWheelControllerTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingWheelControllerTileEntity.java index 71f35b7f6..9f2feb3af 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingWheelControllerTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingWheelControllerTileEntity.java @@ -13,6 +13,7 @@ import com.simibubi.create.foundation.block.SyncedTileEntity; import com.simibubi.create.foundation.item.ItemHelper; import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.modules.contraptions.processing.ProcessingInventory; +import com.simibubi.create.modules.contraptions.processing.ProcessingRecipe; import net.minecraft.entity.Entity; import net.minecraft.entity.item.ItemEntity; @@ -172,8 +173,7 @@ public class CrushingWheelControllerTileEntity extends SyncedTileEntity implemen } private void applyRecipe() { - Optional recipe = - world.getRecipeManager().getRecipe(AllRecipes.CRUSHING.getType(), wrapper, world); + Optional> recipe = findRecipe(); List list = new ArrayList<>(); if (recipe.isPresent()) { @@ -194,6 +194,14 @@ public class CrushingWheelControllerTileEntity extends SyncedTileEntity implemen } + public Optional> findRecipe() { + Optional> crushingRecipe = + world.getRecipeManager().getRecipe(AllRecipes.CRUSHING.getType(), wrapper, world); + if (!crushingRecipe.isPresent()) + crushingRecipe = world.getRecipeManager().getRecipe(AllRecipes.MILLING.getType(), wrapper, world); + return crushingRecipe; + } + @Override public CompoundNBT write(CompoundNBT compound) { if (hasEntity() && !isFrozen()) @@ -222,8 +230,7 @@ public class CrushingWheelControllerTileEntity extends SyncedTileEntity implemen } private void itemInserted(ItemStack stack) { - Optional recipe = - world.getRecipeManager().getRecipe(AllRecipes.CRUSHING.getType(), wrapper, world); + Optional> recipe = findRecipe(); inventory.remainingTime = recipe.isPresent() ? recipe.get().getProcessingDuration() : 100; inventory.appliedRecipe = false; } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillingRecipe.java b/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillingRecipe.java new file mode 100644 index 000000000..c9a480b35 --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillingRecipe.java @@ -0,0 +1,33 @@ +package com.simibubi.create.modules.contraptions.components.millstone; + +import java.util.List; + +import com.simibubi.create.AllRecipes; +import com.simibubi.create.modules.contraptions.components.crusher.AbstractCrushingRecipe; +import com.simibubi.create.modules.contraptions.processing.ProcessingIngredient; +import com.simibubi.create.modules.contraptions.processing.ProcessingOutput; + +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; +import net.minecraftforge.items.wrapper.RecipeWrapper; + +public class MillingRecipe extends AbstractCrushingRecipe { + + public MillingRecipe(ResourceLocation id, String group, List ingredients, + List results, int processingDuration) { + super(AllRecipes.MILLING, id, group, ingredients, results, processingDuration); + } + + @Override + public boolean matches(RecipeWrapper inv, World worldIn) { + if (inv.isEmpty()) + return false; + return ingredients.get(0).test(inv.getStackInSlot(0)); + } + + @Override + protected int getMaxOutputCount() { + return 7; + } + +} diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneBlock.java new file mode 100644 index 000000000..28adb70db --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneBlock.java @@ -0,0 +1,53 @@ +package com.simibubi.create.modules.contraptions.components.millstone; + +import com.simibubi.create.foundation.utility.AllShapes; +import com.simibubi.create.modules.contraptions.base.KineticBlock; + +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.Direction; +import net.minecraft.util.Direction.Axis; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.IWorldReader; + +public class MillstoneBlock extends KineticBlock { + + public MillstoneBlock() { + super(Properties.from(Blocks.ANDESITE)); + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) { + return new MillstoneTileEntity(); + } + + @Override + protected boolean hasStaticPart() { + return true; + } + + @Override + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + return AllShapes.MILLSTONE; + } + + @Override + public boolean hasShaftTowards(IWorldReader world, BlockPos pos, BlockState state, Direction face) { + return face == Direction.DOWN; + } + + @Override + public boolean hasIntegratedCogwheel(IWorldReader world, BlockPos pos, BlockState state) { + return true; + } + + @Override + public Axis getRotationAxis(BlockState state) { + return Axis.Y; + } + +} diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneRenderer.java b/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneRenderer.java new file mode 100644 index 000000000..ff8b12d84 --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneRenderer.java @@ -0,0 +1,16 @@ +package com.simibubi.create.modules.contraptions.components.millstone; + +import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.CreateClient; +import com.simibubi.create.foundation.utility.SuperByteBuffer; +import com.simibubi.create.modules.contraptions.base.KineticTileEntity; +import com.simibubi.create.modules.contraptions.base.KineticTileEntityRenderer; + +public class MillstoneRenderer extends KineticTileEntityRenderer { + + @Override + protected SuperByteBuffer getRotatedModel(KineticTileEntity te) { + return CreateClient.bufferCache.renderPartial(AllBlockPartials.MILL_STONE_COG, te.getBlockState()); + } + +} diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneTileEntity.java new file mode 100644 index 000000000..0059bb366 --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneTileEntity.java @@ -0,0 +1,175 @@ +package com.simibubi.create.modules.contraptions.components.millstone; + +import java.util.Optional; + +import com.simibubi.create.AllRecipes; +import com.simibubi.create.AllTileEntities; +import com.simibubi.create.foundation.utility.VecHelper; +import com.simibubi.create.modules.contraptions.base.KineticTileEntity; + +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.particles.ItemParticleData; +import net.minecraft.particles.ParticleTypes; +import net.minecraft.util.Direction; +import net.minecraft.util.Direction.Axis; +import net.minecraft.util.math.MathHelper; +import net.minecraft.util.math.Vec3d; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.common.util.LazyOptional; +import net.minecraftforge.items.CapabilityItemHandler; +import net.minecraftforge.items.ItemHandlerHelper; +import net.minecraftforge.items.ItemStackHandler; +import net.minecraftforge.items.wrapper.CombinedInvWrapper; +import net.minecraftforge.items.wrapper.RecipeWrapper; + +public class MillstoneTileEntity extends KineticTileEntity { + + public ItemStackHandler inputInv; + public ItemStackHandler outputInv; + public int timer; + private MillingRecipe lastRecipe; + + public MillstoneTileEntity() { + super(AllTileEntities.MILLSTONE.type); + inputInv = new ItemStackHandler(1); + outputInv = new ItemStackHandler(9); + } + + @Override + public void tick() { + super.tick(); + + if (getSpeed() == 0) + return; + for (int i = 0; i < outputInv.getSlots(); i++) + if (outputInv.getStackInSlot(i).getCount() == outputInv.getSlotLimit(i)) + return; + + if (timer > 0) { + timer -= getProcessingSpeed(); + + if (world.isRemote) { + spawnParticles(); + return; + } + if (timer <= 0) + process(); + return; + } + + if (inputInv.getStackInSlot(0).isEmpty()) + return; + + RecipeWrapper inventoryIn = new RecipeWrapper(inputInv); + if (lastRecipe == null || !lastRecipe.matches(inventoryIn, world)) { + Optional recipe = + world.getRecipeManager().getRecipe(AllRecipes.MILLING.getType(), inventoryIn, world); + inputInv.getStackInSlot(0).shrink(1); + if (!recipe.isPresent()) { + timer = 100; + sendData(); + } else { + lastRecipe = recipe.get(); + timer = lastRecipe.getProcessingDuration(); + sendData(); + } + return; + } + + timer = lastRecipe.getProcessingDuration(); + sendData(); + } + + private void process() { + RecipeWrapper inventoryIn = new RecipeWrapper(inputInv); + ItemStack stackInSlot = inputInv.getStackInSlot(0); + stackInSlot.shrink(1); + inputInv.setStackInSlot(0, stackInSlot); + + if (lastRecipe == null || !lastRecipe.matches(inventoryIn, world)) { + Optional recipe = + world.getRecipeManager().getRecipe(AllRecipes.MILLING.getType(), inventoryIn, world); + if (!recipe.isPresent()) + return; + lastRecipe = recipe.get(); + } + + lastRecipe.rollResults().forEach(stack -> ItemHandlerHelper.insertItemStacked(outputInv, stack, false)); + sendData(); + markDirty(); + } + + public void spawnParticles() { + ItemStack stackInSlot = inputInv.getStackInSlot(0); + if (stackInSlot.isEmpty()) + return; + + ItemParticleData data = new ItemParticleData(ParticleTypes.ITEM, stackInSlot); + float angle = world.rand.nextFloat() * 360; + Vec3d offset = new Vec3d(0, 0, 0.5f); + offset = VecHelper.rotate(offset, angle, Axis.Y); + Vec3d target = VecHelper.rotate(offset, getSpeed() > 0 ? 25 : -25, Axis.Y); + + Vec3d center = offset.add(VecHelper.getCenterOf(pos)); + target = VecHelper.offsetRandomly(target.subtract(offset), world.rand, 1 / 128f); + world.addParticle(data, center.x, center.y, center.z, target.x, target.y, target.z); + } + + @Override + public CompoundNBT write(CompoundNBT compound) { + compound.putInt("Timer", timer); + compound.put("InputInventory", inputInv.serializeNBT()); + compound.put("OutputInventory", outputInv.serializeNBT()); + return super.write(compound); + } + + @Override + public void read(CompoundNBT compound) { + timer = compound.getInt("Timer"); + inputInv.deserializeNBT(compound.getCompound("InputInventory")); + outputInv.deserializeNBT(compound.getCompound("OutputInventory")); + super.read(compound); + } + + public int getProcessingSpeed() { + return MathHelper.clamp((int) Math.abs(getSpeed() / 16f), 1, 512); + } + + @Override + public LazyOptional getCapability(Capability cap, Direction side) { + if (cap == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) + return LazyOptional.of(MillstoneInventoryHandler::new).cast(); + return super.getCapability(cap, side); + } + + private class MillstoneInventoryHandler extends CombinedInvWrapper { + + public MillstoneInventoryHandler() { + super(inputInv, outputInv); + } + + @Override + public boolean isItemValid(int slot, ItemStack stack) { + if (outputInv == getHandlerFromIndex(getIndexForSlot(slot))) + return false; + return super.isItemValid(slot, stack); + } + + @Override + public ItemStack insertItem(int slot, ItemStack stack, boolean simulate) { + if (outputInv == getHandlerFromIndex(getIndexForSlot(slot))) + return stack; + return super.insertItem(slot, stack, simulate); + } + + @Override + public ItemStack extractItem(int slot, int amount, boolean simulate) { + if (inputInv == getHandlerFromIndex(getIndexForSlot(slot))) + return ItemStack.EMPTY; + return super.extractItem(slot, amount, simulate); + } + + } + +} diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/mixer/MechanicalMixerBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/mixer/MechanicalMixerBlock.java index cd1985525..f4558e1e4 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/mixer/MechanicalMixerBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/mixer/MechanicalMixerBlock.java @@ -66,8 +66,8 @@ public class MechanicalMixerBlock extends KineticBlock } @Override - public boolean hasCogsTowards(IWorldReader world, BlockPos pos, BlockState state, Direction face) { - return face.getAxis().isHorizontal(); + public boolean hasIntegratedCogwheel(IWorldReader world, BlockPos pos, BlockState state) { + return true; } @Override 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 08f271c46..34edfe075 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 @@ -64,7 +64,7 @@ public class CogWheelBlock extends ShaftBlock implements IHaveCustomBlockItem { } if (!(block instanceof IRotate) - || !(((IRotate) block).hasCogsTowards(world, placedOnPos, placedAgainst, context.getFace()))) { + || !(((IRotate) block).hasIntegratedCogwheel(world, placedOnPos, placedAgainst))) { Axis preferredAxis = getPreferredAxis(context); if (preferredAxis != null) return this.getDefaultState().with(AXIS, preferredAxis); @@ -91,8 +91,8 @@ public class CogWheelBlock extends ShaftBlock implements IHaveCustomBlockItem { // IRotate @Override - public boolean hasCogsTowards(IWorldReader world, BlockPos pos, BlockState state, Direction face) { - return !isLarge && face.getAxis() != state.get(AXIS); + public boolean hasIntegratedCogwheel(IWorldReader world, BlockPos pos, BlockState state) { + return !isLarge; } @Override diff --git a/src/main/resources/assets/create/blockstates/millstone.json b/src/main/resources/assets/create/blockstates/millstone.json new file mode 100644 index 000000000..4d78d4cab --- /dev/null +++ b/src/main/resources/assets/create/blockstates/millstone.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "create:block/millstone/casing" } + } +} \ 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 1c22e1a43..9b03596d7 100644 --- a/src/main/resources/assets/create/lang/en_us.json +++ b/src/main/resources/assets/create/lang/en_us.json @@ -16,7 +16,6 @@ "item.create.goggles": "Engineer's Goggles", "item.create.filter": "Filter", "item.create.property_filter": "Attribute Filter", - "item.create.logistical_filter": "Address Filter", "item.create.rose_quartz": "Rose Quartz", "item.create.polished_rose_quartz": "Polished Rose Quartz", "item.create.refined_radiance": "Refined Radiance", @@ -53,13 +52,6 @@ "item.create.electron_tube": "Electron Tube", "item.create.integrated_circuit": "Integrated Circuit", - "item.create.logistical_controller_supply": "Item Supply", - "item.create.logistical_controller_request": "Item Request", - "item.create.logistical_controller_storage": "Item Storage", - "item.create.logistical_controller_calculation": "Ingredient Calculator", - "item.create.logistical_controller_transactions": "Task Manager", - "item.create.logistical_dial": "Logistical Dial", - "item.create.blazing_pickaxe": "Blazing Pickaxe", "item.create.blazing_shovel": "Blazing Shovel", "item.create.blazing_axe": "Blazing Axe", @@ -101,6 +93,7 @@ "block.create.cuckoo_clock": "Cuckoo Clock", "block.create.creative_motor": "Motor", "block.create.belt": "Mechanical Belt", + "block.create.millstone": "Millstone", "block.create.crushing_wheel": "Crushing Wheel", "block.create.drill": "Mechanical Drill", "block.create.portable_storage_interface": "Portable Storage Interface", @@ -147,11 +140,6 @@ "block.create.toggle_latch": "Powered Toggle Latch", "block.create.flexpeater": "Adjustable Repeater", "block.create.entity_detector": "Belt Observer", - "block.create.logistical_casing": "Logistical Casing", - "block.create.logistical_controller": "Logistical Controller", - "block.create.logistical_index": "Logistical Index", - "block.create.logisticians_table": "Logistician's Table", - "block.create.package_funnel": "Package Funnel", "block.create.belt_tunnel": "Conveyor Tunnel", "block.create.sequenced_gearshift": "Sequenced Gearshift", @@ -269,8 +257,6 @@ "block.create.cocoa_log": "Cocoa Jungle Log", - "block.create.shop_shelf": "Shelf", - "_comment": "-------------------------] UI & MESSAGES [------------------------------------------------", "death.attack.create.crush": "%1$s was processed by Crushing Wheels", @@ -544,20 +530,6 @@ "create.schematicannon.status.schematicNotPlaced": "Schematic Not Deployed", "create.schematicannon.status.schematicExpired": "Schematic File Expired", - "create.gui.index.title": "Logistical Index", - "create.gui.index.targetAddressSelect": "Destination Address", - "create.gui.index.confirmOrder": "Confirm Order", - - "create.logistics.priority": "Priority", - "create.logistics.priority.lowest": "Lowest", - "create.logistics.priority.low": "Low", - "create.logistics.priority.high": "High", - "create.logistics.priority.highest": "Highest", - "create.gui.logistical_controller.active_mode": "Active Mode", - "create.gui.logistical_controller.passive_mode": "Passive Mode", - "create.gui.requester.requestedItemCount": "Requested Amount", - "create.gui.storage.passiveModeOnly": "Item Storage is Passive Only", - "create.gui.filter.blacklist": "Blacklist", "create.gui.filter.blacklist.description": "Items pass if they do NOT match any of the above. An empty Blacklist accepts everything.", "create.gui.filter.whitelist": "Whitelist", @@ -1161,16 +1133,5 @@ "tool.create.rose_quartz.tooltip": "ROSE QUARTZ TOOLS", "tool.create.rose_quartz.tooltip.summary": "This tool grants you a _greater_ _reach_ for _breaking_ _blocks_ or _placing_ _blocks_ from the off-hand.", - "item.create.logistical_controller_calculation.tooltip": "WIP", - "item.create.logistical_controller_request.tooltip": "WIP", - "item.create.logistical_controller_storage.tooltip": "WIP", - "item.create.logistical_controller_supply.tooltip": "WIP", - "item.create.logistical_controller_transactions.tooltip": "WIP", - "block.create.logistical_index.tooltip": "WIP", - "block.create.package_funnel.tooltip": "WIP", - "block.create.logisticians_table.tooltip": "WIP", - "item.create.logistical_dial.tooltip": "WIP", - "item.create.logistical_filter.tooltip": "WIP", - "itemGroup.create": "Create" } diff --git a/src/main/resources/assets/create/lang/fr_fr.json b/src/main/resources/assets/create/lang/fr_fr.json new file mode 100644 index 000000000..ae456fc26 --- /dev/null +++ b/src/main/resources/assets/create/lang/fr_fr.json @@ -0,0 +1,1174 @@ +{ + + "_comment": "-------------------------] GAME ELEMENTS [------------------------------------------------", + + "item.create.symmetry_wand": "Bâton de symétrie", + "item.create.placement_handgun": "Blockzappeur portable", + "item.create.terrain_zapper": "Térraformeur portable", + "item.create.tree_fertilizer": "Engrais pour arbre", + "item.create.empty_blueprint": "Schéma vide", + "item.create.andesite_alloy": "Alliage d'andésite", + "item.create.chromatic_compound": "Composé chromatique", + "item.create.shadow_steel": "Acier sombre", + "item.create.blueprint_and_quill": "Schéma et plume", + "item.create.blueprint": "Schéma", + "item.create.belt_connector": "Tapis roulant", + "item.create.goggles": "Lunettes d'ingénieur", + "item.create.filter": "Filtre", + "item.create.property_filter": "Filtre d'attribut", + "item.create.logistical_filter": "Filtre d'adresses", + "item.create.rose_quartz": "Quartz rose", + "item.create.polished_rose_quartz": "Quartz rose poli", + "item.create.refined_radiance": "Éclat raffiné", + "item.create.iron_sheet": "Plaque de Fer", + "item.create.gold_sheet": "Plaque d'Or", + "item.create.lapis_plate": "Plaque de Lapis", + "item.create.obsidian_dust": "Obsidienne en poudre", + "item.create.propeller": "Hélice", + "item.create.whisk": "Fouet", + "item.create.brass_hand": "Main", + "item.create.slot_cover": "Couvercle", + "item.create.zinc_handle": "Poignée d'outil de qualité", + "item.create.flour": "Farine de blé", + "item.create.dough": "Pâte", + "item.create.wrench": "Clé", + "item.create.deforester": "Déforesteur", + "item.create.crushed_iron": "Minerai de fer concassé", + "item.create.crushed_gold": "Minerai d'or concassé", + "item.create.sand_paper": "Papier de verre", + "item.create.red_sand_paper": "Papier de verre rouge", + + "item.create.brass_ingot": "Lingot de laiton", + "item.create.brass_sheet": "Plaques de laiton", + "item.create.brass_nugget": "Pépite de laiton", + "item.create.crushed_brass": "Laiton concassé", + "item.create.zinc_ingot": "Barre de zinc", + "item.create.zinc_nugget": "Pépite de zinc", + "item.create.crushed_zinc": "Zinc concassé", + "item.create.copper_sheet": "Plaques de cuivre", + "item.create.copper_ingot": "Lingot de cuivre", + "item.create.copper_nugget": "Pépite de cuivre", + "item.create.crushed_copper": "Cuivre concassé", + + "item.create.electron_tube": "Tube électronique", + "item.create.integrated_circuit": "Circuit intégré", + + "item.create.logistical_controller_supply": "Fourniture d'objets", + "item.create.logistical_controller_request": "Demande d'objets", + "item.create.logistical_controller_storage": "Stockage d'objets", + "item.create.logistical_controller_calculation": "Calculateur d'ingrédients", + "item.create.logistical_controller_transactions": "Gestionnaire des tâches", + "item.create.logistical_dial": "Cadran logistique", + + "item.create.blazing_pickaxe": "Pioche flamboyante", + "item.create.blazing_shovel": "Pelle flamboyante", + "item.create.blazing_axe": "Hache flamboyante", + "item.create.blazing_sword": "Épée flamboyante", + + "item.create.shadow_steel_pickaxe": "Pioche en acier sombre", + "item.create.shadow_steel_mattock": "Hoyau en acier sombre", + "item.create.shadow_steel_sword": "Épée en acier sombre", + + "item.create.rose_quartz_pickaxe": "Pioche en quartz doré", + "item.create.rose_quartz_shovel": "Pelle en quartz doré", + "item.create.rose_quartz_axe": "Hache en quartz doré", + "item.create.rose_quartz_sword": "Épée en quartz doré", + + "block.create.copper_ore": "Minerai de cuivre", + "block.create.copper_block": "Bloc de cuivre", + "block.create.copper_shingles": "Bardeaux de cuivre", + "block.create.zinc_ore": "Minerai de zinc", + + "block.create.andesite_casing": "Boîtier en andésite", + "block.create.brass_casing": "Boîtier en laiton", + "block.create.copper_casing": "Boîtier en cuivre", + + "block.create.cogwheel": "Roue dentée", + "block.create.large_cogwheel": "Grande roue dentée", + "block.create.turntable": "Plaque tournante", + "block.create.gearbox": "Boîte à roue dentée", + "block.create.gearshift": "Décaleur de rotation", + "block.create.clutch": "Embrayage", + "block.create.shaft": "Arbre mécanique", + "block.create.encased_belt": "Tapis roulant enfermé", + "block.create.encased_shaft": "Arbre mécanique enfermé", + "block.create.encased_fan": "Ventilateur enfermé", + "block.create.adjustable_pulley": "Poulie de tapis roulant analogique", + "block.create.nozzle": "Buse", + "block.create.hand_crank": "Manivelle", + "block.create.cuckoo_clock": "Horloge à coucou", + "block.create.creative_motor": "Moteur", + "block.create.belt": "Tapis roulant", + "block.create.crushing_wheel": "Roue de concassage", + "block.create.drill": "Perceuse mécanique", + "block.create.portable_storage_interface": "Interface de stockage portable", + "block.create.harvester": "Récolteuse mécanique", + "block.create.saw": "Scie mécanique", + "block.create.water_wheel": "Roue à eau", + "block.create.mechanical_press": "Presse mécanique", + "block.create.mechanical_mixer": "Mixeur mécanique", + "block.create.deployer": "Déployeur", + "block.create.basin": "Bassin", + "block.create.mechanical_crafter": "Établi mécanique", + "block.create.flywheel": "Volant d'inertie", + "block.create.furnace_engine": "Moteur de four", + "block.create.speed_gauge": "Compteur de vitesse", + "block.create.stress_gauge": "Stressomètre", + "block.create.cart_assembler": "Assembleur de wagon", + "block.create.analog_lever": "Levier analogique", + "block.create.rotation_speed_controller": "Contrôleur de vitesse de rotation", + + "block.create.sticky_mechanical_piston": "Piston mécanique collant", + "block.create.mechanical_piston": "Piston mécanique", + "block.create.mechanical_piston_head": "Tête de piston mécanique", + "block.create.piston_pole": "Pôle d'extension de piston", + "block.create.mechanical_bearing": "Roulement mécanique", + "block.create.clockwork_bearing": "Roulement mécanique horloger", + "block.create.rope_pulley": "Poulie à corde", + "block.create.rope": "Corde", + "block.create.pulley_magnet": "Aimant de poulie", + "block.create.translation_chassis": "Châssis linéaire", + "block.create.rotation_chassis": "Châssis radial", + + "block.create.contact": "Contact Redstone", + "block.create.redstone_bridge": "Liaison Redstone", + "block.create.stockswitch": "Détecteur de stockage", + "block.create.flexcrate": "Caisse ajustable", + "block.create.extractor": "Extracteur", + "block.create.belt_funnel": "Entonnoir amélioré", + "block.create.linked_extractor": "Extracteur lié", + "block.create.transposer": "Transposeur", + "block.create.linked_transposer": "Transposeur lié", + "block.create.pulse_repeater": "Répéteur d'impulsions", + "block.create.flexpulsepeater": "Répéteur d'impulsions réglable", + "block.create.redstone_latch": "Verrou alimenté", + "block.create.toggle_latch": "Verrou alimenté à bascule", + "block.create.flexpeater": "Répéteur réglable", + "block.create.entity_detector": "Observateur d'entité", + "block.create.logistical_casing": "Enveloppe logistique", + "block.create.logistical_controller": "Controlleur logistique", + "block.create.logistical_index": "Index Logistique", + "block.create.logisticians_table": "Table du Logisticien", + "block.create.package_funnel": "Entonnoir de paquets", + "block.create.belt_tunnel": "Tunnel de convoyeur", + "block.create.sequenced_gearshift": "Décaleur de rotation séquencé", + + "block.create.tiled_glass": "Verre carrelé", + "block.create.framed_glass": "Grande fenêtre en verre", + "block.create.vertical_framed_glass": "Fenêtre en verre verticale", + "block.create.horizontal_framed_glass": "Fenêtre en verre horizontale", + "block.create.oak_glass": "Fenêtre en chêne", + "block.create.spruce_glass": "Fenêtre en sapin", + "block.create.birch_glass": "Fenêtre en bouleau", + "block.create.jungle_glass": "Fenêtre en acajou", + "block.create.dark_oak_glass": "Fenêtre en chêne noir", + "block.create.acacia_glass": "Fenêtre en acacia", + "block.create.iron_glass": "Fenêtre ornée en fer", + + "block.create.tiled_glass_pane": "Vitre carrelé", + "block.create.framed_glass_pane": "Grande vitre encadrée", + "block.create.vertical_framed_glass_pane": "Vitre encadrée verticale", + "block.create.horizontal_framed_glass_pane": "Vitre encadrée horizontale", + "block.create.oak_glass_pane": "Vitre encadrée en chêne", + "block.create.spruce_glass_pane": "Vitre encadrée en sapin", + "block.create.birch_glass_pane": "Vitre encadrée en bouleau", + "block.create.jungle_glass_pane": "Vitre encadrée en acajou", + "block.create.dark_oak_glass_pane": "Vitre encadrée en chêne noir", + "block.create.acacia_glass_pane": "Vitre encadrée en acacia", + "block.create.iron_glass_pane": "Vitre encadrée ornée en fer", + + "block.create.window_in_a_block": "Fenêtre dans un bloc", + "block.create.andesite_bricks": "Briques d'andésite", + "block.create.andesite_layers": "Andesite en couches", + "block.create.diorite_bricks": "Briques de diorite", + "block.create.diorite_layers": "Diorite en couches", + "block.create.granite_bricks": "Briques de granite", + "block.create.granite_layers": "Granite en couches", + + "block.create.gabbro": "Gabbro", + "block.create.gabbro_stairs": "Escaliers de gabbro", + "block.create.gabbro_slab": "Dalle de gabbro", + "block.create.gabbro_wall": "Muret de gabbro", + "block.create.polished_gabbro": "Gabbro poli", + "block.create.gabbro_bricks": "Briques de gabbro", + "block.create.gabbro_bricks_stairs": "Escaliers en briques de gabbro", + "block.create.gabbro_bricks_wall": "Muret en briques de gabbro", + "block.create.paved_gabbro_bricks": "Briques de gabbro pavées", + "block.create.paved_gabbro_bricks_slab": "Dalle en briques de gabbro pavées", + "block.create.indented_gabbro": "Tuiles de gabbro", + "block.create.indented_gabbro_slab": "Dalle de tuiles de gabbro", + "block.create.slightly_mossy_gabbro_bricks": "Briques de gabbro légèrement moussues", + "block.create.mossy_gabbro_bricks": "Briques de gabbro moussues", + "block.create.gabbro_layers": "Gabbro en couches", + + "block.create.weathered_limestone": "Calcaire patinées", + "block.create.weathered_limestone_stairs": "Escaliers de calcaire patinées", + "block.create.weathered_limestone_wall": "Muret de calcaire patinées", + "block.create.weathered_limestone_slab": "Dalle de calcaire patinées", + "block.create.polished_weathered_limestone": "Calcaire patinées polies", + "block.create.polished_weathered_limestone_slab": "Dalle de calcaire patinées", + "block.create.weathered_limestone_bricks": "Briques de calcaire patinées", + "block.create.weathered_limestone_bricks_stairs": "Escaliers de briques de calcaire patinées", + "block.create.weathered_limestone_bricks_wall": "Muret de briques de calcaire patinées", + "block.create.weathered_limestone_bricks_slab": "Dalle de briques de calcaire patinées", + "block.create.weathered_limestone_pillar": "Pillier de calcaire patinées", + "block.create.weathered_limestone_layers": "Calcaire patinées en couches", + + "block.create.dolomite_pillar": "Pillier de dolomie", + "block.create.dolomite": "Dolomie", + "block.create.dolomite_stairs": "Escaliers de dolomie", + "block.create.dolomite_wall": "Muret de dolomie", + "block.create.dolomite_slab": "Dalle de dolomie", + "block.create.dolomite_bricks": "Briques de dolomie", + "block.create.dolomite_bricks_wall": "Muret de briques de dolomie", + "block.create.dolomite_bricks_stairs": "Escaliers de briques de dolomie", + "block.create.dolomite_bricks_slab": "Dalle de briques de dolomie", + "block.create.polished_dolomite": "Dolomie polie", + "block.create.dolomite_layers": "Dolomie en couches", + + "block.create.limesand": "Chaux", + "block.create.limestone": "Calcaire", + "block.create.limestone_stairs": "Escaliers de calcaire", + "block.create.limestone_slab": "Dalle de calcaire", + "block.create.limestone_wall": "Muret de calcaire", + "block.create.limestone_bricks": "Briques de calcaire", + "block.create.limestone_bricks_stairs": "Escaliers de briques de calcaire", + "block.create.limestone_bricks_slab": "Dalle de briques de calcaire", + "block.create.limestone_bricks_wall": "Muret de briques de calcaire", + "block.create.polished_limestone": "Calcaire poli", + "block.create.polished_limestone_slab": "Dalle de calcaire polie", + "block.create.limestone_pillar": "Pillier de calcaire", + "block.create.limestone_layers": "Calcaire en couches", + + "block.create.natural_scoria": "Scorie naturelle", + "block.create.scoria": "Scorie", + "block.create.scoria_stairs": "Escaliers de scorie", + "block.create.scoria_slab": "Dalle de scorie", + "block.create.scoria_wall": "Muret de scorie", + "block.create.scoria_bricks": "Briques de scorie", + "block.create.polished_scoria": "Scorie polie", + "block.create.polished_scoria_slab": "Dalle de scorie polie", + "block.create.scoria_pillar": "Pillier de scorie", + "block.create.scoria_layers": "Scorie en couches", + + "block.create.dark_scoria": "Scorie sombre", + "block.create.polished_dark_scoria": "Scorie sombre polie", + "block.create.dark_scoria_tiles": "Tuiles de scorie sombre", + "block.create.dark_scoria_tiles_stairs": "Escaliers de tuiles de scorie sombre", + "block.create.dark_scoria_tiles_slab": "Dalle de tuiles de scorie sombre", + "block.create.dark_scoria_bricks": "Briques de scorie sombre", + "block.create.dark_scoria_bricks_stairs": "Escaliers de briques de scorie sombre", + "block.create.dark_scoria_bricks_slab": "Dalles de briques de scorie sombre", + "block.create.dark_scoria_bricks_wall": "Muret de briques de scorie sombre", + + "block.create.schematicannon": "Schémacanon", + "block.create.schematic_table": "Table à schéma", + "block.create.creative_crate": "Créateur de schémacanon", + + "block.create.cocoa_log": "Bûche d'acajou de cacao", + + "block.create.shop_shelf": "Étagère", + + "_comment": "-------------------------] UI & MESSAGES [------------------------------------------------", + + "death.attack.create.crush": "%1$s nanana a été traitée par une roue de concassage", + "death.attack.create.fan_fire": "%1$s a été brûlé à mort par l'air chaud", + "death.attack.create.fan_lava": "%1$s a été brûlé à mort par un ventilateur de lave", + "death.attack.create.drill": "%1$s a été empalé par une perceuse mécanique", + "death.attack.create.saw": "%1$s a été coupé en deux par une scie mécanique", + "create.block.deployer.damage_source_name": "un déployeur voyou", + "death.attack.create.curse_polish": "%1$s a essayé de polir un objet maudit", + "death.attack.create.cuckoo_clock_explosion": "%1$s a été explosé par un coucou trafiquée", + + "create.recipe.crushing": "Ecrasement", + "create.recipe.splashing": "Lavage en vrac", + "create.recipe.splashing.fan": "Ventilateur derrière de l'eau qui coule", + "create.recipe.smokingViaFan": "Fumer en vrac", + "create.recipe.smokingViaFan.fan": "Fan behind Fire", + "create.recipe.blastingViaFan": "Ventilateur derrière du feu", + "create.recipe.blastingViaFan.fan": "Ventilateur derrière de la lave", + "create.recipe.pressing": "Pressage", + "create.recipe.mixing": "Mixage", + "create.recipe.packing": "Compactage", + "create.recipe.sawing": "Sciage", + "create.recipe.mechanical_crafting": "Fabrication mécanique", + "create.recipe.block_cutting": "Coupe de bloc", + "create.recipe.blockzapperUpgrade": "Blockzappeur portable", + "create.recipe.sandpaper_polishing": "Polissage au papier de verre", + "create.recipe.mystery_conversion": "Métamorphose chromatique", + "create.recipe.processing.catalyst": "Catalyseur", + "create.recipe.processing.chance": "%1$s%% de chance", + "create.recipe.processing.chanceToReturn": "%1$s%% de chance de retour", + + "create.generic.range": "Portée", + "create.generic.radius": "Rayon", + "create.generic.width": "Largeur", + "create.generic.height": "Hauteur", + "create.generic.length": "Longueur", + "create.generic.speed": "Vitesse", + "create.generic.delay": "Delai", + "create.generic.unit.ticks": "Ticks", + "create.generic.unit.seconds": "Secondes", + "create.generic.unit.minutes": "Minutes", + "create.generic.unit.rpm": "tr/min", + "create.generic.unit.stress": "us", + "create.generic.unit.degrees": "°", + + "create.action.scroll": "Faire défiler", + "create.action.confirm": "Confirmer", + "create.action.abort": "Abandonner", + "create.action.saveToFile": "Sauvegarder", + "create.action.discard": "Annuler", + + "create.keyinfo.toolmenu": "Focus sur le menu de l'outil", + + "create.gui.scrollInput.defaultTitle": "Choisissez une option:", + "create.gui.scrollInput.scrollToModify": "Faites défiler pour modifier", + "create.gui.scrollInput.scrollToAdjustAmount": "Faites défiler pour ajuster le montant", + "create.gui.scrollInput.scrollToSelect": "Faites défiler pour sélectionner", + "create.gui.scrollInput.shiftScrollsFaster": "Maj pour défiler plus rapidement", + + "create.gui.toolmenu.focusKey": "Enfoncez [%1$s] pour focus", + "create.gui.toolmenu.cycle": "[SCROLL] pour cycler", + + "create.gui.symmetryWand.mirrorType": "Mirroir", + "create.gui.symmetryWand.orientation": "Orientation", + "create.symmetry.mirror.plane": "Miroir une fois", + "create.symmetry.mirror.doublePlane": "Rectangulaire", + "create.symmetry.mirror.triplePlane": "Octogonal", + "create.orientation.orthogonal": "Orthogonal", + "create.orientation.diagonal": "Diagonal", + "create.orientation.horizontal": "Horizontal", + "create.orientation.alongZ": "Sur Z", + "create.orientation.alongX": "Sur X", + + "create.gui.blockzapper.title": "Blockzappeur portable", + "create.gui.blockzapper.replaceMode": "Mode de remplacement", + "create.gui.blockzapper.searchDiagonal": "Suivez les diagonales", + "create.gui.blockzapper.searchFuzzy": "Ignorer les bordures de matériau", + "create.gui.blockzapper.range": "Plage de propagation", + "create.gui.blockzapper.needsUpgradedAmplifier": "Nécessite un amplificateur amélioré", + "create.gui.blockzapper.patternSection": "Motif", + "create.gui.blockzapper.pattern.solid": "Solide", + "create.gui.blockzapper.pattern.checkered": "Quadrillage", + "create.gui.blockzapper.pattern.inversecheckered": "Quadrillage inversé", + "create.gui.blockzapper.pattern.chance25": "25%", + "create.gui.blockzapper.pattern.chance50": "50%", + "create.gui.blockzapper.pattern.chance75": "75%", + + "create.gui.terrainzapper.title": "Térraformeur portable", + "create.gui.terrainzapper.placement": "Placement", + "create.gui.terrainzapper.placement.merged": "Fusionner", + "create.gui.terrainzapper.placement.attached": "Attacher", + "create.gui.terrainzapper.placement.inserted": "Inserer", + "create.gui.terrainzapper.brush": "Pinceau", + "create.gui.terrainzapper.brush.cuboid": "Cuboïde", + "create.gui.terrainzapper.brush.sphere": "Sphère", + "create.gui.terrainzapper.brush.cylinder": "Cylindre", + "create.gui.terrainzapper.tool": "Outil", + "create.gui.terrainzapper.tool.fill": "Remplir", + "create.gui.terrainzapper.tool.place": "Placer", + "create.gui.terrainzapper.tool.replace": "Remplacer", + "create.gui.terrainzapper.tool.clear": "Effacer", + "create.gui.terrainzapper.tool.overlay": "Recouvrir", + "create.gui.terrainzapper.tool.flatten": "Applatir", + "create.terrainzapper.shiftRightClickToSet": "Maj + clic droit pour sélectionner une forme", + + "create.blockzapper.usingBlock": "Utilisation: %1$s", + "create.blockzapper.componentUpgrades": "Mises à niveau des composants:", + "create.blockzapper.component.body": "Corps", + "create.blockzapper.component.amplifier": "Amplifieur", + "create.blockzapper.component.accelerator": "Accélérateur", + "create.blockzapper.component.retriever": "Récupérateur", + "create.blockzapper.component.scope": "Lunette", + "create.blockzapper.componentTier.none": "Aucun", + "create.blockzapper.componentTier.brass": "Laiton", + "create.blockzapper.componentTier.chromatic": "Chromatique", + "create.blockzapper.leftClickToSet": "Clic gauche sur un bloc pour en définir le matériau", + "create.blockzapper.empty": "Plus de blocs!", + + "create.contraptions.movement_mode": "Mode de mouvement", + "create.contraptions.movement_mode.move_place": "Toujours placer à l'arrêt", + "create.contraptions.movement_mode.move_place_returned": "Placer uniquement en position de départ", + "create.contraptions.movement_mode.move_never_place": "Ne placer que lorsque l'ancre est détruite", + "create.contraptions.movement_mode.rotate_place": "Toujours placer à l'arrêt", + "create.contraptions.movement_mode.rotate_place_returned": "Placer uniquement près de l'angle initial", + "create.contraptions.movement_mode.rotate_never_place": "Ne placer que lorsque l'ancre est détruite", + + "create.logistics.filter": "Filtre", + "create.logistics.firstFrequency": "Freq. #1", + "create.logistics.secondFrequency": "Freq. #2", + + "create.gui.goggles.generator_stats": "Statistiques du générateur:", + "create.gui.goggles.kinetic_stats": "Statistiques cinétiques:", + "create.gui.goggles.at_current_speed": "À la vitesse actuelle", + "create.gui.goggles.base_value": "Valeur de base", + + "create.gui.gauge.info_header": "Informations sur la jauge:", + "create.gui.speed_gauge.title": "Vitesse de rotation", + "create.gui.stress_gauge.title": "Stress du réseau", + "create.gui.stress_gauge.capacity": "Capacité restante", + "create.gui.stress_gauge.overstressed": "Surmenée", + "create.gui.stress_gauge.no_rotation": "Pas de rotation", + + "create.gui.contraptions.not_fast_enough": "Il semblerais que ce.t.te %1$s ne tourne _pas_ à la _vitesse_ _suffisante_.", + + "create.gui.flexcrate.title": "Caisse réglable", + "create.gui.flexcrate.storageSpace": "Espace de stockage", + + "create.gui.stockswitch.title": "Commutateur de stockage", + "create.gui.stockswitch.lowerLimit": "Seuil inférieur", + "create.gui.stockswitch.upperLimit": "Seuil supérieur", + "create.gui.stockswitch.startAt": "Signal de départ à", + "create.gui.stockswitch.startAbove": "Signal de démarrage au-dessus", + "create.gui.stockswitch.stopAt": "Signal d'arrêt à", + "create.gui.stockswitch.stopBelow": "Signal d'arrêt en-dessous", + + "create.gui.sequenced_gearshift.title": "Décaleur de rotation séquencé", + "create.gui.sequenced_gearshift.instruction": "Instructions", + "create.gui.sequenced_gearshift.instruction.turn_angle": "Tourner", + "create.gui.sequenced_gearshift.instruction.turn_angle.angle": "Angle", + "create.gui.sequenced_gearshift.instruction.turn_distance": "Piston", + "create.gui.sequenced_gearshift.instruction.turn_distance.distance": "Distance", + "create.gui.sequenced_gearshift.instruction.wait": "Attente", + "create.gui.sequenced_gearshift.instruction.wait.duration": "Durée", + "create.gui.sequenced_gearshift.instruction.end": "Fin", + "create.gui.sequenced_gearshift.speed": "Vitesse, direction", + "create.gui.sequenced_gearshift.speed.forward": "Vitesse d'entrée, normal", + "create.gui.sequenced_gearshift.speed.forward_fast": "Vitesse double, normal", + "create.gui.sequenced_gearshift.speed.back": "Vitesse d'entrée, inversé", + "create.gui.sequenced_gearshift.speed.back_fast": "Vitesse double, inversée", + + "create.schematicAndQuill.dimensions": "Taille du schéma: %1$sx%2$sx%3$s", + "create.schematicAndQuill.firstPos": "Première position définie.", + "create.schematicAndQuill.secondPos": "Seconde position définie.", + "create.schematicAndQuill.noTarget": "Enfoncez [Ctrl] pour sélectionner les blocs d'air.", + "create.schematicAndQuill.abort": "Sélection supprimée.", + "create.schematicAndQuill.prompt": "Entrez un nom pour le schéma:", + "create.schematicAndQuill.fallbackName": "Mon schéma", + "create.schematicAndQuill.saved": "Sauvegardé en tant que %1$s", + + "create.schematic.invalid": "[!] objet invalide - Utilisez plutôt la table à schéma", + "create.schematic.position": "Position", + "create.schematic.rotation": "Rotation", + "create.schematic.rotation.none": "Aucune", + "create.schematic.rotation.cw90": "Sens horaire 90", + "create.schematic.rotation.cw180": "Sens horaire 180", + "create.schematic.rotation.cw270": "Sens horaire 270", + "create.schematic.mirror": "Mirroir", + "create.schematic.mirror.none": "Aucun", + "create.schematic.mirror.frontBack": "Avant-Arrière", + "create.schematic.mirror.leftRight": "Gauche-Droite", + + "create.schematic.tool.deploy": "Déployer", + "create.schematic.tool.move": "Déplacer XZ", + "create.schematic.tool.movey": "Déplacer Y", + "create.schematic.tool.rotate": "Tourner", + "create.schematic.tool.print": "Imprimer", + "create.schematic.tool.flip": "Retourner", + + "create.schematic.tool.deploy.description.0": "Déplace la structure vers un emplacement.", + "create.schematic.tool.deploy.description.1": "Clic droit sur le sol pour placer.", + "create.schematic.tool.deploy.description.2": "Maintenez [Ctrl] pour sélectionner à une distance fixe.", + "create.schematic.tool.deploy.description.3": "[Ctrl]-Défiler pour changer la distance.", + "create.schematic.tool.move.description.0": "Décale le schéma horizontalement.", + "create.schematic.tool.move.description.1": "Pointez sur le schéma et [CTRL]-Défiler pour le pousser.", + "create.schematic.tool.move.description.2": "", + "create.schematic.tool.move.description.3": "", + "create.schematic.tool.movey.description.0": "Décale le schéma verticalement.", + "create.schematic.tool.movey.description.1": "[CTRL]-Défiler pour le déplacer vers le haut / bas.", + "create.schematic.tool.movey.description.2": "", + "create.schematic.tool.movey.description.3": "", + "create.schematic.tool.rotate.description.0": "Fait pivoter le schéma autour de son centre.", + "create.schematic.tool.rotate.description.1": "[CTRL]-Défiler pour faire une rotation de 90 degrés.", + "create.schematic.tool.rotate.description.2": "", + "create.schematic.tool.rotate.description.3": "", + "create.schematic.tool.print.description.0": "Place instantanément la structure dans le monde.", + "create.schematic.tool.print.description.1": "[Clic droit] pour confirmer le placement à l'emplacement actuel.", + "create.schematic.tool.print.description.2": "Cet outil est uniquement pour le mode créatif.", + "create.schematic.tool.print.description.3": "", + "create.schematic.tool.flip.description.0": "Retourne le schéma le long de la face que vous sélectionnez.", + "create.schematic.tool.flip.description.1": "Pointez sur le schéma et [CTRL]-Défiler pour le retourner.", + "create.schematic.tool.flip.description.2": "", + "create.schematic.tool.flip.description.3": "", + + "create.schematics.synchronizing": "Synchronisation...", + "create.schematics.uploadTooLarge": "Votre schéma est trop grand.", + "create.schematics.maxAllowedSize": "La taille de fichier schématique maximale autorisée est:", + + "create.gui.schematicTable.title": "Table à schéma", + "create.gui.schematicTable.availableSchematics": "Schémas disponibles", + "create.gui.schematicTable.noSchematics": "Aucun schéma enregistré", + "create.gui.schematicTable.uploading": "Téléchargement...", + "create.gui.schematicTable.finished": "Téléchargement terminé!", + + "create.gui.schematicannon.title": "Schémacanon", + "create.gui.schematicannon.settingsTitle": "Options de placement", + "create.gui.schematicannon.listPrinter": "Imprimante de liste de matériaux", + "create.gui.schematicannon.gunpowderLevel": "Poudre à canon à %1$s%%", + "create.gui.schematicannon.shotsRemaining": "Tirs restants: %1$s", + "create.gui.schematicannon.shotsRemainingWithBackup": "Avec sauvegarde: %1$s", + "create.gui.schematicannon.optionEnabled": "Actuellement activé", + "create.gui.schematicannon.optionDisabled": "Actuellement désactivé", + "create.gui.schematicannon.option.dontReplaceSolid": "Ne remplacez pas les blocs solides", + "create.gui.schematicannon.option.replaceWithSolid": "Remplacer solide par solide", + "create.gui.schematicannon.option.replaceWithAny": "Remplacer le solide par n'importe quoi", + "create.gui.schematicannon.option.replaceWithEmpty": "Remplacer le solide par rien", + "create.gui.schematicannon.option.skipMissing": "Ignorer les blocs manquants", + "create.gui.schematicannon.option.skipTileEntities": "Protéger les Tile Entities", + + "create.gui.schematicannon.option.skipMissing.description": "Si le canon ne peut pas trouver un bloc requis pour le placement, il continuera au prochain emplacement.", + "create.gui.schematicannon.option.skipTileEntities.description": "Le canon évitera de remplacer les blocs de stockage de données tels que les coffres.", + "create.gui.schematicannon.option.dontReplaceSolid.description": "Le canon ne remplacera jamais les blocs solides dans sa zone de travail, seulement non solides et air.", + "create.gui.schematicannon.option.replaceWithSolid.description": "Le canon ne remplacera les blocs solides dans sa zone de travail que si le schéma contient un bloc solide à l'emplacement.", + "create.gui.schematicannon.option.replaceWithAny.description": "Le canon remplacera les blocs solides dans sa zone de travail si le schéma contient un bloc à l'emplacement.", + "create.gui.schematicannon.option.replaceWithEmpty.description": "Le canon effacera tous les blocs dans sa zone de travail, y compris ceux remplacés par de l'air.", + + "create.schematicannon.status.idle": "Repos", + "create.schematicannon.status.ready": "Prêt", + "create.schematicannon.status.running": "En cours", + "create.schematicannon.status.finished": "Terminé", + "create.schematicannon.status.paused": "Pausé", + "create.schematicannon.status.stopped": "Arrêté", + "create.schematicannon.status.noGunpowder": "Plus de poudre à canon", + "create.schematicannon.status.targetNotLoaded": "Le bloc n'est pas chargé", + "create.schematicannon.status.targetOutsideRange": "Cible trop lointaine", + "create.schematicannon.status.searching": "Recherche", + "create.schematicannon.status.skipping": "Saut", + "create.schematicannon.status.missingBlock": "Blocs manquants:", + "create.schematicannon.status.placing": "Placement", + "create.schematicannon.status.clearing": "Suppression des blocs", + "create.schematicannon.status.schematicInvalid": "Schéma non valide", + "create.schematicannon.status.schematicNotPlaced": "Schéma non déployé", + "create.schematicannon.status.schematicExpired": "Fichier de schéma arrivé à expiration", + + "create.gui.index.title": "Index logistique", + "create.gui.index.targetAddressSelect": "Adresse de destination", + "create.gui.index.confirmOrder": "Confirmer la commande", + + "create.logistics.priority": "Priorité", + "create.logistics.priority.lowest": "Minimum", + "create.logistics.priority.low": "Faible", + "create.logistics.priority.high": "Elevée", + "create.logistics.priority.highest": "Maximum", + "create.gui.logistical_controller.active_mode": "Mode actif", + "create.gui.logistical_controller.passive_mode": "Mode passif", + "create.gui.requester.requestedItemCount": "Quantité exigée", + "create.gui.storage.passiveModeOnly": "Le stockage des articles est passif uniquement", + + "create.gui.filter.blacklist": "Liste noire", + "create.gui.filter.blacklist.description": "Les articles réussissent s'ils ne correspondent à AUCUN des éléments ci-dessus. Une liste noire vide accepte tout.", + "create.gui.filter.whitelist": "Liste blanche", + "create.gui.filter.whitelist.description": "Les éléments réussissent s'ils correspondent à l'un des éléments ci-dessus. Une liste blanche vide rejette tout.", + "create.gui.filter.respect_data": "Respect des données", + "create.gui.filter.respect_data.description": "Les objets ne correspondent que si leur durabilité, leurs enchantements et autres attributs correspondent également.", + "create.gui.filter.ignore_data": "Ignorer les données", + "create.gui.filter.ignore_data.description": "Les éléments correspondent indépendamment de leurs attributs.", + + "create.item_attributes.placeable": "est placeable", + "create.item_attributes.consumable": "peut être mangé", + "create.item_attributes.enchanted": "est enchanté", + "create.item_attributes.damaged": "est endommagé", + "create.item_attributes.badly_damaged": "est fortement damaged", + "create.item_attributes.not_stackable": "ne peut pas s'empiler", + "create.item_attributes.equipable": "peut être équipé", + "create.item_attributes.furnace_fuel": "est du combustible", + "create.item_attributes.in_tag": "est étiqueté %1$s", + "create.item_attributes.in_item_group": "appartient à %1$s", + "create.item_attributes.added_by": "a été ajouté par %1$s", + + "create.gui.attribute_filter.no_selected_attributes": "Aucun attribut sélectionné", + "create.gui.attribute_filter.selected_attributes": "Attributs sélectionnés:", + "create.gui.attribute_filter.whitelist_disjunctive": "Liste blanche (n'importe)", + "create.gui.attribute_filter.whitelist_disjunctive.description": "Les objets réussissent s'ils possèdent l'un des attributs sélectionnés.", + "create.gui.attribute_filter.whitelist_conjunctive": "Liste blanche (tout)", + "create.gui.attribute_filter.whitelist_conjunctive.description": "Les objets ne passent que s'ils ont TOUS les attributs sélectionnés.", + "create.gui.attribute_filter.blacklist": "Liste noire", + "create.gui.attribute_filter.blacklist.description": "Les éléments réussissent s'ils n'ont AUCUN des attributs sélectionnés.", + "create.gui.attribute_filter.add_reference_item": "Ajouter un objet de référence", + + "create.tooltip.holdKey": "Enfoncez [%1$s]", + "create.tooltip.holdKeyOrKey": "Enfoncez [%1$s] ou [%2$s]", + "create.tooltip.keyShift": "Maj", + "create.tooltip.keyCtrl": "Ctrl", + + "create.tooltip.speedRequirement": "Vitesse requise: %1$s", + "create.tooltip.speedRequirement.none": "Aucune", + "create.tooltip.speedRequirement.medium": "Modérée", + "create.tooltip.speedRequirement.high": "Rapide", + + "create.tooltip.stressImpact": "Impact du stress: %1$s", + "create.tooltip.stressImpact.low": "Faible", + "create.tooltip.stressImpact.medium": "Modéré", + "create.tooltip.stressImpact.high": "Elevé", + "create.tooltip.stressImpact.overstressed": "Surmené", + + "create.tooltip.capacityProvided": "Capacité de stress: %1$s", + "create.tooltip.capacityProvided.low": "Petite", + "create.tooltip.capacityProvided.medium": "Moyenne", + "create.tooltip.capacityProvided.high": "Grande", + "create.tooltip.capacityProvided.asGenerator": "(En tant que générateur)", + "create.tooltip.generationSpeed" : "Génère à %1$s %2$s", + + "create.tooltip.analogStrength": "Force analogique: %1$s/15", + + "create.tooltip.wip": "En cours", + "create.tooltip.workInProgress": "En cours!", + + "create.tooltip.randomWipDescription0": "Veuillez garder cet objet hors de portée des enfants.", + "create.tooltip.randomWipDescription1": "Un bébé panda meurt chaque fois que vous utilisez cet objet. Chaque. Fois.", + "create.tooltip.randomWipDescription2": "À utiliser à vos risques et périls.", + "create.tooltip.randomWipDescription3": "Ce n'est pas l'objet que vous recherchez, *agites les doigts* veuillez vous disperser.", + "create.tooltip.randomWipDescription4": "Cet objet s'autodétruit en 10 secondes. 10, 9, 8...", + "create.tooltip.randomWipDescription5": "Croyez-moi, c'est inutile.", + "create.tooltip.randomWipDescription6": "En utilisant cet article, vous êtes responsables et acceptez ses conditions.", + "create.tooltip.randomWipDescription7": "Celui-ci n'est peut-être pas pour vous. Que dire de celui-là?", + "create.tooltip.randomWipDescription8": "Utilisez-le et regrettez immédiatement votre décision.", + + "create.mechanical_mixer.min_ingredients": "Ingrédients min.", + + "create.command.killTPSCommand": "killtps", + "create.command.killTPSCommand.status.slowed_by.0": "[Create]: Server tick is currently slowed by %s ms :o", + "create.command.killTPSCommand.status.slowed_by.1": "[Create]: Server tick is slowed by %s ms now >:)", + "create.command.killTPSCommand.status.slowed_by.2": "[Create]: Server tick is back to regular speed :D", + "create.command.killTPSCommand.status.usage.0": "[Create]: use /killtps stop to bring back server tick to regular speed", + "create.command.killTPSCommand.status.usage.1": "[Create]: use /killtps start to artificially slow down the server tick", + "create.command.killTPSCommand.argument.tickTime": "tickTime", + + "advancement.create:root": "Au début, Créons!", + "advancement.create:root.desc": "Il est temps de commencer à construire des Contraptions incroyables!", + "advancement.create:andesite_alloy": "Allitérations en abondance", + "advancement.create:andesite_alloy.desc": "Les matériaux de Create ont des noms étranges, l'alliage d'Andésite en fait partie.", + "advancement.create:andesite_casing": "L'âge d'andésite ", + "advancement.create:andesite_casing.desc": "Utilisez de l'andésite, du méta et du bois pour créer un boîtier de base.", + "advancement.create:crushing_wheel": "Une paire de géants", + "advancement.create:crushing_wheel.desc": "Créez des roues de concassage pour décomposer les matériaux.", + "advancement.create:rotation": "C'est vivant!", + "advancement.create:rotation.desc": "Regardez votre premier composant cinétique tourner.", + "advancement.create:overstressed": "Surchargé", + "advancement.create:overstressed.desc": "Découvrez les lois de la physique de première main.", + "advancement.create:sand_paper": "Polissage puissant", + "advancement.create:sand_paper.desc": "Créez du papier de verre pour rendre les choses jolies.", + "advancement.create:polished_rose_quartz": "Diamants roses", + "advancement.create:polished_rose_quartz.desc": "Polissez le quartz rose jusqu'à ce que vous puissiez voir à travers.", + "advancement.create:sand_paper_secret": "Poliception", + "advancement.create:sand_paper_secret.desc": "Utilisez votre papier de verre pour poncer du papier de verre.", + "advancement.create:press": "'Bonk!' ", + "advancement.create:press.desc": "Faire une presse mécanique et l'utiliser pour créer des plaques.", + "advancement.create:mixer": "Le mixer", + "advancement.create:mixer.desc": "Créer un mixeur mécanique.", + "advancement.create:brass": "Un véritable alliage", + "advancement.create:brass.desc": "Utilisez du cuivre et du zinc pour créer du laiton.", + "advancement.create:brass_casing": "L'âge de laiton", + "advancement.create:brass_casing.desc": "Utilisez du laiton et du bois nouvellement obtenus pour créer un boîtier plus avancé.", + "advancement.create:deployer": "Piquer, placer et attaquer", + "advancement.create:deployer.desc": "Créez un déployeur, le reflet parfait de vous-même.", + "advancement.create:deployer_secret": "Frappe-le, frère!", + "advancement.create:deployer_secret.desc": "Faites deux déployeurs coup de poing.", + "advancement.create:chromatic_compound": "Matériaux bipolaires", + "advancement.create:chromatic_compound.desc": "Fabriquer une barre de composé chromatique.", + "advancement.create:shadow_steel": "Retourneur du néant", + "advancement.create:shadow_steel.desc": "Créez de l'acier sombre, une barre métallique de néant.", + "advancement.create:refined_radiance": "Lumineux et inspirant", + "advancement.create:refined_radiance.desc": "Créer un éclat raffiné, une substance chromatique puissante.", + "advancement.create:refined_radiance_secret": "Forgé par le faisceau de lumière", + "advancement.create:refined_radiance_secret.desc": "Trouvez une autre façon de créer un éclat raffiné.", + "advancement.create:speed_secret": "Bien ", + "advancement.create:speed_secret.desc": "Regardez un compteur de vitesse atteindre exactement 69 tr/min.", + + "create.subtitle.schematicannon_launch_block": "Tire de schémacanon", + "create.subtitle.schematicannon_finish": "Fin de schémacanon", + "create.subtitle.slime_added": "Bruit de slime", + "create.subtitle.mechanical_press_activation": "Activation de la presse mechanique", + "create.subtitle.mechanical_press_item_break": "Cliquetis de métal", + "create.subtitle.blockzapper_place": "Blocs se zappant en place", + "create.subtitle.blockzapper_confirm": "Ding d'affirmation", + "create.subtitle.blockzapper_deny": "Boop de déclin", + "create.subtitle.block_funnel_eat": "Croc d'entonoir", + + "_comment": "-------------------------] ITEM DESCRIPTIONS [------------------------------------------------", + + "item.create.example_item.tooltip": "OBJET EXEMPLE (juste une indication que cette info-bulle existe)", + "item.create.example_item.tooltip.summary": "Une brève description de l'objet. Les _underscores_ surligne les mots.", + "item.create.example_item.tooltip.condition1": "Quand ceci", + "item.create.example_item.tooltip.behaviour1": "Donc cet objet fait ceci. (les comportements sont affichés avec shift)", + "item.create.example_item.tooltip.condition2": "Et quand cela", + "item.create.example_item.tooltip.behaviour2": "Vous pouvez ajouter autant de comportements que vous le souhaitez", + "item.create.example_item.tooltip.control1": "Lorsque Ctrl enfoncé", + "item.create.example_item.tooltip.action1": "Ces commandes sont affichées.", + + "item.create.symmetry_wand.tooltip": "BÂTON DE SYMÉTRIE", + "item.create.symmetry_wand.tooltip.summary": "Reflète parfaitement le placement des blocs sur les plans configurés.", + "item.create.symmetry_wand.tooltip.condition1": "Lorsque positionné dans la barre active", + "item.create.symmetry_wand.tooltip.behaviour1": "Reste actif", + "item.create.symmetry_wand.tooltip.control1": "Clic droit au sol", + "item.create.symmetry_wand.tooltip.action1": "_Créé_ ou _déplace_ le mirroir", + "item.create.symmetry_wand.tooltip.control2": "Clic droit dans les airs", + "item.create.symmetry_wand.tooltip.action2": "_Retire_ le mirroir actif", + "item.create.symmetry_wand.tooltip.control3": "Clic droit en étant accroupi", + "item.create.symmetry_wand.tooltip.action3": "Ouvre l'_interface_ _de_ _configuration_", + + "item.create.placement_handgun.tooltip": "BLOCKZAPPEUR", + "item.create.placement_handgun.tooltip.summary": "Nouveau gadget pour placer ou échanger des blocs à distance.", + "item.create.placement_handgun.tooltip.control1": "Clic gauche sur un bloc", + "item.create.placement_handgun.tooltip.action1": "Définit les blocs placés par l'outil sur le bloc ciblé.", + "item.create.placement_handgun.tooltip.control2": "Clic droit sur un bloc", + "item.create.placement_handgun.tooltip.action2": "_Place_ ou _remplace_ le bloc ciblé.", + "item.create.placement_handgun.tooltip.control3": "Clic droit en étant accroupi", + "item.create.placement_handgun.tooltip.action3": "Ouvre l'_interface_ _de_ _configuration_.", + + "item.create.terrain_zapper.tooltip": "TERRAFORMEUR", + "item.create.terrain_zapper.tooltip.summary": "Outil pratique pour créer des _paysage_ et _caractéristiques_ _de_ _terrain_.", + "item.create.terrain_zapper.tooltip.control1": "Clic gauche sur un bloc", + "item.create.terrain_zapper.tooltip.action1": "Définit les blocs placés par l'outil sur le bloc ciblé.", + "item.create.terrain_zapper.tooltip.control2": "Clic droit sur un bloc", + "item.create.terrain_zapper.tooltip.action2": "Applique le _pinceau_ et l'_outil_ actuellement sélectionnés à l'emplacement ciblé.", + "item.create.terrain_zapper.tooltip.control3": "Clic droit en étant accroupi", + "item.create.terrain_zapper.tooltip.action3": "Ouvre l'_interface_ _de_ _configuration_", + + "item.create.tree_fertilizer.tooltip": "ENGRAIS POUR ARBRE", + "item.create.tree_fertilizer.tooltip.summary": "Une puissante combinaison de minéraux adaptée pour accélérer la croissance des types d'arbres communs.", + "item.create.tree_fertilizer.tooltip.condition1": "Lorsqu'utilisé sur une pousse d'arbre", + "item.create.tree_fertilizer.tooltip.behaviour1": "Fait pousser des arbres _indépendamment_ de leurs _conditions_ _d'emplacement_", + + "item.create.deforester.tooltip": "DÉFORESTEUR", + "item.create.deforester.tooltip.summary": "Une _hache_ _rayonnante_ capable d'abattre des arbres en une fraction de seconde.", + + "item.create.filter.tooltip": "FILTRE", + "item.create.filter.tooltip.summary": "_Contrôle_ les _sorties_ et _entrées_ de dispositifs logistiques avec plus de _précision_, en les comparant à un _ensemble_ _d'objets_ ou à plusieurs _filtres_ _imbriqués_.", + "item.create.filter.tooltip.condition1": "Lorsque dans l'emplacement de filtre", + "item.create.filter.tooltip.behaviour1": "_Contrôle_ le flux d'object selon sa _configuration_.", + "item.create.filter.tooltip.condition2": "Clic droit", + "item.create.filter.tooltip.behaviour2": "Ouvre l'_interface_ _de_ _configuration_.", + + "item.create.property_filter.tooltip": "FILTRE D'ATTRIBUTS", + "item.create.property_filter.tooltip.summary": "_Contrôle_ les _sorties_ et les _entrées_ de dispositifs logistiques avec plus de _précision_, en les comparant à un _ensemble_ _d'objets_ ou à plusieurs _filtres_ _imbriqués_.", + "item.create.property_filter.tooltip.condition1": "Lorsque dans l'emplacement de filtre", + "item.create.property_filter.tooltip.behaviour1": "_Contrôle_ le flux d'object selon sa _configuration_.", + "item.create.property_filter.tooltip.condition2": "Clic droit", + "item.create.property_filter.tooltip.behaviour2": "Ouvre l'_interface_ _de_ _configuration_.", + + "block.create.cocoa_log.tooltip": "TRONC D'ACAJOU DE CACAO", + "block.create.cocoa_log.tooltip.summary": "Un tronc d'acajou amélioré permettant une automatisation plus facile de _fèves_ _de_ _cacao_.", + "block.create.cocoa_log.tooltip.condition1": "Lorsque mature", + "block.create.cocoa_log.tooltip.behaviour1": "Fait pousser des _fèves_ _de_ _cacao_ sur tous les côtés.", + + "item.create.empty_blueprint.tooltip": "SCHÉMA VIDE", + "item.create.empty_blueprint.tooltip.summary": "Utilisé comme ingrédient de recette et pour écrire à la _table_ _à_ _schéma_.", + + "item.create.blueprint.tooltip": "SCHÉMA", + "item.create.blueprint.tooltip.summary": "Contient une structure à positionner et à placer dans le monde. Positionnez l'hologramme comme vous le souhaitez et utilisez un _schémacanon_ pour le construire.", + "item.create.blueprint.tooltip.condition1": "Lorsque tenu en main", + "item.create.blueprint.tooltip.behaviour1": "Peut être positionné à l'aide des outils à l'écran.", + "item.create.blueprint.tooltip.control1": "Clic droit en étant accroupi", + "item.create.blueprint.tooltip.action1": "Ouvre une _interface_ pour rentrer les _coordonées_ correctes.", + + "item.create.blueprint_and_quill.tooltip": "SCHÉMA ET PLUME", + "item.create.blueprint_and_quill.tooltip.summary": "Utilisé pour enregistrer une structure de votre monde dans un fichier .nbt.", + "item.create.blueprint_and_quill.tooltip.condition1": "Étape 1", + "item.create.blueprint_and_quill.tooltip.behaviour1": "Sélectionnez deux points d'angle à l'aide du clic droit.", + "item.create.blueprint_and_quill.tooltip.condition2": "Étape 2", + "item.create.blueprint_and_quill.tooltip.behaviour2": "_Ctrl-Défilement_ sur les faces pour ajuster la taille. Cliquez à nouveau pour enregistrer.", + "item.create.blueprint_and_quill.tooltip.control1": "Clic droit", + "item.create.blueprint_and_quill.tooltip.action1": "Sélectionnez un point d'angle / confirmez la sauvegarde.", + "item.create.blueprint_and_quill.tooltip.control2": "Ctrl maintenu", + "item.create.blueprint_and_quill.tooltip.action2": "Sélectionnez des points _dans_ _les_ _airs_. Faites défiler pour régler la distance.", + "item.create.blueprint_and_quill.tooltip.control3": "Clic droit en étant accroupi", + "item.create.blueprint_and_quill.tooltip.action3": "_Réinitialise_ et supprime la sélection.", + + "block.create.creative_crate.tooltip": "CAISSE CRÉATIVE", + "block.create.creative_crate.tooltip.summary": "Fournit une réserve infinie de blocs aux _Schémacanons_ adjacents.", + + "block.create.schematicannon.tooltip": "SCHÉMACANON", + "block.create.schematicannon.tooltip.summary": "Tire des blocs pour recréer un _schéma_ déployé dans le monde. Utilise des objets des inventaires adjacents et de la _poudre_ _à_ _canon_ comme carburant.", + "block.create.schematicannon.tooltip.control1": "Clic droit", + "block.create.schematicannon.tooltip.action1": "Ouvre l'_Interface_", + + "block.create.schematic_table.tooltip": "TABLE À SCHÉMA", + "block.create.schematic_table.tooltip.summary": "Écrit les schémas enregistrés dans un _schéma_ _vide_.", + "block.create.schematic_table.tooltip.condition1": "Lorsque donné un schéma vide", + "block.create.schematic_table.tooltip.behaviour1": "Télécharge un fichier choisi à partir de votre dossier de schémas.", + + "block.create.shaft.tooltip": "ARBRE MÉCANIQUE", + "block.create.shaft.tooltip.summary": "_Relais_ la _rotation_ en ligne droite.", + + "block.create.cogwheel.tooltip": "ROUE DENTÉE", + "block.create.cogwheel.tooltip.summary": "_Relais_ la _rotation_ en ligne droite, et aux _roues_ _dentées_ adjacentes.", + + "block.create.large_cogwheel.tooltip": "GRANDE ROUE DENTÉE", + "block.create.large_cogwheel.tooltip.summary": "Une version plus grande de la _roue_ _dentée_, permettant des _changements_ dans la _vitesse_ _de_ _rotation_ lorsqu'il est connecté à son homologue plus petit.", + + "block.create.encased_shaft.tooltip": "ARBRE MÉCANIQUE ENBOÎTÉ", + "block.create.encased_shaft.tooltip.summary": "_Relais_ la _rotation_ en ligne droite. Convient pour propager la rotation à travers les murs.", + + "block.create.gearbox.tooltip": "BOÎTE DE VITESSES", + "block.create.gearbox.tooltip.summary": "_Relais_ la _rotation_ dans _quatre_ _directions_. Inverse les connexions directes.", + + "block.create.gearshift.tooltip": "DÉCALEUR DE ROTATION", + "block.create.gearshift.tooltip.summary": "Une commande pour basculer le sens de rotation des arbres connectés.", + "block.create.gearshift.tooltip.condition1": "Lorsqu'alimenté", + "block.create.gearshift.tooltip.behaviour1": "_Inverse_ la rotation sortante.", + + "block.create.clutch.tooltip": "EMBRAYAGE", + "block.create.clutch.tooltip.summary": "Une commande pour engager / désengager la rotation des arbres connectés.", + "block.create.clutch.tooltip.condition1": "Lorsqu'alimenté", + "block.create.clutch.tooltip.behaviour1": "_Arrête_ de transmettre la rotation de l'autre côté.", + + "block.create.encased_belt.tooltip": "TAPIS ROULANT ENFERMÉ", + "block.create.encased_belt.tooltip.summary": "_Relais_ la _rotation_ à travers son bloc et aux _tapis_ _roulants_ _enfermés_ attachés.", + "block.create.encased_belt.tooltip.condition1": "Lorsque connecté", + "block.create.encased_belt.tooltip.behaviour1": "Les blocs attachés auront la _même_ _vitesse_ _de_ _rotation_ et direction. Ils n'ont pas besoin de regarder dans la même direction.", + + "block.create.adjustable_pulley.tooltip": "POULIE DE TAPIS ROULANT ANALOGIQUE", + "block.create.adjustable_pulley.tooltip.summary": "_Relais_ la _rotation_ à travers son bloc et aux _tapis_ _roulants_ _enfermés_ attachés. Les _tapis_ _roulants_ _enfermés_ attachés _tourneront_ _plus_ _vite_ en fonction du _signal_ _de_ _redstone_ _analogique_ que ce bloc reçoit.", + "block.create.adjustable_pulley.tooltip.condition1": "Contrôle Redstone", + "block.create.adjustable_pulley.tooltip.behaviour1": "Sans signal, il ne va pas _accélérer_ les tapis roulants connectées. Avec un tapis roulant connectée au signal de pleine puissance, vitesse _doublées_.", + + "item.create.belt_connector.tooltip": "CONNECTEUR DE TAPIS ROULANTS", + "item.create.belt_connector.tooltip.summary": "Connecte deux _arbres_ ou plus à un _tapis_ _roulant_ _mécanique_. Les arbres connectés auront exactement la même vitesse et le même sens de rotation. La ceinture peut agir comme un _convoyeur_ pour _objets_ et _entités_.", + "item.create.belt_connector.tooltip.control1": "Clic droit sur arbre", + "item.create.belt_connector.tooltip.action1": "Sélectionne l'arbre comme une poulie de la courroie. Les deux arbres sélectionnés doivent être _alignés_ soit _verticalement_, _horizontalement_, ou _diagonalement_ en direction de la courroie.", + "item.create.belt_connector.tooltip.control2": "Clic droit en étant accroupi", + "item.create.belt_connector.tooltip.action2": "_Réinitialise_ la première position sélectionnée pour le tapis roulant.", + + "item.create.goggles.tooltip": "LUNETTES", + "item.create.goggles.tooltip.summary": "Une paire de lunettes pour augmenter votre vision avec des _informations_ _kinétiques_ utiles.", + "item.create.goggles.tooltip.condition1": "Lorsque portées", + "item.create.goggles.tooltip.behaviour1": "Affiche des _indicateurs_ _colorés_ correspondants au _niveau_ _de_ _vitesse_ d'un composant cinétique placé ainsi que _l'impact_ du _stress_ et la _capacité_ des composants individuels.", + "item.create.goggles.tooltip.condition2": "Lorsque vision portée sur une jauge", + "item.create.goggles.tooltip.behaviour2": "Affiche des informations détaillées sur la _vitesse_ ou le _stress_ du réseau auquel la jauge est connectée.", + + "item.create.wrench.tooltip": "CLÉ", + "item.create.wrench.tooltip.summary": "Un outil utile pour travailler sur les engins cinétiques. Peut être utilisé pour _tourner_, _démonter_ et _configurer_ les composants.", + "item.create.wrench.tooltip.control1": "Clic droit a kinetic block", + "item.create.wrench.tooltip.action1": "_Tourne_ les _composents_ proche ou loin de la face avec lequel vous avez interagi.", + "item.create.wrench.tooltip.control2": "Clic droit en étant accroupi", + "item.create.wrench.tooltip.action2": "_Démonte_ les _composants_ _cinétiques_ et les replace dans _votre_ _inventaire_.", + + "block.create.creative_motor.tooltip": "MOTEUR CRÉATIF", + "block.create.creative_motor.tooltip.summary": "Une source configurable de _force_ _de_ _rotation_.", + + "block.create.water_wheel.tooltip": "ROUE À EAU", + "block.create.water_wheel.tooltip.summary": "Fournit une _force_ _de_ _rotation_ provenant de _courants_ _d'eau_ adjacents.", + + "block.create.encased_fan.tooltip": "VENTILATEUR ENFERMÉ", + "block.create.encased_fan.tooltip.summary": "Convertit _force_ _de_ _rotation_ en _courants_ _d'air_ et inversement. A une variété d'utilisations.", + "block.create.encased_fan.tooltip.condition1": "Lorsqu'alimenté par de la redstone", + "block.create.encased_fan.tooltip.behaviour1": "Fournit _force_ _de_ _rotation_ à partir de toute _source_ _de_ _chaleur_ immédiatement en dessous de lui. Le ventilateur doit être tourné vers le bas.", + "block.create.encased_fan.tooltip.condition2": "Lorsque tourné", + "block.create.encased_fan.tooltip.behaviour2": "_Pousse_ ou _tire_ les entités, selon la vitesse de rotation entrante.", + "block.create.encased_fan.tooltip.condition3": "Lorsque souffle à travers des blocs spéciaux", + "block.create.encased_fan.tooltip.behaviour3": "Des particules de _liquides_ et de _feu_ sont émises dans le flux d'air. Cela peut être utilisé pour _traiter_ des _objets_.", + + "block.create.nozzle.tooltip": "BUSE", + "block.create.nozzle.tooltip.summary": "Attachez-le à l'avant d'un _ventilateur_ _enfermé_ pour répartir son effet sur les entités dans _toutes_ les _directions_.", + + "block.create.hand_crank.tooltip": "MANIVELLE", + "block.create.hand_crank.tooltip.summary": "Une simple _source_ de _force_ _de_ _rotation_ qui nécessite l'interaction des joueurs.", + "block.create.hand_crank.tooltip.condition1": "Lorsqu'utilisé", + "block.create.hand_crank.tooltip.behaviour1": "Fournit des _force_ _de_ _rotation_ à un objet attaché. _S'accroupir_ _pour_ _inverser_ la rotation.", + + "block.create.cuckoo_clock.tooltip": "COUCOU", + "block.create.cuckoo_clock.tooltip.summary": "Un bel artisanat pour _décorer_ un espace et _garder_ la _notion_ _du_ _temps_.", + "block.create.cuckoo_clock.tooltip.condition1": "Lorsque tourné", + "block.create.cuckoo_clock.tooltip.behaviour1": "Affiche le _temps_ _présent_ et joue une mélodie deux fois par jour. _S'active_ une fois le _midi_ et une fois au crépuscule, dès que les _joueurs_ _peuvent_ _dormir_.", + + "block.create.turntable.tooltip": "PLAQUE TOURNANTE", + "block.create.turntable.tooltip.summary": "Transforme la _force_ _de_ _rotation_ en une nausée.", + + "block.create.crushing_wheel.tooltip": "ROUE DE CONCASSAGE", + "block.create.crushing_wheel.tooltip.summary": "Grandes roues rotatives qui _cassent_ n'importe quoi.", + "block.create.crushing_wheel.tooltip.condition1": "Lorsque fixé à une autre roue de concassage", + "block.create.crushing_wheel.tooltip.behaviour1": "Forme une machine de concassage pour traiter une variété de choses. Les dents des roues doivent se connecter et se déplacer avec la _même_ _vitesse_ dans des _directions_ _opposées_.", + + "block.create.mechanical_press.tooltip": "PRESSE MÉCANIQUE", + "block.create.mechanical_press.tooltip.summary": "Un piston puissant pour comprimer les objets en dessous. Nécessite une _force_ _de_ _rotation_ constante.", + "block.create.mechanical_press.tooltip.condition1": "Lorsqu'alimenté par de la redstone", + "block.create.mechanical_press.tooltip.behaviour1": "_Démarre_ pour compresser les éléments déposés en dessous.", + "block.create.mechanical_press.tooltip.condition2": "Lorsqu'au-dessus d'un tapis roulant mécanique", + "block.create.mechanical_press.tooltip.behaviour2": "Compresse _Automatiquement_ les éléments passant sur le tapis roulant.", + "block.create.mechanical_mixer.tooltip.condition3": "Lorsqu'au-dessus d'un bassin", + "block.create.mechanical_mixer.tooltip.behaviour3": "Commence à _compacter_ les _objets_ dans le bassin lorsque tous les ingrédients nécessaires sont présents.", + + "block.create.basin.tooltip": "BASSIN", + "block.create.basin.tooltip.summary": "Un _objet_ _conteneur_ pratique utilisé dans le traitement avec le _mixeur_ _mécanique_ et la _presse_ _mecanique_. Prend en charge les _comparateur_ _de_ _redstone_.", + + "block.create.mechanical_mixer.tooltip": "MIXEUR MÉCANIQUE", + "block.create.mechanical_mixer.tooltip.summary": "Un fouet cinétique pour appliquer toutes les recettes d'artisanat informes aux objets en dessous. Nécessite une _force_ _de_ _rotation_ constant et un _bassin_ placé en dessous (avec un espace entre les deux).", + "block.create.mechanical_mixer.tooltip.condition1": "Lorsqu'au-dessus d'un bassin", + "block.create.mechanical_mixer.tooltip.behaviour1": "Commence à mélanger les objets dans le bassin lorsque tous les ingrédients nécessaires sont présents.", + "block.create.mechanical_mixer.tooltip.condition2": "Lorsqu'utilisé avec une clé", + "block.create.mechanical_mixer.tooltip.behaviour2": "_Configure_ la quantité minimale du _total_ _d'ingredients_ pour les recettes appliquées. Utilisez cette option pour _exclure_ les _recettes_ _indésirables_ avec des ingrédients similaires mais moins.", + + "block.create.mechanical_crafter.tooltip": "ÉTABLI MÉCANIQUE", + "block.create.mechanical_crafter.tooltip.summary": "Un assembleur cinétique pour _automatiser_ n'importe quelle recette _en_ _forme_. Placez-en _plusieurs_ _dans_ _une_ _grille_ correspondant à votre recette, et _arrangez_ _leurs_ _tapis_ _roulant_ pour créer un _flux_ qui sort de la grille sur l'un des établis.", + "block.create.mechanical_crafter.tooltip.condition1": "Lorsque tourné", + "block.create.mechanical_crafter.tooltip.behaviour1": "_Démarre_ _le_ _processus_ _d'artisanat_ dès que _tous_ les _établis_ dans la grille ont _reçu_ _un_ _objet_.", + "block.create.mechanical_crafter.tooltip.control1": "Lorsqu'utilisation de la clé à l'avant", + "block.create.mechanical_crafter.tooltip.action1": "_Fait_ _défiler_ _la_ _direction_ dans laquelle un établi individuel _déplace_ _ses_ _objets_. Pour former une grille de travail, disposer les _tapis_ _roulants_ _dans_ _un_ _flux_ qui déplace tous les articles vers un établi final. Le dernier artisan doit _pointer_ _autrepart_ de la grille.", + "block.create.mechanical_crafter.tooltip.control2": "Lorsqu'utilisation de la clé à l'arrière", + "block.create.mechanical_crafter.tooltip.action2": "_Connecte_ _l'inventaire_ _d'entrée_ des établis adjacents. Utilisez ceci pour _combiner_ les _emplacements_ dans la grille de fabrication et pour _économiser_ _sur_ _le_ _travail_ _d'entrée_.", + + "block.create.furnace_engine.tooltip": "MOTEUR DE FOUR", + "block.create.furnace_engine.tooltip.summary": "Une source puissante de _puissance_ _de_ _rotation_ qui nécessite un _four_ _allumé_ pour fonctionner.", + "block.create.furnace_engine.tooltip.condition1": "Lorsqu'attaché à un four allumé", + "block.create.furnace_engine.tooltip.behaviour1": "_Commence_ _à_ _alimenter_ un _volant_ _d'inertie_ placé devant (à 1m de distance). Utilisez un haut fourneau pour des vitesses plus élevées.", + + "block.create.flywheel.tooltip": "VOLANT D'INERTIE", + "block.create.flywheel.tooltip.summary": "Une grande roue métallique pour _exploiter_ _et_ _stabiliser_ la force générée par un _moteur_ _attaché_. Les volants d'inertie se connectent aux moteurs s'ils sont séparés _d'un_ _mètre_ et tournés à un _angle_ de _90°_ les uns des autres.", + "block.create.flywheel.tooltip.condition1": "Lorsqu'attaché à un moteur en marche", + "block.create.flywheel.tooltip.behaviour1": "Fournit une _force_ _de_ rotation_ à un engin connecté basé sur la force et la vitesse du générateur.", + + "block.create.portable_storage_interface.tooltip": "INTERFACE DE STOCKAGE PORTABLE", + "block.create.portable_storage_interface.tooltip.summary": "Un point d'échange portable pour _déplacer_ des _objets_ vers et depuis une _structure_ déplacée par un piston, un roulement, un chariot ou une poulie.", + "block.create.portable_storage_interface.tooltip.condition1": "Lorsqu'en mouvement", + "block.create.portable_storage_interface.tooltip.behaviour1": "Interagit avec les _transposeurs_ stationnaires de sorte que les transposeurs faisant _face_ _autrepart_ de l'interface tirent les objets, et les transposeurs ciblant l'interface y _insereront_ les _objets_ de l'inventaire joint. L'engin se bloquera brièvement lorsque les objets seront échangés.", + + "block.create.rotation_speed_controller.tooltip": "CONTRÔLEUR DE VITESSE DE ROTATION", + "block.create.rotation_speed_controller.tooltip.summary": "Un _relai_ _configurable_ capable d'accélérer ou de ralentir le composant cible à la vitesse souhaitée.", + "block.create.rotation_speed_controller.tooltip.condition1": "Lorsqu'attaché à une grande roue dentée", + "block.create.rotation_speed_controller.tooltip.behaviour1": "Relaie la force de rotation entrante vers la roue, essayant de faire _correspondre_ la _vitesse_ à laquelle elle est configurée. La _roue_ _dentée_ doit être _attachée_ _au_ _dessus_ du contrôleur.", + + "block.create.mechanical_piston.tooltip": "PISTON MÉCANIQUE", + "block.create.mechanical_piston.tooltip.summary": "Une version plus avancée du _piston_. Il utilise une _force_ _de_ rotation_ pour déplacer précisément les structures attachées. Les _pôles_ _d'extension_ _de_ _piston_ à l'arrière définissent la _portée_ de cet appareil. Sans extensions, le piston ne bougera pas. Utilisez un _châssis_ ou un _bloc_ _de_ slime_ pour déplacer plus d'une seule ligne de blocs.", + "block.create.mechanical_piston.tooltip.condition1": "Lorsque tourné", + "block.create.mechanical_piston.tooltip.behaviour1": "Commence à déplacer la structure attachée. La vitesse et la direction sont corrélées à la vitesse de rotation entrante.", + + "block.create.sticky_mechanical_piston.tooltip": "PISTON MÉCANIQUE COLLANT", + "block.create.sticky_mechanical_piston.tooltip.summary": "Une version plus avancée du _piston_ _collant_. Il utilise une _force_ _de_ rotation_ pour déplacer précisément les structures attachées. Les _pôles_ _d'extension_ _de_ _piston_ à l'arrière définissent la _portée_ de cet appareil. Sans extensions, le piston ne bougera pas. Utilisez un _châssis_ ou un _bloc_ _de_ slime_ pour déplacer plus d'une seule ligne de blocs.", + "block.create.sticky_mechanical_piston.tooltip.condition1": "Lorsque tourné", + "block.create.sticky_mechanical_piston.tooltip.behaviour1": "Commence à déplacer la structure attachée. La vitesse et la direction sont corrélées à la vitesse de rotation entrante.", + + "block.create.piston_pole.tooltip": "PÔLE DE PISTON", + "block.create.piston_pole.tooltip.summary": "Étend la portée des _pistons_ _mécaniques.", + "block.create.piston_pole.tooltip.condition1": "Lorsqu'attaché à un piston mécanique", + "block.create.piston_pole.tooltip.behaviour1": "Étend la portée du _piston_ d'un bloc", + + "block.create.mechanical_bearing.tooltip": "ROULEMENT MÉCANIQUE", + "block.create.mechanical_bearing.tooltip.summary": "Utilisé pour faire tourner de _plus_ _grande_ _structures_ ou pour exploiter une _force_ _de_ rotation_ contre le vent.", + "block.create.mechanical_bearing.tooltip.condition1": "Lorsque tourné", + "block.create.mechanical_bearing.tooltip.behaviour1": "Démarre les blocs attachés en rotation. Utilisez un _châssis_ ou _bloc_ _de_ _slime_ pour déplacer plus d'un seul bloc.", + "block.create.mechanical_bearing.tooltip.condition2": "Lorsqu'alimenté par de la redstone", + "block.create.mechanical_bearing.tooltip.behaviour2": "Commence à fournir une _force_ _de_ rotation_ générée à partir de la rotation de la structure attachée. La structure doit inclure des _blocs_ _de_ _voiles_ appropriés (actuellement n'importe quel bloc de laine).", + + "block.create.clockwork_bearing.tooltip": "ROULEMENT MÉCANIQUE HORLOGER", + "block.create.clockwork_bearing.tooltip.summary": "Une version avancée du _roulement_ _mécanique_ pour faire tourner jusqu'à deux _aiguilles_ _d'horloge_ en fonction du _temps_ _en-jeu_ actuel.", + "block.create.clockwork_bearing.tooltip.condition1": "Lorsque tourné", + "block.create.clockwork_bearing.tooltip.behaviour1": "Commence la rotation de la structure attachée vers l'_heure_ _actuelle_. Si une seconde structure est présente, elle servira _d'aiguille_ _des_ _minutes_.", + + "block.create.sequenced_gearshift.tooltip": "DÉCALEUR DE ROTATION SÉQUENCÉ", + "block.create.sequenced_gearshift.tooltip.summary": "Un _composant_ _utilitaire_ _programmable_, qui peut changer son _débit_ _de_ _rotation_ suivant jusqu'à _5_ _instructions_ _consécutives_. Utilisez-le pour alimenter des roulements mécaniques, des pistons ou des poulies avec plus de contrôle sur le timing et la vitesse. Peut devenir moins précis à des vitesses plus élevées.", + "block.create.sequenced_gearshift.tooltip.condition1": "Lorsqu'alimenté par de la redstone", + "block.create.sequenced_gearshift.tooltip.behaviour1": "_Commence_ _à_ _exécuter_ les instructions programmées en fonction de la vitesse d'entrée.", + "block.create.sequenced_gearshift.tooltip.condition2": "Clic droit", + "block.create.sequenced_gearshift.tooltip.behaviour2": "Ouvre _l'interface_ _de_ _configuration_", + + "block.create.cart_assembler.tooltip": "ASSEMBLEUR DE CHARIOT", + "block.create.cart_assembler.tooltip.summary": "Monte une structure connectée sur un _chariot_ _passant_.", + "block.create.cart_assembler.tooltip.condition1": "Lorsqu'alimenté par de la redstone", + "block.create.cart_assembler.tooltip.behaviour1": "_Démonte_ les structures montées un _chariot_ _passant_ et les remet dans le monde.", + + "block.create.rope_pulley.tooltip": "POULIE DE CORDE", + "block.create.rope_pulley.tooltip.summary": "Déplace les _blocs_ et _structures_ attachés _verticalement_. Utilisez un _châssis_ ou _bloc_ _de_ _slime_ pour déplacer plus d'un seul bloc.", + "block.create.rope_pulley.tooltip.condition1": "Lorsque tourné", + "block.create.rope_pulley.tooltip.behaviour1": "Commence à déplacer la structure attachée. La vitesse et la direction sont corrélées à la vitesse de rotation entrante.", + + "block.create.translation_chassis.tooltip": "CHÂSSIS DE TRADUCTION", + "block.create.translation_chassis.tooltip.summary": "Un bloc de base configurable reliant les structures pour le mouvement.", + "block.create.translation_chassis.tooltip.condition1": "Lorsque déplacé", + "block.create.translation_chassis.tooltip.behaviour1": "_Déplace_ tous les _châssis_ _attachés_ avec la même orientation, et une colonne de blocs dans sa portée. Les blocs ne seront tirés que si la face du châssis est _collante_ (Voir [Ctrl]).", + "block.create.translation_chassis.tooltip.condition2": "Lorsqu'utilisé avec une clé", + "block.create.translation_chassis.tooltip.behaviour2": "Configurez la _portée_ pour ce bloc de châssis. Maintenez CTRL pour modifier également la plage de tous les blocs de châssis connectés.", + "block.create.translation_chassis.tooltip.control1": "Clic droit avec une boule de slime", + "block.create.translation_chassis.tooltip.action1": "Rends la face _collante_. Lorsque déplace, le châssis va _tirer_ les blocs attachés, quelle que soit la direction du mouvement.", + + "block.create.rotation_chassis.tooltip": "CHÂSSIS DE ROTATION", + "block.create.rotation_chassis.tooltip.summary": "Un bloc de base configurable reliant les structures pour le mouvement.", + "block.create.rotation_chassis.tooltip.condition1": "Lorsque déplacé", + "block.create.rotation_chassis.tooltip.behaviour1": "_Déplace_ tous les _châssis_ _attachés_ en colonne, et un cylindre de blocs autour de lui. Les blocs qui l'entourent ne sont déplacés que lorsqu'ils sont à portée et attachés à un côté collant (voir [Ctrl]).", + "block.create.rotation_chassis.tooltip.condition2": "Lorsqu'utilisé avec une clé", + "block.create.rotation_chassis.tooltip.behaviour2": "Configure la _portée_ pour ce bloc de châssis. Maintenez CTRL pour modifier également la portée de tous les blocs de châssis connectés.", + "block.create.rotation_chassis.tooltip.control1": "Clic droit avec une boule de slime", + "block.create.rotation_chassis.tooltip.action1": "Rend la face _collante_. Lorsque le châssis se déplace, tous les blocs désignés attachés au côté collant sont déplacés avec lui.", + + "block.create.drill.tooltip": "PERCEUSE MÉCANIQUE", + "block.create.drill.tooltip.summary": "Un dispositif mécanique adapté pour _casser_ les _blocs_. Il est déplaceable avec _pistons_ _mécaniques_ ou _roulements_.", + "block.create.drill.tooltip.condition1": "Lorsque tourné", + "block.create.drill.tooltip.behaviour1": "Agit comme un casseur de bloc _stationnaire_. Inflige aussi des _dégats_ aux _entités_ se situant dans sa zone effective.", + "block.create.drill.tooltip.condition2": "Lorsqu'en mouvement", + "block.create.drill.tooltip.behaviour2": "Casse les blocs avec lesquels la perceuse entre en collision.", + + "block.create.harvester.tooltip": "RÉCOLTEUSE MÉCANIQUE", + "block.create.harvester.tooltip.summary": "Un coupe-plantes mécanique adapté à l'automatisation des cultures à moyenne échelle. Il est déplaceable avec _pistons_ _mécaniques_ ou _roulements_.", + "block.create.harvester.tooltip.condition1": "Lorsqu'en mouvement", + "block.create.harvester.tooltip.behaviour1": "_Récolte_ toutes les _cultures_ _matures_ que la lame entre en touche et les remet à leur état de croissance initial.", + + "block.create.saw.tooltip": "SCIE MÉCANIQUE", + "block.create.saw.tooltip.summary": "Convient pour _couper_ des _arbres_ efficacement et pour _tailler_ des _blocs_ dans leurs homologues menuisés. Il est déplaceable à l'aide de _pistons_ _mécaniques_ ou _roulements_.", + "block.create.saw.tooltip.condition1": "Lorsque tourné vers le haut", + "block.create.saw.tooltip.behaviour1": "Applique les _recettes_ de _sciage_ et de _taillerie_ aux éléments jetés ou insérés dedans. Lorsque plusieurs sorties sont possibles, il les parcourt à moins qu'un _filtre_ ne soit affecté.", + "block.create.saw.tooltip.condition2": "Lorsqu'à l'horizontal", + "block.create.saw.tooltip.behaviour2": "_Casse_ les _troncs_ devant elle. Si le tronc a supportait un arbre, _l'arbre_ _tombera_ loin de la scie.", + "block.create.saw.tooltip.condition3": "Lorsqu'en mouvement", + "block.create.saw.tooltip.behaviour3": "_Coupe_ tous les _arbres_ avec lesquels la scie entre en collision.", + + "block.create.stockswitch.tooltip": "DÉTÉCTEUR DE STOCKAGE", + "block.create.stockswitch.tooltip.summary": "Bascule un signal Redstone basé sur _l'espace_ _de_ _stockage_ dans le conteneur attaché.", + "block.create.stockswitch.tooltip.condition1": "Lorsqu'en dessous de la limite de stockage minimum", + "block.create.stockswitch.tooltip.behaviour1": "Arrête de fournir de _l'énergie_", + "block.create.stockswitch.tooltip.condition2": "Lorsqu'au dessus de la limite de stockage maximum", + "block.create.stockswitch.tooltip.behaviour2": "Commence à fournir de _l'énergie_ jusqu'à ce que la limite d'énergie soit réatteinte.", + "block.create.stockswitch.tooltip.control1": "Clic droit", + "block.create.stockswitch.tooltip.action1": "Ouvre l'_interface_ _de_ _configuration_.", + + "block.create.redstone_bridge.tooltip": "LIAISON REDSTONE", + "block.create.redstone_bridge.tooltip.summary": "Points de terminaison pour les connexions de _redstone_ _sans-fil_. Peut être attribué des _fréquences_ en utilisant n'importe quel objet. La portée du signal est limitée, quoique raisonnablement loin.", + "block.create.redstone_bridge.tooltip.condition1": "Lorsqu'alimenté", + "block.create.redstone_bridge.tooltip.behaviour1": "La réception de liens de la même _fréquence_ produira un signal redstone.", + "block.create.redstone_bridge.tooltip.control1": "Clic droit avec un objet", + "block.create.redstone_bridge.tooltip.action1": "Définit la _fréquence_ sur cet élément. Un total de _deux_ _différents_ _objets_ peuvent être utilisés en combinaison pour définir une fréquence.", + "block.create.redstone_bridge.tooltip.control2": "Clic droit en étant accroupi", + "block.create.redstone_bridge.tooltip.action2": "TBascule entre le mode _receveur_ et _transmetteur_.", + + "block.create.contact.tooltip": "CONTACT REDSTONE", + "block.create.contact.tooltip.summary": "N'émet de l'énergie que par paires. Il est mobile avec _pistons_ _mécaniques_ ou _roulements_.", + "block.create.contact.tooltip.condition1": "Lorsque tourné vers un autre contact", + "block.create.contact.tooltip.behaviour1": "Fournit un _signal_ _redstone_.", + "block.create.contact.tooltip.condition2": "Lorsqu'en mouvement", + "block.create.contact.tooltip.behaviour2": "Déclenche tous les contacts fixes qu'il passe.", + + "block.create.flexcrate.tooltip": "CAISSE AJUSTABLE", + "block.create.flexcrate.tooltip.summary": "Ce _conteneur_ _de_ _stockage_ permet un contrôle manuel de sa capacité. Il peut contenir jusqu'à _16_ _piles_ de n'importe quel objet. Prend en charge les _comparateurs_ _de_ _redstone_.", + "block.create.flexcrate.tooltip.control1": "Clic droit", + "block.create.flexcrate.tooltip.action1": "Ouvre _l'interface_.", + + "block.create.extractor.tooltip": "EXTRACTEUR", + "block.create.extractor.tooltip.summary": "_Prend_ des _objets_ d'un _inventaire_ attaché et les laisse tomber sur le sol. Ne laissera pas tomber les objets à moins que l'espace ne soit dégagé. Peut être affecté à une pile d'objets en tant que _filtre_.", + "block.create.extractor.tooltip.condition1": "Lorsqu'alimenté par de la redstone", + "block.create.extractor.tooltip.behaviour1": "Met l'extracteur en _pause_.", + "block.create.extractor.tooltip.condition2": "Tirage actif du tapis roulant", + "block.create.extractor.tooltip.behaviour2": "Les extracteurs peuvent extraire les objets _de_ _tapis_ renforcés de _boîtiers_ _en_ _laiton_. Lorsque l'extracteur est bloqué, le _tapis_ _roulant_ _va_ _caler_.", + "block.create.extractor.tooltip.control1": "Clic droit sur l'espace du filtre", + "block.create.extractor.tooltip.action1": "Assigne la _pile_ actuellement _tenue_ _en_ _main_ comme _filtre_. L'extracteur extrait exclusivement les _types_ et _comptes_ des objets de la pile du filtre.", + + "block.create.transposer.tooltip": "TRANSPOSEUR", + "block.create.transposer.tooltip.summary": "_Prend_ les _objets_ d'un _inventaire_ attaché et les place immédiatement dans _l'inventaire_ cible. Peut être affecté à une pile d'objets en tant que _filtre_.", + "block.create.transposer.tooltip.condition1": "Lorsqu'alimenté par de la redstone", + "block.create.transposer.tooltip.behaviour1": "Met le transposeur en _pause_.", + "block.create.transposer.tooltip.condition2": "Tirage actif du tapis roulant", + "block.create.transposer.tooltip.behaviour2": "Les transposeurs peuvent extraire des éléments _de_ _tapis_ _roulants_ renforcés de _boîtiers_ _en_ _laiton_. Lorsque le transposeur est sauvegardé, le _tapis_ _roulant_ _va_ _caler_.", + "block.create.transposer.tooltip.control1": "Clic droit sur l'espace du filtre", + "block.create.transposer.tooltip.action1": "Assigne la _pile_ actuellement _tenue_ _en_ _main_ comme _filtre_. L'extracteur tire exclusivement les _types_ et _comptes_ des objets de la pile du filtre.", + + "block.create.deployer.tooltip": "DÉPLOYEUR", + "block.create.deployer.tooltip.summary": "_Frappe_, _utilise_ et _active_. Cette machine essaiera _d'imiter_ un _joueur_ autant que possible. Peut _prendre_ et _déposer_ des _objets_ dans _l'inventaire_ adjacent. Peut être affecté à une pile d'éléments en tant que _filtre_.", + "block.create.deployer.tooltip.condition1": "Lorsque tourné", + "block.create.deployer.tooltip.behaviour1": "Étend son bras et _active_ dans l'espace de bloc _2m_ _devant_ de lui-même.", + "block.create.deployer.tooltip.condition2": "Clic droit avec une clé", + "block.create.deployer.tooltip.behaviour2": "Bascule le mode frappe. Dans le _mode_ _frappe_, le déployeur tentera d'utiliser son élément pour _casser_ les _blocs_ ou infliger des _dégats_ aux _entités_.", + + "block.create.linked_extractor.tooltip": "EXTRACTEUR LIÉ", + "block.create.linked_extractor.tooltip.summary": "_Prend_ les _objets_ d'un _inventaire_ attaché et les laisse tomber sur le sol. Ne laissera pas tomber les objets à moins que l'espace ne soit dégagé. Peut être assigné une pile d'éléments en tant que _filtre_. Peut être contrôlé à distance via une _liaison_ _redstone_.", + "block.create.linked_extractor.tooltip.condition1": "Lorsque la liaison redstone est active", + "block.create.linked_extractor.tooltip.behaviour1": "Met l'extracteur en _pause_.", + "block.create.linked_extractor.tooltip.control1": "Clic droit sur l'espace du filtre", + "block.create.linked_extractor.tooltip.action1": "Assigne la _pile_ actuellement _tenue_ _en_ _main_ comme _filtre_. L'extracteur extrait exclusivement les _types_ et _comptes_ des objets de la pile du filtre.", + "block.create.linked_extractor.tooltip.control2": "Clic droit sur l'espace des fréquences", + "block.create.linked_extractor.tooltip.action2": "Assigne la _pile_ actuellement _tenue_ _en_ _main_ dans le cadre de la fréquence écoutée. Chaque fois qu'une _liaison_ _redstone_ de la même fréquence est alimenté, cet extracteur s'arrête.", + + "block.create.linked_transposer.tooltip": "TRANSPOSEUR LIÉ", + "block.create.linked_transposer.tooltip.summary": "_Prend_ les _objets_ d'un _inventaire_ attaché et les place immédiatement dans _l'inventaire_ cible. Peut être affecté à une pile d'objets en tant que _filtre_. Peut être contrôlé à distance via une _liaison_ _redstone_.", + "block.create.linked_transposer.tooltip.condition1": "Lorsque la liaison redstone est active", + "block.create.linked_transposer.tooltip.behaviour1": "Met le transposeur en _pause_.", + "block.create.linked_transposer.tooltip.control1": "Clic droit sur l'espace du filtre", + "block.create.linked_transposer.tooltip.action1": "Assigne la _pile_ actuellement _tenue_ _en_ _main_ comme _filtre_. L'extracteur tire exclusivement les _types_ et _comptes_ des objets de la pile du filtre.", + "block.create.linked_transposer.tooltip.control2": "Clic droit sur l'espace des fréquences", + "block.create.linked_transposer.tooltip.action2": "Assigne la _pile_ actuellement _tenue_ _en_ _main_ dans le cadre de la fréquence écoutée. Chaque fois qu'une _liaison_ _redstone_ de la même fréquence est alimenté, ce transposeur s'arrête.", + + "block.create.belt_funnel.tooltip": "ENTONNOIR AMÉLIORÉ", + "block.create.belt_funnel.tooltip.summary": "_Collecte_ les _objets_ en _approche_ et les insère dans _l'inventaire_ attaché si possible. Peut collecter des objets dans le _monde_ et des objets sur un _tapis_ _roulant_.", + "block.create.belt_funnel.tooltip.condition1": "Passage de tapis roulant passif", + "block.create.belt_funnel.tooltip.behaviour1": "Les entonnoirs améliorés peuvent extraire des éléments _des_ _tapis_ _roulant_ lorsqu'ils sont placés au-dessus d'eux, latéralement ou à l'extrémité. Lorsqu'un entonnoir amélioré latéral est sauvegardé, les éléments sur le _tapis_ roulant_ _ne_ _vont_ _pas_ _caler_.", + + "block.create.belt_tunnel.tooltip": "TUNNEL DE TAPIS ROULANT", + "block.create.belt_tunnel.tooltip.summary": "Une option esthétique pour faire passer vos _tapis_ _roulants_ _mécaniques_ à travers les murs. Les tapis roulants doivent être renforcées avec des _boîtiers_ _en_ _laiton_. Les tunnels peuvent se _synchroniser_ avec _leurs_voisins_, ne laissant passer les éléments que si tous les tunnels du groupe ont un en attente. [Ctrl]", + "block.create.belt_tunnel.tooltip.control1": "Clic droit avec une clé devant", + "block.create.belt_tunnel.tooltip.action1": "Active le _comportement_ _synchronisé_. Les tunnels synchronisés contiennent des objets jusqu'à ce que leurs voisins en aient également.", + "block.create.belt_tunnel.tooltip.control2": "Clic droit avec une clé sur les côtés", + "block.create.belt_tunnel.tooltip.action2": "_Ajuste_ _les_ _volets_ _des_ _fenêtres_ si le tunnel a une fenêtre sur cette face.", + + "block.create.brass_casing.tooltip": "BOÎTIER EN LAITON", + "block.create.brass_casing.tooltip.summary": "Boîtier de machine robuste avec une variété d'utilisations. Sans danger pour la décoration.", + "block.create.brass_casing.tooltip.condition1": "Lorsqu'utilisé sur un tapis roulant mécanique", + "block.create.brass_casing.tooltip.behaviour1": "_Renforce_ les _tapis_ _roulants_ avec une fondation en laiton. Les tapis roulants renforcées peuvent prendre en charge les _tunnels_, _extracteurs_, _entonnoir améliorés_ et _transposeurs_ interagissant avec le tapis roulant sur les côtés et en dessous.", + + "block.create.entity_detector.tooltip": "OBSERVATEUR DE TAPIS ROULANT", + "block.create.entity_detector.tooltip.summary": "Détecte les éléments et les entités passant sur un _tapis_ _roulant_ _mécanique_ devant lui. Utilisez une _clé_ pour faire défiler son comportement. Les non-éléments seront toujours traités en mode détection quel que soit le paramètre.", + "block.create.entity_detector.tooltip.condition1": "Mode détection", + "block.create.entity_detector.tooltip.behaviour1": "Fournit un redstone _pendant_ qu'un _objet_ _correspondant_ _soit_ sur le segment de tapis roulant observé.", + "block.create.entity_detector.tooltip.condition2": "Mode impulsion", + "block.create.entity_detector.tooltip.behaviour2": "Émet une _impulsion_ lorsqu'un _objet_ _correspondant_ _passe_ au centre du segment de tapis roulant observé.", + "block.create.entity_detector.tooltip.condition3": "Mode éjection", + "block.create.entity_detector.tooltip.behaviour3": "_Éject_ les _objets_ _correspondants_ sur le côté. Si le tapis roulant ou l'espace cible est _occupé_, l'objet sera _tenu_ _en_ _place_.", + "block.create.entity_detector.tooltip.condition4": "Mode partage", + "block.create.entity_detector.tooltip.behaviour4": "_Partage_ une _pile_ _d'objets_ _correspondants_ et _éjecte_ _la_ _moitié_ de celui-ci sur le côté.", + + "block.create.pulse_repeater.tooltip": "RÉPÉTEUR D'IMPULSIONS", + "block.create.pulse_repeater.tooltip.summary": "Un circuit simple pour couper les signaux de redstone passant à une longueur de _1_ _tick_.", + + "block.create.flexpeater.tooltip": "RÉPÉTEUR RÉGLABLE", + "block.create.flexpeater.tooltip.summary": "Un _répéteur_ _de_ _redstone_ avancé avec un _délai_ _configurable_ jusqu'à 30 minutes.", + + "block.create.flexpulsepeater.tooltip": "RÉPÉTEUR D'IMPULSIONS RÉGLABLE", + "block.create.flexpulsepeater.tooltip.summary": "Un _répéteur_ _d'impulsions_ avancé avec un _délai_ _configurable_ jusqu'à 30 minutes.", + + "block.create.analog_lever.tooltip": "LEVIER ANALOGIQUE", + "block.create.analog_lever.tooltip.summary": "Un levier avec un _contrôle_ plus _précis_ sur sa _puissance_ _de_ _signal_ émise.", + + "block.create.toggle_latch.tooltip": "LOQUET À BASCULE ALIMENTÉ", + "block.create.toggle_latch.tooltip.summary": "Un levier qui peut être basculé par une _pulsation_ _de_ _redstone_.", + + "block.create.redstone_latch.tooltip": "VERROU ALIMENTÉ", + "block.create.redstone_latch.tooltip.summary": "Un levier qui peut être contrôlé par un _signal_ _de_ _redstone_. Un signal sur _l'arrière_ _l'active_, un signal sur le _côté_ _va_ _le_ _réinitialiser_.", + + "block.create.speed_gauge.tooltip": "COMPTEUR DE VITESSE", + "block.create.speed_gauge.tooltip.summary": "Mesure et affiche la _ vitesse de rotation _ des composants cinétiques attachés. Prend en charge les _comparateurs_ _de_ _redstone_.", + "block.create.speed_gauge.tooltip.condition1": "Lorsque tourné", + "block.create.speed_gauge.tooltip.behaviour1": "Indique une couleur correspondant au niveau de vitesse. _Vert_ indique une rotation lente, _Bleu_ modérée et _violet_ rapide. Certains composants mécaniques nécessitent une vitesse suffisante pour fonctionner correctement.", + + "block.create.stress_gauge.tooltip": "STRESSOMÈTRE", + "block.create.stress_gauge.tooltip.summary": "Mesure et affiche la _stress__ globale du réseau cinétique attaché. Prend en charge les _comparateurs_ _de_ _redstone_.", + "block.create.stress_gauge.tooltip.condition1": "Lorsque tourné", + "block.create.stress_gauge.tooltip.behaviour1": "Indique une couleur correspondant au niveau de contrainte. Les _réseaux_ _surchargés_ cesseront de bouger. Le stress peut être soulagé en ajoutant plus de _sources_ _rotationnelles_ au réseau.", + + "item.create.refined_radiance.tooltip": "ÉCLAT RAFFINÉ", + "item.create.refined_radiance.tooltip.summary": "Un matériau chromatique forgé à partir de _lumière_ _absorbée_.", + + "item.create.shadow_steel.tooltip": "ACIER SOMBRE", + "item.create.shadow_steel.tooltip.summary": "Un matériau chromatique forgé _dans_ _le_ _néant_.", + + "item.create.slot_cover.tooltip": "COUVERCLE D'EMPLACEMENT", + "item.create.slot_cover.tooltip.summary": "Utilisé pour marquer un _établi_ _mécanique_ comme un emplacement vide dans une recette. Les établis ne doivent pas nécessairement former une grille carrée complète. C'est utile quand il y a des recettes où les _ingredients_ _sont_ _en_ _diagonale_ les uns aux autres.", + + "tool.create.shadow_steel.tooltip": "OUTILS D'ACIER SOMBRE", + "tool.create.shadow_steel.tooltip.summary": "Un outil rapide et puissant qui _détruit_ les _drops_ de n'importe quel bloc ou entité. Les monstres tués peuvent laisser tomber _plus_ _d'experience_ en fonction du modificateur de _loot_ de cet outil.", + + "tool.create.blazing.tooltip": "OUTILS FLAMBOYANTS", + "tool.create.blazing.tooltip.summary": "Cet outil va faire _fondre_ les _blocs_ _détruits_ et _enflamme_ les _entités_ _attaquées_. Il ne perdra pas sa durabilité lors de son utilisation dans le _Nether_.", + + "tool.create.rose_quartz.tooltip": "OUTILS EN QUARTZ ROSE", + "tool.create.rose_quartz.tooltip.summary": "Cet outil vous accorde une _meilleure_ _portée_ pour _détruire_ ou _placer_ les _blocs_ de votre seconde main.", + + "item.create.logistical_controller_calculation.tooltip": "WIP", + "item.create.logistical_controller_request.tooltip": "WIP", + "item.create.logistical_controller_storage.tooltip": "WIP", + "item.create.logistical_controller_supply.tooltip": "WIP", + "item.create.logistical_controller_transactions.tooltip": "WIP", + "block.create.logistical_index.tooltip": "WIP", + "block.create.package_funnel.tooltip": "WIP", + "block.create.logisticians_table.tooltip": "WIP", + "item.create.logistical_dial.tooltip": "WIP", + "item.create.logistical_filter.tooltip": "WIP", + + "itemGroup.create": "Create" +} diff --git a/src/main/resources/assets/create/models/block/millstone/casing.json b/src/main/resources/assets/create/models/block/millstone/casing.json new file mode 100644 index 000000000..68afc7d11 --- /dev/null +++ b/src/main/resources/assets/create/models/block/millstone/casing.json @@ -0,0 +1,163 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "create:block/gearbox", + "5": "create:block/millstone", + "6": "block/polished_andesite", + "13": "block/stripped_spruce_log", + "particle": "block/polished_andesite" + }, + "elements": [ + { + "from": [3, 13, 3], + "to": [5, 16, 13], + "faces": { + "north": {"uv": [0, 3, 3, 5], "rotation": 90, "texture": "#13"}, + "east": {"uv": [0, 0, 10, 3], "texture": "#13"}, + "south": {"uv": [0, 0, 3, 2], "rotation": 90, "texture": "#13"}, + "west": {"uv": [0, 0, 3, 10], "rotation": 90, "texture": "#13"}, + "up": {"uv": [5, 3, 7, 13], "texture": "#13"}, + "down": {"uv": [0, 0, 2, 10], "texture": "#13"} + } + }, + { + "from": [11, 13, 3], + "to": [13, 16, 13], + "faces": { + "north": {"uv": [0, 7, 3, 9], "rotation": 90, "texture": "#13"}, + "east": {"uv": [0, 10, 3, 0], "rotation": 90, "texture": "#13"}, + "south": {"uv": [0, 0, 3, 2], "rotation": 90, "texture": "#13"}, + "west": {"uv": [10, 0, 0, 3], "texture": "#13"}, + "up": {"uv": [5, 2, 3, 12], "texture": "#13"}, + "down": {"uv": [2, 0, 0, 10], "texture": "#13"} + } + }, + { + "from": [5, 13, 11], + "to": [11, 16, 13], + "faces": { + "north": {"uv": [0, 0, 6, 3], "texture": "#13"}, + "east": {"uv": [0, 0, 2, 3], "texture": "#13"}, + "south": {"uv": [0, 3, 3, 9], "rotation": 90, "texture": "#13"}, + "west": {"uv": [0, 0, 2, 3], "texture": "#13"}, + "up": {"uv": [10, 4, 12, 10], "rotation": 90, "texture": "#13"}, + "down": {"uv": [0, 0, 6, 2], "texture": "#13"} + } + }, + { + "from": [5, 13, 5], + "to": [11, 15, 11], + "faces": { + "up": {"uv": [6, 0, 9, 3], "rotation": 90, "texture": "#5"} + } + }, + { + "from": [5, 13, 3], + "to": [11, 16, 5], + "faces": { + "north": {"uv": [0, 9, 3, 3], "rotation": 90, "texture": "#13"}, + "east": {"uv": [2, 0, 0, 3], "texture": "#13"}, + "south": {"uv": [6, 0, 0, 3], "texture": "#13"}, + "west": {"uv": [2, 0, 0, 3], "texture": "#13"}, + "up": {"uv": [7, 3, 5, 9], "rotation": 270, "texture": "#13"}, + "down": {"uv": [0, 2, 6, 0], "texture": "#13"} + } + }, + { + "name": "bottom", + "from": [0, 0, 0], + "to": [16, 6, 2], + "faces": { + "north": {"uv": [0, 13, 8, 16], "texture": "#5"}, + "east": {"uv": [7, 13, 8, 16], "texture": "#5"}, + "south": {"uv": [0, 13, 8, 16], "texture": "#5"}, + "west": {"uv": [0, 13, 1, 16], "texture": "#5"}, + "up": {"uv": [0.5, 8.5, 8.5, 9.5], "texture": "#5"}, + "down": {"uv": [0, 14, 16, 16], "texture": "#0"} + } + }, + { + "name": "bottom", + "from": [0, 0, 14], + "to": [16, 6, 16], + "faces": { + "north": {"uv": [8, 13, 0, 16], "texture": "#5"}, + "east": {"uv": [8, 13, 7, 16], "texture": "#5"}, + "south": {"uv": [8, 13, 0, 16], "texture": "#5"}, + "west": {"uv": [1, 13, 0, 16], "texture": "#5"}, + "up": {"uv": [0.5, 9.5, 8.5, 8.5], "texture": "#5"}, + "down": {"uv": [0, 16, 16, 14], "texture": "#0"} + } + }, + { + "from": [0, 0, 2], + "to": [2, 6, 14], + "faces": { + "east": {"uv": [1, 13, 7, 16], "texture": "#5"}, + "west": {"uv": [1, 13, 7, 16], "texture": "#5"}, + "up": {"uv": [1.5, 8.5, 7.5, 9.5], "rotation": 270, "texture": "#5"}, + "down": {"uv": [0, 2, 2, 14], "texture": "#0"} + } + }, + { + "from": [14, 0, 2], + "to": [16, 6, 14], + "faces": { + "east": {"uv": [7, 13, 1, 16], "texture": "#5"}, + "west": {"uv": [7, 13, 1, 16], "texture": "#5"}, + "up": {"uv": [1.5, 9.5, 7.5, 8.5], "rotation": 270, "texture": "#5"}, + "down": {"uv": [2, 2, 0, 14], "texture": "#0"} + } + }, + { + "from": [2, 1, 2], + "to": [14, 6, 14], + "faces": { + "up": {"uv": [2, 2, 14, 14], "rotation": 270, "texture": "#6"}, + "down": {"uv": [2, 2, 14, 14], "texture": "#0"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [75, -149, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "thirdperson_lefthand": { + "rotation": [75, -149, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "firstperson_righthand": { + "rotation": [0, -55, 0], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_lefthand": { + "rotation": [0, -55, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "translation": [0, 1, 1.25], + "scale": [0.25, 0.25, 0.25] + }, + "gui": { + "rotation": [30, 45, 0], + "translation": [2.5, -0.5, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "rotation": [0, 180, 0], + "translation": [0, 1.75, -4.5], + "scale": [0.5, 0.5, 0.5] + } + }, + "groups": [0, 1, 2, 3, 4, + { + "name": "bottom", + "origin": [8, 8, 8], + "children": [5, 6, 7, 8, 9] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/millstone/inner.json b/src/main/resources/assets/create/models/block/millstone/inner.json new file mode 100644 index 000000000..bb8230e10 --- /dev/null +++ b/src/main/resources/assets/create/models/block/millstone/inner.json @@ -0,0 +1,150 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "5": "create:block/millstone", + "particle": "create:block/axis", + "1_0": "create:block/axis", + "1_1": "create:block/axis_top" + }, + "elements": [ + { + "name": "Gear5", + "from": [6.5, 6.5, -1], + "to": [9.5, 12.5, 17], + "faces": { + "north": {"uv": [9, 10, 10.5, 13], "texture": "#5"}, + "east": {"uv": [0, 10, 9, 13], "texture": "#5"}, + "south": {"uv": [9, 10, 10.5, 13], "texture": "#5"}, + "west": {"uv": [0, 10, 9, 13], "texture": "#5"}, + "up": {"uv": [0, 8.5, 9, 10], "rotation": 90, "texture": "#5"}, + "down": {"uv": [0, 8.5, 9, 10], "rotation": 90, "texture": "#5"} + } + }, + { + "name": "Gear6", + "from": [6.5, 6.5, -1], + "to": [9.5, 12.5, 17], + "rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [9, 10, 10.5, 13], "texture": "#5"}, + "east": {"uv": [0, 10, 9, 13], "texture": "#5"}, + "south": {"uv": [9, 10, 10.5, 13], "texture": "#5"}, + "west": {"uv": [0, 10, 9, 13], "texture": "#5"}, + "up": {"uv": [0, 8.5, 9, 10], "rotation": 90, "texture": "#5"}, + "down": {"uv": [0, 8.5, 9, 10], "rotation": 90, "texture": "#5"} + } + }, + { + "name": "Gear7", + "from": [-1, 6.5, 6.5], + "to": [17, 12.5, 9.5], + "rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 10, 9, 13], "texture": "#5"}, + "east": {"uv": [9, 10, 10.5, 13], "texture": "#5"}, + "south": {"uv": [0, 10, 9, 13], "texture": "#5"}, + "west": {"uv": [9, 10, 10.5, 13], "texture": "#5"}, + "up": {"uv": [0, 8.5, 9, 10], "texture": "#5"}, + "down": {"uv": [0, 8.5, 9, 10], "rotation": 180, "texture": "#5"} + } + }, + { + "name": "Gear7", + "from": [-1, 6.5, 6.5], + "to": [17, 12.5, 9.5], + "faces": { + "north": {"uv": [0, 10, 9, 13], "texture": "#5"}, + "east": {"uv": [9, 10, 10.5, 13], "texture": "#5"}, + "south": {"uv": [0, 10, 9, 13], "texture": "#5"}, + "west": {"uv": [9, 10, 10.5, 13], "texture": "#5"}, + "up": {"uv": [0, 8.5, 9, 10], "texture": "#5"}, + "down": {"uv": [0, 8.5, 9, 10], "rotation": 180, "texture": "#5"} + } + }, + { + "name": "GearCaseInner", + "from": [2, 6.6, 2], + "to": [14, 11.6, 14], + "faces": { + "north": {"uv": [0, 6, 6, 8.5], "texture": "#5"}, + "east": {"uv": [0, 6, 6, 8.5], "texture": "#5"}, + "south": {"uv": [0, 6, 6, 8.5], "texture": "#5"}, + "west": {"uv": [0, 6, 6, 8.5], "texture": "#5"}, + "up": {"uv": [0, 0, 6, 6], "texture": "#5"}, + "down": {"uv": [0, 0, 6, 6], "texture": "#5"} + } + }, + { + "name": "GearCaseOuter", + "from": [4, 6, 4], + "to": [12, 13, 12], + "faces": { + "north": {"uv": [1, 1.5, 5, 5], "texture": "#5"}, + "east": {"uv": [1, 1.5, 5, 5], "texture": "#5"}, + "south": {"uv": [1, 1.5, 5, 5], "texture": "#5"}, + "west": {"uv": [1, 1.5, 5, 5], "texture": "#5"} + } + }, + { + "name": "Axis", + "from": [6, 0, 6], + "to": [10, 8, 10], + "shade": false, + "faces": { + "north": {"uv": [6, 0, 10, 8], "rotation": 180, "texture": "#1_0"}, + "east": {"uv": [6, 0, 10, 8], "rotation": 180, "texture": "#1_0"}, + "south": {"uv": [6, 0, 10, 8], "rotation": 180, "texture": "#1_0"}, + "west": {"uv": [6, 0, 10, 8], "rotation": 180, "texture": "#1_0"}, + "up": {"uv": [6, 6, 10, 10], "texture": "#1_1"}, + "down": {"uv": [6, 6, 10, 10], "texture": "#1_1"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [75, -149, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "thirdperson_lefthand": { + "rotation": [75, -149, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "firstperson_righthand": { + "rotation": [0, -55, 0], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_lefthand": { + "rotation": [0, -55, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "translation": [0, 1, 1.25], + "scale": [0.25, 0.25, 0.25] + }, + "gui": { + "rotation": [30, 45, 0], + "translation": [2.5, -0.5, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "rotation": [0, 180, 0], + "translation": [0, 1.75, -4.5], + "scale": [0.5, 0.5, 0.5] + } + }, + "groups": [ + { + "name": "cogwheel", + "origin": [8, 8, 8], + "children": [0, 1, 2, 3, 4, 5] + }, + { + "name": "shaft_half", + "origin": [8, 8, 8], + "children": [6] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/millstone/item.json b/src/main/resources/assets/create/models/block/millstone/item.json new file mode 100644 index 000000000..643f75be3 --- /dev/null +++ b/src/main/resources/assets/create/models/block/millstone/item.json @@ -0,0 +1,211 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "create:block/gearbox", + "3": "block/stripped_spruce_log", + "5": "create:block/millstone", + "6": "block/polished_andesite", + "particle": "block/polished_andesite" + }, + "elements": [ + { + "name": "Gear5", + "from": [6.5, 6.5, -1], + "to": [9.5, 12.5, 17], + "faces": { + "north": {"uv": [9, 10, 10.5, 13], "texture": "#5"}, + "east": {"uv": [0, 10, 9, 13], "texture": "#5"}, + "south": {"uv": [9, 10, 10.5, 13], "texture": "#5"}, + "west": {"uv": [0, 10, 9, 13], "texture": "#5"}, + "up": {"uv": [0, 8.5, 9, 10], "rotation": 90, "texture": "#5"}, + "down": {"uv": [0, 8.5, 9, 10], "rotation": 90, "texture": "#5"} + } + }, + { + "name": "Gear6", + "from": [6.5, 6.5, -1], + "to": [9.5, 12.5, 17], + "rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [9, 10, 10.5, 13], "texture": "#5"}, + "east": {"uv": [0, 10, 9, 13], "texture": "#5"}, + "south": {"uv": [9, 10, 10.5, 13], "texture": "#5"}, + "west": {"uv": [0, 10, 9, 13], "texture": "#5"}, + "up": {"uv": [0, 8.5, 9, 10], "rotation": 90, "texture": "#5"}, + "down": {"uv": [0, 8.5, 9, 10], "rotation": 90, "texture": "#5"} + } + }, + { + "name": "Gear7", + "from": [-1, 6.5, 6.5], + "to": [17, 12.5, 9.5], + "rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [0, 10, 9, 13], "texture": "#5"}, + "east": {"uv": [9, 10, 10.5, 13], "texture": "#5"}, + "south": {"uv": [0, 10, 9, 13], "texture": "#5"}, + "west": {"uv": [9, 10, 10.5, 13], "texture": "#5"}, + "up": {"uv": [0, 8.5, 9, 10], "texture": "#5"}, + "down": {"uv": [0, 8.5, 9, 10], "rotation": 180, "texture": "#5"} + } + }, + { + "name": "Gear7", + "from": [-1, 6.5, 6.5], + "to": [17, 12.5, 9.5], + "faces": { + "north": {"uv": [0, 10, 9, 13], "texture": "#5"}, + "east": {"uv": [9, 10, 10.5, 13], "texture": "#5"}, + "south": {"uv": [0, 10, 9, 13], "texture": "#5"}, + "west": {"uv": [9, 10, 10.5, 13], "texture": "#5"}, + "up": {"uv": [0, 8.5, 9, 10], "texture": "#5"}, + "down": {"uv": [0, 8.5, 9, 10], "rotation": 180, "texture": "#5"} + } + }, + { + "name": "GearCaseInner", + "from": [2, 6.6, 2], + "to": [14, 11.6, 14], + "faces": { + "north": {"uv": [0, 6, 6, 8.5], "texture": "#5"}, + "east": {"uv": [0, 6, 6, 8.5], "texture": "#5"}, + "south": {"uv": [0, 6, 6, 8.5], "texture": "#5"}, + "west": {"uv": [0, 6, 6, 8.5], "texture": "#5"}, + "up": {"uv": [0, 0, 6, 6], "texture": "#5"}, + "down": {"uv": [0, 0, 6, 6], "texture": "#5"} + } + }, + { + "name": "GearCaseOuter", + "from": [4, 6, 4], + "to": [12, 13, 12], + "faces": { + "north": {"uv": [1, 1.5, 5, 5], "texture": "#5"}, + "east": {"uv": [1, 1.5, 5, 5], "texture": "#5"}, + "south": {"uv": [1, 1.5, 5, 5], "texture": "#5"}, + "west": {"uv": [1, 1.5, 5, 5], "texture": "#5"} + } + }, + { + "from": [5, 13, 5], + "to": [11, 15, 11], + "faces": { + "up": {"uv": [6, 0, 9, 3], "rotation": 90, "texture": "#5"} + } + }, + { + "name": "bottom", + "from": [0, 0, 0], + "to": [16, 6, 2], + "faces": { + "north": {"uv": [0, 13, 8, 16], "texture": "#5"}, + "east": {"uv": [7, 13, 8, 16], "texture": "#5"}, + "south": {"uv": [0, 13, 8, 16], "texture": "#5"}, + "west": {"uv": [0, 13, 1, 16], "texture": "#5"}, + "up": {"uv": [0.5, 8.5, 8.5, 9.5], "texture": "#5"}, + "down": {"uv": [0, 14, 16, 16], "texture": "#0"} + } + }, + { + "name": "bottom", + "from": [0, 0, 14], + "to": [16, 6, 16], + "faces": { + "north": {"uv": [8, 13, 0, 16], "texture": "#5"}, + "east": {"uv": [8, 13, 7, 16], "texture": "#5"}, + "south": {"uv": [8, 13, 0, 16], "texture": "#5"}, + "west": {"uv": [1, 13, 0, 16], "texture": "#5"}, + "up": {"uv": [0.5, 9.5, 8.5, 8.5], "texture": "#5"}, + "down": {"uv": [0, 16, 16, 14], "texture": "#0"} + } + }, + { + "from": [0, 0, 2], + "to": [2, 6, 14], + "faces": { + "east": {"uv": [1, 13, 7, 16], "texture": "#5"}, + "west": {"uv": [1, 13, 7, 16], "texture": "#5"}, + "up": {"uv": [1.5, 8.5, 7.5, 9.5], "rotation": 270, "texture": "#5"}, + "down": {"uv": [0, 2, 2, 14], "texture": "#0"} + } + }, + { + "from": [14, 0, 2], + "to": [16, 6, 14], + "faces": { + "east": {"uv": [7, 13, 1, 16], "texture": "#5"}, + "west": {"uv": [7, 13, 1, 16], "texture": "#5"}, + "up": {"uv": [1.5, 9.5, 7.5, 8.5], "rotation": 270, "texture": "#5"}, + "down": {"uv": [2, 2, 0, 14], "texture": "#0"} + } + }, + { + "from": [2, 1, 2], + "to": [14, 6, 14], + "faces": { + "up": {"uv": [2, 2, 14, 14], "rotation": 270, "texture": "#6"}, + "down": {"uv": [2, 2, 14, 14], "texture": "#0"} + } + }, + { + "from": [11, 13, 3], + "to": [13, 16, 13], + "faces": { + "north": {"uv": [0, 7, 3, 9], "rotation": 90, "texture": "#3"}, + "east": {"uv": [0, 10, 3, 0], "rotation": 90, "texture": "#3"}, + "south": {"uv": [0, 0, 3, 2], "rotation": 90, "texture": "#3"}, + "west": {"uv": [10, 0, 0, 3], "texture": "#3"}, + "up": {"uv": [5, 2, 3, 12], "texture": "#3"}, + "down": {"uv": [2, 0, 0, 10], "texture": "#3"} + } + }, + { + "from": [5, 13, 11], + "to": [11, 16, 13], + "faces": { + "north": {"uv": [0, 0, 6, 3], "texture": "#3"}, + "east": {"uv": [0, 0, 2, 3], "texture": "#3"}, + "south": {"uv": [0, 3, 3, 9], "rotation": 90, "texture": "#3"}, + "west": {"uv": [0, 0, 2, 3], "texture": "#3"}, + "up": {"uv": [10, 4, 12, 10], "rotation": 90, "texture": "#3"}, + "down": {"uv": [0, 0, 6, 2], "texture": "#3"} + } + }, + { + "from": [5, 13, 3], + "to": [11, 16, 5], + "faces": { + "north": {"uv": [0, 9, 3, 3], "rotation": 90, "texture": "#3"}, + "east": {"uv": [2, 0, 0, 3], "texture": "#3"}, + "south": {"uv": [6, 0, 0, 3], "texture": "#3"}, + "west": {"uv": [2, 0, 0, 3], "texture": "#3"}, + "up": {"uv": [7, 3, 5, 9], "rotation": 270, "texture": "#3"}, + "down": {"uv": [0, 2, 6, 0], "texture": "#3"} + } + }, + { + "from": [3, 13, 3], + "to": [5, 16, 13], + "faces": { + "north": {"uv": [0, 3, 3, 5], "rotation": 90, "texture": "#3"}, + "east": {"uv": [0, 0, 10, 3], "texture": "#3"}, + "south": {"uv": [0, 0, 3, 2], "rotation": 90, "texture": "#3"}, + "west": {"uv": [0, 0, 3, 10], "rotation": 90, "texture": "#3"}, + "up": {"uv": [5, 3, 7, 13], "texture": "#3"}, + "down": {"uv": [0, 0, 2, 10], "texture": "#3"} + } + } + ], + "groups": [ + { + "name": "cogwheel", + "origin": [8, 8, 8], + "children": [0, 1, 2, 3, 4, 5] + }, 6, + { + "name": "bottom", + "origin": [8, 8, 8], + "children": [7, 8, 9, 10, 11] + }, 12, 13, 14, 15] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/millstone.json b/src/main/resources/assets/create/models/item/millstone.json new file mode 100644 index 000000000..971e3a7a4 --- /dev/null +++ b/src/main/resources/assets/create/models/item/millstone.json @@ -0,0 +1,3 @@ +{ + "parent": "create:block/millstone/item" +} \ No newline at end of file diff --git a/src/main/resources/assets/create/textures/block/millstone.png b/src/main/resources/assets/create/textures/block/millstone.png new file mode 100644 index 0000000000000000000000000000000000000000..cac9a112adf419fc230c7ec79c1a2019cc98e54c GIT binary patch literal 933 zcmV;W16urvP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D13F1WK~z{rwUA;!_yVb5fnu$# z^p+M1LcHGp&^bA6?#1@f{*uW#J?FMFXJ*dKt?_L3i4`4*l36tgqo9A5`FzHtsRy@t zE#UX@C}ayYqcQCWWA60}>%*4}ZP#}jOGJaA0Uoiou~DUXe1z9Nef~)A=3Y^;T&I10 zf~en?o2B>2|fyk+Jg8G9Y3df?9N{;cG7>JXLa)5a#05iPdgL^@4y~IkPd|@$1 z`#bh2ZNVCV5x_}V{f}-^XZR$}I4Kmat`*gZA)95hDLhc7o8bNI2XF{Pnee+@QsEG= zAB~Q)2N3hq4Z-{;X0a@fQ#VB%huG5O}2* zumOm_D1spFFbZym5hoMFbbLI`U+6aK8p?^G9PU1IHcgRmij9z4(F>ZA5F$WfWi!Wf z$&X%OJe;1kvP)~6U^>Wn(7HbRbk=jiIni-1xOeAfcMa&Y7j)YLDhZ)LSB%?$B!u!_ z!oA>oc2!BCP_WDGF0HR*X)*JjKUX(R9(#fBN3lkJ{~&E`Rg~m&E3~)Yr`C(5Uo5@A zH3?gB+LtwqHzvF#CnsUP*xd2-dyf)48XM!eo|FQf9Zy8*@|A1e3~1*Xy3q{}s9PZ5 z$AFu1+1JVcvd(-k{=UqV1&4JNrXoCT)VgyB8U_q z86k%iD9l@%*Z*)WL=Y)Jy0{gn>{3?EJAtoZWH>^VT7@tghI9VFQ?f7fg>MzQfA^NB z>nHGQ`A}qxVxwvD4TQ-E*qI$3UZB~wFfR~JSf~L59g*lCG*G0%fNJyu00000NkvXX Hu0mjf=1{H^ literal 0 HcmV?d00001 diff --git a/src/main/resources/data/create/loot_tables/blocks/millstone.json b/src/main/resources/data/create/loot_tables/blocks/millstone.json new file mode 100644 index 000000000..76cc61eb3 --- /dev/null +++ b/src/main/resources/data/create/loot_tables/blocks/millstone.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "create:millstone" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting_shaped/contraptions/millstone.json b/src/main/resources/data/create/recipes/crafting_shaped/contraptions/millstone.json new file mode 100644 index 000000000..7e9d78ec0 --- /dev/null +++ b/src/main/resources/data/create/recipes/crafting_shaped/contraptions/millstone.json @@ -0,0 +1,32 @@ +{ + "type": "crafting_shaped", + "pattern": [ + " P ", + "ACA", + " S " + ], + "key": { + "C": { + "item": "create:cogwheel" + }, + "A": { + "item": "create:andesite_alloy" + }, + "S": { + "tag": "forge:stone" + }, + "P": { + "tag": "minecraft:planks" + } + }, + "result": { + "item": "create:millstone", + "count": 1 + }, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crushing/allium.json b/src/main/resources/data/create/recipes/milling/allium.json similarity index 91% rename from src/main/resources/data/create/recipes/crushing/allium.json rename to src/main/resources/data/create/recipes/milling/allium.json index ececa0942..3389eeffe 100644 --- a/src/main/resources/data/create/recipes/crushing/allium.json +++ b/src/main/resources/data/create/recipes/milling/allium.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:allium" diff --git a/src/main/resources/data/create/recipes/crushing/andesite.json b/src/main/resources/data/create/recipes/milling/andesite.json similarity index 85% rename from src/main/resources/data/create/recipes/crushing/andesite.json rename to src/main/resources/data/create/recipes/milling/andesite.json index 135c66abb..7f6d34077 100644 --- a/src/main/resources/data/create/recipes/crushing/andesite.json +++ b/src/main/resources/data/create/recipes/milling/andesite.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:andesite" diff --git a/src/main/resources/data/create/recipes/crushing/azure_bluet.json b/src/main/resources/data/create/recipes/milling/azure_bluet.json similarity index 89% rename from src/main/resources/data/create/recipes/crushing/azure_bluet.json rename to src/main/resources/data/create/recipes/milling/azure_bluet.json index 009dad526..d3d8d136a 100644 --- a/src/main/resources/data/create/recipes/crushing/azure_bluet.json +++ b/src/main/resources/data/create/recipes/milling/azure_bluet.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:azure_bluet" diff --git a/src/main/resources/data/create/recipes/crushing/blue_orchid.json b/src/main/resources/data/create/recipes/milling/blue_orchid.json similarity index 89% rename from src/main/resources/data/create/recipes/crushing/blue_orchid.json rename to src/main/resources/data/create/recipes/milling/blue_orchid.json index 2946ca025..a83b75431 100644 --- a/src/main/resources/data/create/recipes/crushing/blue_orchid.json +++ b/src/main/resources/data/create/recipes/milling/blue_orchid.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:blue_orchid" diff --git a/src/main/resources/data/create/recipes/crushing/bone.json b/src/main/resources/data/create/recipes/milling/bone.json similarity index 91% rename from src/main/resources/data/create/recipes/crushing/bone.json rename to src/main/resources/data/create/recipes/milling/bone.json index 65e3436a7..974165dc3 100644 --- a/src/main/resources/data/create/recipes/crushing/bone.json +++ b/src/main/resources/data/create/recipes/milling/bone.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:bone" diff --git a/src/main/resources/data/create/recipes/crushing/bone_meal.json b/src/main/resources/data/create/recipes/milling/bone_meal.json similarity index 89% rename from src/main/resources/data/create/recipes/crushing/bone_meal.json rename to src/main/resources/data/create/recipes/milling/bone_meal.json index 806153c6e..a332f4ab8 100644 --- a/src/main/resources/data/create/recipes/crushing/bone_meal.json +++ b/src/main/resources/data/create/recipes/milling/bone_meal.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:bone_meal" diff --git a/src/main/resources/data/create/recipes/crushing/cactus.json b/src/main/resources/data/create/recipes/milling/cactus.json similarity index 93% rename from src/main/resources/data/create/recipes/crushing/cactus.json rename to src/main/resources/data/create/recipes/milling/cactus.json index 7bbe48aca..d2c82b4de 100644 --- a/src/main/resources/data/create/recipes/crushing/cactus.json +++ b/src/main/resources/data/create/recipes/milling/cactus.json @@ -9,7 +9,7 @@ } } ], - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:cactus" diff --git a/src/main/resources/data/create/recipes/crushing/charcoal.json b/src/main/resources/data/create/recipes/milling/charcoal.json similarity index 89% rename from src/main/resources/data/create/recipes/crushing/charcoal.json rename to src/main/resources/data/create/recipes/milling/charcoal.json index a9ccb576e..5be7dc15e 100644 --- a/src/main/resources/data/create/recipes/crushing/charcoal.json +++ b/src/main/resources/data/create/recipes/milling/charcoal.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:charcoal" diff --git a/src/main/resources/data/create/recipes/crushing/clay.json b/src/main/resources/data/create/recipes/milling/clay.json similarity index 91% rename from src/main/resources/data/create/recipes/crushing/clay.json rename to src/main/resources/data/create/recipes/milling/clay.json index 2d29c8b31..0ff90e484 100644 --- a/src/main/resources/data/create/recipes/crushing/clay.json +++ b/src/main/resources/data/create/recipes/milling/clay.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:clay" diff --git a/src/main/resources/data/create/recipes/crushing/coal.json b/src/main/resources/data/create/recipes/milling/coal.json similarity index 88% rename from src/main/resources/data/create/recipes/crushing/coal.json rename to src/main/resources/data/create/recipes/milling/coal.json index cf5e15cc3..5216193b8 100644 --- a/src/main/resources/data/create/recipes/crushing/coal.json +++ b/src/main/resources/data/create/recipes/milling/coal.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:coal" diff --git a/src/main/resources/data/create/recipes/crushing/cobblestone.json b/src/main/resources/data/create/recipes/milling/cobblestone.json similarity index 85% rename from src/main/resources/data/create/recipes/crushing/cobblestone.json rename to src/main/resources/data/create/recipes/milling/cobblestone.json index 028caeb63..3a08422b6 100644 --- a/src/main/resources/data/create/recipes/crushing/cobblestone.json +++ b/src/main/resources/data/create/recipes/milling/cobblestone.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:cobblestone" diff --git a/src/main/resources/data/create/recipes/crushing/cocoa_beans.json b/src/main/resources/data/create/recipes/milling/cocoa_beans.json similarity index 89% rename from src/main/resources/data/create/recipes/crushing/cocoa_beans.json rename to src/main/resources/data/create/recipes/milling/cocoa_beans.json index b602848b9..e44faf69c 100644 --- a/src/main/resources/data/create/recipes/crushing/cocoa_beans.json +++ b/src/main/resources/data/create/recipes/milling/cocoa_beans.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:cocoa_beans" diff --git a/src/main/resources/data/create/recipes/crushing/cornflower.json b/src/main/resources/data/create/recipes/milling/cornflower.json similarity index 85% rename from src/main/resources/data/create/recipes/crushing/cornflower.json rename to src/main/resources/data/create/recipes/milling/cornflower.json index 1b7d3e3c3..6a96dab2b 100644 --- a/src/main/resources/data/create/recipes/crushing/cornflower.json +++ b/src/main/resources/data/create/recipes/milling/cornflower.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:cornflower" diff --git a/src/main/resources/data/create/recipes/crushing/dandelion.json b/src/main/resources/data/create/recipes/milling/dandelion.json similarity index 89% rename from src/main/resources/data/create/recipes/crushing/dandelion.json rename to src/main/resources/data/create/recipes/milling/dandelion.json index 7596e4d62..35e617b87 100644 --- a/src/main/resources/data/create/recipes/crushing/dandelion.json +++ b/src/main/resources/data/create/recipes/milling/dandelion.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:dandelion" diff --git a/src/main/resources/data/create/recipes/crushing/diamond_horse_armor.json b/src/main/resources/data/create/recipes/milling/diamond_horse_armor.json similarity index 92% rename from src/main/resources/data/create/recipes/crushing/diamond_horse_armor.json rename to src/main/resources/data/create/recipes/milling/diamond_horse_armor.json index 0b1d66440..56c501b18 100644 --- a/src/main/resources/data/create/recipes/crushing/diamond_horse_armor.json +++ b/src/main/resources/data/create/recipes/milling/diamond_horse_armor.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:diamond_horse_armor" diff --git a/src/main/resources/data/create/recipes/crushing/diorite.json b/src/main/resources/data/create/recipes/milling/diorite.json similarity index 84% rename from src/main/resources/data/create/recipes/crushing/diorite.json rename to src/main/resources/data/create/recipes/milling/diorite.json index 58a9a1dbc..a251f3e5e 100644 --- a/src/main/resources/data/create/recipes/crushing/diorite.json +++ b/src/main/resources/data/create/recipes/milling/diorite.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:diorite" diff --git a/src/main/resources/data/create/recipes/crushing/fern.json b/src/main/resources/data/create/recipes/milling/fern.json similarity index 88% rename from src/main/resources/data/create/recipes/crushing/fern.json rename to src/main/resources/data/create/recipes/milling/fern.json index 98d2cf2cf..479d50381 100644 --- a/src/main/resources/data/create/recipes/crushing/fern.json +++ b/src/main/resources/data/create/recipes/milling/fern.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:fern" diff --git a/src/main/resources/data/create/recipes/crushing/golden_horse_armor.json b/src/main/resources/data/create/recipes/milling/golden_horse_armor.json similarity index 94% rename from src/main/resources/data/create/recipes/crushing/golden_horse_armor.json rename to src/main/resources/data/create/recipes/milling/golden_horse_armor.json index 6ea7d4bcf..4574bcabf 100644 --- a/src/main/resources/data/create/recipes/crushing/golden_horse_armor.json +++ b/src/main/resources/data/create/recipes/milling/golden_horse_armor.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:golden_horse_armor" diff --git a/src/main/resources/data/create/recipes/crushing/granite.json b/src/main/resources/data/create/recipes/milling/granite.json similarity index 85% rename from src/main/resources/data/create/recipes/crushing/granite.json rename to src/main/resources/data/create/recipes/milling/granite.json index d82b85c85..ff6d3c70d 100644 --- a/src/main/resources/data/create/recipes/crushing/granite.json +++ b/src/main/resources/data/create/recipes/milling/granite.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:granite" diff --git a/src/main/resources/data/create/recipes/crushing/grass.json b/src/main/resources/data/create/recipes/milling/grass.json similarity index 86% rename from src/main/resources/data/create/recipes/crushing/grass.json rename to src/main/resources/data/create/recipes/milling/grass.json index 0a7aa6764..b7a5a4110 100644 --- a/src/main/resources/data/create/recipes/crushing/grass.json +++ b/src/main/resources/data/create/recipes/milling/grass.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:grass" diff --git a/src/main/resources/data/create/recipes/crushing/gravel.json b/src/main/resources/data/create/recipes/milling/gravel.json similarity index 91% rename from src/main/resources/data/create/recipes/crushing/gravel.json rename to src/main/resources/data/create/recipes/milling/gravel.json index 7a24b7d2b..eacdb9296 100644 --- a/src/main/resources/data/create/recipes/crushing/gravel.json +++ b/src/main/resources/data/create/recipes/milling/gravel.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:gravel" diff --git a/src/main/resources/data/create/recipes/crushing/ink_sac.json b/src/main/resources/data/create/recipes/milling/ink_sac.json similarity index 89% rename from src/main/resources/data/create/recipes/crushing/ink_sac.json rename to src/main/resources/data/create/recipes/milling/ink_sac.json index 82ccec6c9..ec85b114a 100644 --- a/src/main/resources/data/create/recipes/crushing/ink_sac.json +++ b/src/main/resources/data/create/recipes/milling/ink_sac.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:ink_sac" diff --git a/src/main/resources/data/create/recipes/crushing/iron_horse_armor.json b/src/main/resources/data/create/recipes/milling/iron_horse_armor.json similarity index 94% rename from src/main/resources/data/create/recipes/crushing/iron_horse_armor.json rename to src/main/resources/data/create/recipes/milling/iron_horse_armor.json index 88ba0c780..aeafb2d50 100644 --- a/src/main/resources/data/create/recipes/crushing/iron_horse_armor.json +++ b/src/main/resources/data/create/recipes/milling/iron_horse_armor.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:iron_horse_armor" diff --git a/src/main/resources/data/create/recipes/crushing/lapis_lazuli.json b/src/main/resources/data/create/recipes/milling/lapis_lazuli.json similarity index 89% rename from src/main/resources/data/create/recipes/crushing/lapis_lazuli.json rename to src/main/resources/data/create/recipes/milling/lapis_lazuli.json index 3a7a17eed..6c6732cf6 100644 --- a/src/main/resources/data/create/recipes/crushing/lapis_lazuli.json +++ b/src/main/resources/data/create/recipes/milling/lapis_lazuli.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:lapis_lazuli" diff --git a/src/main/resources/data/create/recipes/crushing/large_fern.json b/src/main/resources/data/create/recipes/milling/large_fern.json similarity index 91% rename from src/main/resources/data/create/recipes/crushing/large_fern.json rename to src/main/resources/data/create/recipes/milling/large_fern.json index 08bde6a59..b58903449 100644 --- a/src/main/resources/data/create/recipes/crushing/large_fern.json +++ b/src/main/resources/data/create/recipes/milling/large_fern.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:large_fern" diff --git a/src/main/resources/data/create/recipes/crushing/leather_horse_armor.json b/src/main/resources/data/create/recipes/milling/leather_horse_armor.json similarity index 89% rename from src/main/resources/data/create/recipes/crushing/leather_horse_armor.json rename to src/main/resources/data/create/recipes/milling/leather_horse_armor.json index eda689e4d..21c4494ab 100644 --- a/src/main/resources/data/create/recipes/crushing/leather_horse_armor.json +++ b/src/main/resources/data/create/recipes/milling/leather_horse_armor.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:leather_horse_armor" diff --git a/src/main/resources/data/create/recipes/crushing/lilac.json b/src/main/resources/data/create/recipes/milling/lilac.json similarity index 91% rename from src/main/resources/data/create/recipes/crushing/lilac.json rename to src/main/resources/data/create/recipes/milling/lilac.json index faf14c4e0..bfc82d355 100644 --- a/src/main/resources/data/create/recipes/crushing/lilac.json +++ b/src/main/resources/data/create/recipes/milling/lilac.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:lilac" diff --git a/src/main/resources/data/create/recipes/crushing/lily_of_the_valley.json b/src/main/resources/data/create/recipes/milling/lily_of_the_valley.json similarity index 91% rename from src/main/resources/data/create/recipes/crushing/lily_of_the_valley.json rename to src/main/resources/data/create/recipes/milling/lily_of_the_valley.json index c1db9ef4f..2d307e8ed 100644 --- a/src/main/resources/data/create/recipes/crushing/lily_of_the_valley.json +++ b/src/main/resources/data/create/recipes/milling/lily_of_the_valley.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:lily_of_the_valley" diff --git a/src/main/resources/data/create/recipes/crushing/orange_tulip.json b/src/main/resources/data/create/recipes/milling/orange_tulip.json similarity index 89% rename from src/main/resources/data/create/recipes/crushing/orange_tulip.json rename to src/main/resources/data/create/recipes/milling/orange_tulip.json index 8b49605d2..d278a5f9c 100644 --- a/src/main/resources/data/create/recipes/crushing/orange_tulip.json +++ b/src/main/resources/data/create/recipes/milling/orange_tulip.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:orange_tulip" diff --git a/src/main/resources/data/create/recipes/crushing/oxeye_daisy.json b/src/main/resources/data/create/recipes/milling/oxeye_daisy.json similarity index 91% rename from src/main/resources/data/create/recipes/crushing/oxeye_daisy.json rename to src/main/resources/data/create/recipes/milling/oxeye_daisy.json index 92243c26a..a6641508d 100644 --- a/src/main/resources/data/create/recipes/crushing/oxeye_daisy.json +++ b/src/main/resources/data/create/recipes/milling/oxeye_daisy.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:oxeye_daisy" diff --git a/src/main/resources/data/create/recipes/crushing/peony.json b/src/main/resources/data/create/recipes/milling/peony.json similarity index 91% rename from src/main/resources/data/create/recipes/crushing/peony.json rename to src/main/resources/data/create/recipes/milling/peony.json index 2f752b5d1..4b031eaaa 100644 --- a/src/main/resources/data/create/recipes/crushing/peony.json +++ b/src/main/resources/data/create/recipes/milling/peony.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:peony" diff --git a/src/main/resources/data/create/recipes/crushing/pink_tulip.json b/src/main/resources/data/create/recipes/milling/pink_tulip.json similarity index 89% rename from src/main/resources/data/create/recipes/crushing/pink_tulip.json rename to src/main/resources/data/create/recipes/milling/pink_tulip.json index ababde21c..003408e10 100644 --- a/src/main/resources/data/create/recipes/crushing/pink_tulip.json +++ b/src/main/resources/data/create/recipes/milling/pink_tulip.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:pink_tulip" diff --git a/src/main/resources/data/create/recipes/crushing/poppy.json b/src/main/resources/data/create/recipes/milling/poppy.json similarity index 88% rename from src/main/resources/data/create/recipes/crushing/poppy.json rename to src/main/resources/data/create/recipes/milling/poppy.json index 48e38854f..c34ddfdcc 100644 --- a/src/main/resources/data/create/recipes/crushing/poppy.json +++ b/src/main/resources/data/create/recipes/milling/poppy.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:poppy" diff --git a/src/main/resources/data/create/recipes/crushing/red_tulip.json b/src/main/resources/data/create/recipes/milling/red_tulip.json similarity index 88% rename from src/main/resources/data/create/recipes/crushing/red_tulip.json rename to src/main/resources/data/create/recipes/milling/red_tulip.json index 76abb9f5b..43287b4bc 100644 --- a/src/main/resources/data/create/recipes/crushing/red_tulip.json +++ b/src/main/resources/data/create/recipes/milling/red_tulip.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:red_tulip" diff --git a/src/main/resources/data/create/recipes/crushing/rose_bush.json b/src/main/resources/data/create/recipes/milling/rose_bush.json similarity index 91% rename from src/main/resources/data/create/recipes/crushing/rose_bush.json rename to src/main/resources/data/create/recipes/milling/rose_bush.json index 7683b6ac1..97f5a0f18 100644 --- a/src/main/resources/data/create/recipes/crushing/rose_bush.json +++ b/src/main/resources/data/create/recipes/milling/rose_bush.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:rose_bush" diff --git a/src/main/resources/data/create/recipes/crushing/saddle.json b/src/main/resources/data/create/recipes/milling/saddle.json similarity index 91% rename from src/main/resources/data/create/recipes/crushing/saddle.json rename to src/main/resources/data/create/recipes/milling/saddle.json index 8b6059bd1..3569880d6 100644 --- a/src/main/resources/data/create/recipes/crushing/saddle.json +++ b/src/main/resources/data/create/recipes/milling/saddle.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:saddle" diff --git a/src/main/resources/data/create/recipes/crushing/sand.json b/src/main/resources/data/create/recipes/milling/sand.json similarity index 91% rename from src/main/resources/data/create/recipes/crushing/sand.json rename to src/main/resources/data/create/recipes/milling/sand.json index 8d02bd559..68321f4a8 100644 --- a/src/main/resources/data/create/recipes/crushing/sand.json +++ b/src/main/resources/data/create/recipes/milling/sand.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:sand" diff --git a/src/main/resources/data/create/recipes/crushing/sugar_cane.json b/src/main/resources/data/create/recipes/milling/sugar_cane.json similarity index 88% rename from src/main/resources/data/create/recipes/crushing/sugar_cane.json rename to src/main/resources/data/create/recipes/milling/sugar_cane.json index 219053dfc..f19d0a759 100644 --- a/src/main/resources/data/create/recipes/crushing/sugar_cane.json +++ b/src/main/resources/data/create/recipes/milling/sugar_cane.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:sugar_cane" diff --git a/src/main/resources/data/create/recipes/crushing/sunflower.json b/src/main/resources/data/create/recipes/milling/sunflower.json similarity index 91% rename from src/main/resources/data/create/recipes/crushing/sunflower.json rename to src/main/resources/data/create/recipes/milling/sunflower.json index 358680b97..8efe6a137 100644 --- a/src/main/resources/data/create/recipes/crushing/sunflower.json +++ b/src/main/resources/data/create/recipes/milling/sunflower.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:sunflower" diff --git a/src/main/resources/data/create/recipes/crushing/tall_grass.json b/src/main/resources/data/create/recipes/milling/tall_grass.json similarity index 86% rename from src/main/resources/data/create/recipes/crushing/tall_grass.json rename to src/main/resources/data/create/recipes/milling/tall_grass.json index ed595bae2..238806a21 100644 --- a/src/main/resources/data/create/recipes/crushing/tall_grass.json +++ b/src/main/resources/data/create/recipes/milling/tall_grass.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:tall_grass" diff --git a/src/main/resources/data/create/recipes/crushing/terracotta.json b/src/main/resources/data/create/recipes/milling/terracotta.json similarity index 85% rename from src/main/resources/data/create/recipes/crushing/terracotta.json rename to src/main/resources/data/create/recipes/milling/terracotta.json index 85b4fc418..807eeae8f 100644 --- a/src/main/resources/data/create/recipes/crushing/terracotta.json +++ b/src/main/resources/data/create/recipes/milling/terracotta.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:terracotta" diff --git a/src/main/resources/data/create/recipes/crushing/wheat.json b/src/main/resources/data/create/recipes/milling/wheat.json similarity index 91% rename from src/main/resources/data/create/recipes/crushing/wheat.json rename to src/main/resources/data/create/recipes/milling/wheat.json index 2fddb1788..de671565d 100644 --- a/src/main/resources/data/create/recipes/crushing/wheat.json +++ b/src/main/resources/data/create/recipes/milling/wheat.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:wheat" diff --git a/src/main/resources/data/create/recipes/crushing/white_tulip.json b/src/main/resources/data/create/recipes/milling/white_tulip.json similarity index 89% rename from src/main/resources/data/create/recipes/crushing/white_tulip.json rename to src/main/resources/data/create/recipes/milling/white_tulip.json index f64847a9e..838e2eeec 100644 --- a/src/main/resources/data/create/recipes/crushing/white_tulip.json +++ b/src/main/resources/data/create/recipes/milling/white_tulip.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:white_tulip" diff --git a/src/main/resources/data/create/recipes/crushing/wither_rose.json b/src/main/resources/data/create/recipes/milling/wither_rose.json similarity index 89% rename from src/main/resources/data/create/recipes/crushing/wither_rose.json rename to src/main/resources/data/create/recipes/milling/wither_rose.json index 543c1baa1..87f1a6cc5 100644 --- a/src/main/resources/data/create/recipes/crushing/wither_rose.json +++ b/src/main/resources/data/create/recipes/milling/wither_rose.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "item": "minecraft:wither_rose" diff --git a/src/main/resources/data/create/recipes/crushing/wool.json b/src/main/resources/data/create/recipes/milling/wool.json similarity index 88% rename from src/main/resources/data/create/recipes/crushing/wool.json rename to src/main/resources/data/create/recipes/milling/wool.json index 21f9ba59c..05984e870 100644 --- a/src/main/resources/data/create/recipes/crushing/wool.json +++ b/src/main/resources/data/create/recipes/milling/wool.json @@ -1,5 +1,5 @@ { - "type": "create:crushing", + "type": "create:milling", "ingredients": [ { "tag": "minecraft:wool" From 90316ae8cab2a96899963838d2fa256a0ace3bf5 Mon Sep 17 00:00:00 2001 From: Zelophed Date: Fri, 27 Mar 2020 13:58:16 +0100 Subject: [PATCH 04/11] added a tooltip to sandpaper - sandpaper is now enchantable - sandpaper now repairs tools for 50% of the current damage --- .../create/foundation/command/CreateCommand.java | 14 +++++--------- .../create/foundation/command/KillTPSCommand.java | 8 ++++---- .../create/foundation/item/TooltipHelper.java | 4 ++++ .../modules/curiosities/tools/SandPaperItem.java | 5 +++++ .../tools/SandPaperPolishingRecipe.java | 2 +- src/main/resources/assets/create/lang/en_us.json | 9 ++++++++- 6 files changed, 27 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/simibubi/create/foundation/command/CreateCommand.java b/src/main/java/com/simibubi/create/foundation/command/CreateCommand.java index cc55eb455..27de9b3b2 100644 --- a/src/main/java/com/simibubi/create/foundation/command/CreateCommand.java +++ b/src/main/java/com/simibubi/create/foundation/command/CreateCommand.java @@ -1,7 +1,6 @@ package com.simibubi.create.foundation.command; import com.mojang.brigadier.CommandDispatcher; -import com.mojang.brigadier.builder.ArgumentBuilder; import net.minecraft.command.CommandSource; import net.minecraft.command.Commands; @@ -9,13 +8,10 @@ import net.minecraft.command.Commands; public class CreateCommand { public CreateCommand(CommandDispatcher dispatcher) { - // KillTPSCommand.register(dispatcher); Commented out for release - addCreateCommand(dispatcher, ToggleDebugCommand.register()); - addCreateCommand(dispatcher, ClearBufferCacheCommand.register()); - } - - public void addCreateCommand(CommandDispatcher dispatcher, - ArgumentBuilder register) { - dispatcher.register(Commands.literal("create").then(register)); + dispatcher.register(Commands.literal("create") + .then(ToggleDebugCommand.register()) + .then(ClearBufferCacheCommand.register()) + //.then(KillTPSCommand.register()) //Commented out for release + ); } } diff --git a/src/main/java/com/simibubi/create/foundation/command/KillTPSCommand.java b/src/main/java/com/simibubi/create/foundation/command/KillTPSCommand.java index 9a6e54b04..d82d9e7df 100644 --- a/src/main/java/com/simibubi/create/foundation/command/KillTPSCommand.java +++ b/src/main/java/com/simibubi/create/foundation/command/KillTPSCommand.java @@ -1,7 +1,7 @@ package com.simibubi.create.foundation.command; -import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.arguments.IntegerArgumentType; +import com.mojang.brigadier.builder.ArgumentBuilder; import com.simibubi.create.Create; import com.simibubi.create.foundation.utility.Lang; @@ -10,8 +10,8 @@ import net.minecraft.command.Commands; public class KillTPSCommand { - public static void register(CommandDispatcher dispatcher) { - dispatcher.register(Commands.literal(Lang.translate("command.killTPSCommand")) + public static ArgumentBuilder register() { + return Commands.literal("killtps") .requires(cs -> cs.hasPermissionLevel(2)).executes(ctx -> { // killtps no arguments ctx.getSource().sendFeedback( @@ -63,6 +63,6 @@ public class KillTPSCommand { Lang.createTranslationTextComponent("command.killTPSCommand.status.slowed_by.2"), false); return 1; - }))); + })); } } diff --git a/src/main/java/com/simibubi/create/foundation/item/TooltipHelper.java b/src/main/java/com/simibubi/create/foundation/item/TooltipHelper.java index 337895676..84c13ec57 100644 --- a/src/main/java/com/simibubi/create/foundation/item/TooltipHelper.java +++ b/src/main/java/com/simibubi/create/foundation/item/TooltipHelper.java @@ -16,6 +16,7 @@ import com.simibubi.create.modules.contraptions.base.IRotate; import com.simibubi.create.modules.contraptions.components.flywheel.engine.EngineBlock; import com.simibubi.create.modules.curiosities.tools.AllToolTiers; +import com.simibubi.create.modules.curiosities.tools.SandPaperItem; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.player.ClientPlayerEntity; import net.minecraft.client.resources.I18n; @@ -177,6 +178,9 @@ public class TooltipHelper { } } + if (stack.getItem() instanceof SandPaperItem) + return "tool.create.sand_paper.tooltip"; + return stack.getItem().getTranslationKey(stack) + ".tooltip"; } diff --git a/src/main/java/com/simibubi/create/modules/curiosities/tools/SandPaperItem.java b/src/main/java/com/simibubi/create/modules/curiosities/tools/SandPaperItem.java index 64732c7fb..ff23eafc6 100644 --- a/src/main/java/com/simibubi/create/modules/curiosities/tools/SandPaperItem.java +++ b/src/main/java/com/simibubi/create/modules/curiosities/tools/SandPaperItem.java @@ -188,6 +188,11 @@ public class SandPaperItem extends Item implements IHaveCustomItemModel { return 8; } + @Override + public int getItemEnchantability() { + return 5; + } + @Override @OnlyIn(Dist.CLIENT) public CustomRenderedItemModel createModel(IBakedModel original) { diff --git a/src/main/java/com/simibubi/create/modules/curiosities/tools/SandPaperPolishingRecipe.java b/src/main/java/com/simibubi/create/modules/curiosities/tools/SandPaperPolishingRecipe.java index 92eaf69c2..d4cf72eb3 100644 --- a/src/main/java/com/simibubi/create/modules/curiosities/tools/SandPaperPolishingRecipe.java +++ b/src/main/java/com/simibubi/create/modules/curiosities/tools/SandPaperPolishingRecipe.java @@ -47,7 +47,7 @@ public class SandPaperPolishingRecipe extends ProcessingRecipe { return matchingRecipes.get(0).getCraftingResult(new SandPaperInv(stack)).copy(); if (stack.isDamageable() && isPolishingEnabled()) { - stack.setDamage(stack.getDamage() - (stack.getMaxDamage() - stack.getDamage()) / 2); + stack.setDamage(stack.getDamage() / 2); int fortuneLevel = EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, sandPaperStack); float chanceToPunish = (float) (1 / Math.pow(2, fortuneLevel + 1)); diff --git a/src/main/resources/assets/create/lang/en_us.json b/src/main/resources/assets/create/lang/en_us.json index 9b03596d7..e0768f536 100644 --- a/src/main/resources/assets/create/lang/en_us.json +++ b/src/main/resources/assets/create/lang/en_us.json @@ -309,6 +309,8 @@ "create.action.discard": "Discard", "create.keyinfo.toolmenu": "Focus Tool Menu", + "create.keyinfo.scrollup": "Simulate Mousewheel Up (inworld)", + "create.keyinfo.scrolldown": "Simulate Mousewheel Down (inworld)", "create.gui.scrollInput.defaultTitle": "Choose an Option:", "create.gui.scrollInput.scrollToModify": "Scroll to Modify", @@ -625,7 +627,7 @@ "advancement.create:sand_paper.desc": "Create some Sand Paper to make things pretty.", "advancement.create:polished_rose_quartz": "Pink Diamonds", "advancement.create:polished_rose_quartz.desc": "Polish Rose Quartz until you can see through it.", - "advancement.create:sand_paper_secret": "Polishception", + "advancement.create:sand_paper_secret": "9001 Grit Sand Paper", "advancement.create:sand_paper_secret.desc": "Use your Sand Paper to sand some Sand Paper.", "advancement.create:press": "'Bonk!' ", "advancement.create:press.desc": "Make a Mechanical Press and use it to create some Plates.", @@ -1115,6 +1117,11 @@ "block.create.stress_gauge.tooltip.condition1": "When Rotated", "block.create.stress_gauge.tooltip.behaviour1": "Indicates a color corresponding to the level of stress. _Over-stressed_ _networks_ will cease to move. Stress can be relieved by adding more _rotational_ _sources_ to the network.", + "tool.create.sand_paper.tooltip": "SAND PAPER", + "tool.create.sand_paper.tooltip.summary": "A rough paper that can be used to _polish_ _materials_ or sharpen your _tools_.", + "tool.create.sand_paper.tooltip.condition1": "When Used", + "tool.create.sand_paper.tooltip.behaviour1": "Applies polish to items held in the _offhand_ or lying on the _floor_ when _looking_ _at_ _them_", + "item.create.refined_radiance.tooltip": "REFINED RADIANCE", "item.create.refined_radiance.tooltip.summary": "A Chromatic material forged from _absorbed_ _light_.", From ca86273f5f1f72ef0455ba30904e91b22f0414c1 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Fri, 27 Mar 2020 17:52:05 +0100 Subject: [PATCH 05/11] Millstone cont'd - Overstressed components now show a tooltip, unless disabled in config - JEI compat for millstone recipes - Crushing Wheels now require mechanical crafting in order to be assembled - Millstones now drop contents when broken - Players can manually collect millstone outputs via right-click - Fixed millstone removing ingredients before looking up a recipe - Gauges no longer require a block to sit on (QOL) --- .../com/simibubi/create/AllBlockPartials.java | 2 +- .../simibubi/create/compat/jei/CreateJEI.java | 26 ++-- .../compat/jei/category/CrushingCategory.java | 2 +- .../compat/jei/category/MillingCategory.java | 111 ++++++++++++++++++ .../animations/AnimatedMillstone.java | 55 +++++++++ .../com/simibubi/create/config/CClient.java | 2 + .../contraptions/base/KineticTileEntity.java | 50 ++++++-- .../components/millstone/MillingRecipe.java | 2 +- .../components/millstone/MillstoneBlock.java | 90 +++++++++++++- .../millstone/MillstoneRenderer.java | 2 +- .../millstone/MillstoneTileEntity.java | 7 +- .../goggle/GoggleOverlayRenderer.java | 31 +++-- .../goggle/IHaveHoveringInformation.java | 14 +++ .../processing/BasinOperatingTileEntity.java | 2 + .../contraptions/relays/gauge/GaugeBlock.java | 55 +++++---- .../logistics/item/filter/FilterItem.java | 2 +- .../resources/assets/create/lang/en_us.json | 7 ++ .../create/models/block/millstone/inner.json | 4 +- .../contraptions/crushing_wheel.json | 29 ----- .../diamond_horse_armor.json | 2 +- .../golden_horse_armor.json | 2 +- .../data/create/recipes/crushing/gravel.json | 25 ++++ .../iron_horse_armor.json | 2 +- .../leather_horse_armor.json | 2 +- .../data/create/recipes/crushing/sand.json | 25 ++++ .../mechanical_crafting/crushing_wheel.json | 34 ++++++ .../data/create/recipes/milling/clay.json | 5 - .../create/recipes/milling/copper_ore.json | 15 +++ .../data/create/recipes/milling/gold_ore.json | 15 +++ .../data/create/recipes/milling/gravel.json | 12 +- .../data/create/recipes/milling/iron_ore.json | 15 +++ .../data/create/recipes/milling/sand.json | 10 -- .../data/create/recipes/milling/zinc_ore.json | 15 +++ 33 files changed, 550 insertions(+), 122 deletions(-) create mode 100644 src/main/java/com/simibubi/create/compat/jei/category/MillingCategory.java create mode 100644 src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedMillstone.java create mode 100644 src/main/java/com/simibubi/create/modules/contraptions/goggle/IHaveHoveringInformation.java delete mode 100644 src/main/resources/data/create/recipes/crafting_shaped/contraptions/crushing_wheel.json rename src/main/resources/data/create/recipes/{milling => crushing}/diamond_horse_armor.json (92%) rename src/main/resources/data/create/recipes/{milling => crushing}/golden_horse_armor.json (94%) create mode 100644 src/main/resources/data/create/recipes/crushing/gravel.json rename src/main/resources/data/create/recipes/{milling => crushing}/iron_horse_armor.json (94%) rename src/main/resources/data/create/recipes/{milling => crushing}/leather_horse_armor.json (89%) create mode 100644 src/main/resources/data/create/recipes/crushing/sand.json create mode 100644 src/main/resources/data/create/recipes/mechanical_crafting/crushing_wheel.json create mode 100644 src/main/resources/data/create/recipes/milling/copper_ore.json create mode 100644 src/main/resources/data/create/recipes/milling/gold_ore.json create mode 100644 src/main/resources/data/create/recipes/milling/iron_ore.json create mode 100644 src/main/resources/data/create/recipes/milling/zinc_ore.json diff --git a/src/main/java/com/simibubi/create/AllBlockPartials.java b/src/main/java/com/simibubi/create/AllBlockPartials.java index 667f577ca..e5e95a7ed 100644 --- a/src/main/java/com/simibubi/create/AllBlockPartials.java +++ b/src/main/java/com/simibubi/create/AllBlockPartials.java @@ -67,7 +67,7 @@ public enum AllBlockPartials { ROPE_COIL("pulley/rope_coil"), ROPE_HALF("pulley/rope_half"), ROPE_HALF_MAGNET("pulley/rope_half_magnet"), - MILL_STONE_COG("millstone/inner"), + MILLSTONE_COG("millstone/inner"), ; diff --git a/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java b/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java index 61a021107..4bbf9f277 100644 --- a/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java +++ b/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java @@ -15,6 +15,7 @@ import com.simibubi.create.compat.jei.category.BlockCuttingCategory.CondensedBlo import com.simibubi.create.compat.jei.category.BlockzapperUpgradeCategory; import com.simibubi.create.compat.jei.category.CrushingCategory; import com.simibubi.create.compat.jei.category.MechanicalCraftingCategory; +import com.simibubi.create.compat.jei.category.MillingCategory; import com.simibubi.create.compat.jei.category.MixingCategory; import com.simibubi.create.compat.jei.category.MysteriousItemConversionCategory; import com.simibubi.create.compat.jei.category.PackingCategory; @@ -55,6 +56,7 @@ import net.minecraft.util.text.TextFormatting; public class CreateJEI implements IModPlugin { private static ResourceLocation ID = new ResourceLocation(Create.ID, "jei_plugin"); + private MillingCategory millingCategory; private CrushingCategory crushingCategory; private SplashingCategory splashingCategory; private SmokingViaFanCategory smokingCategory; @@ -76,6 +78,7 @@ public class CreateJEI implements IModPlugin { } public CreateJEI() { + millingCategory = new MillingCategory(); crushingCategory = new CrushingCategory(); splashingCategory = new SplashingCategory(); pressingCategory = new PressingCategory(); @@ -99,14 +102,15 @@ public class CreateJEI implements IModPlugin { @Override public void registerCategories(IRecipeCategoryRegistration registration) { - registration.addRecipeCategories(crushingCategory, splashingCategory, pressingCategory, smokingCategory, - blastingCategory, blockzapperCategory, mixingCategory, sawingCategory, blockCuttingCategory, - packingCategory, polishingCategory, mysteryConversionCategory, smallMechanicalCraftingCategory, - largeMechanicalCraftingCategory); + registration.addRecipeCategories(millingCategory, crushingCategory, splashingCategory, pressingCategory, + smokingCategory, blastingCategory, blockzapperCategory, mixingCategory, sawingCategory, + blockCuttingCategory, packingCategory, polishingCategory, mysteryConversionCategory, + smallMechanicalCraftingCategory, largeMechanicalCraftingCategory); } @Override public void registerRecipes(IRecipeRegistration registration) { + registration.addRecipes(findRecipes(AllRecipes.MILLING), millingCategory.getUid()); registration.addRecipes(findRecipes(AllRecipes.CRUSHING), crushingCategory.getUid()); registration.addRecipes(findRecipesByTypeExcluding(AllRecipes.MILLING.getType(), AllRecipes.CRUSHING.getType()), crushingCategory.getUid()); @@ -135,12 +139,15 @@ public class CreateJEI implements IModPlugin { registration.addRecipes(findRecipes( r -> (r instanceof MechanicalCraftingRecipe) && MechanicalCraftingCategory.isSmall((ShapedRecipe) r)), smallMechanicalCraftingCategory.getUid()); - registration.addRecipes(findRecipes(r -> r.getType() == IRecipeType.CRAFTING && (r instanceof ShapedRecipe) - && !(r instanceof MechanicalCraftingRecipe) && MechanicalCraftingCategory.isSmall((ShapedRecipe) r)), - smallMechanicalCraftingCategory.getUid()); registration.addRecipes( - findRecipes(r -> r.getType() == IRecipeType.CRAFTING && (r instanceof ShapedRecipe) - && !MechanicalCraftingCategory.isSmall((ShapedRecipe) r)), + findRecipes( + r -> (r.getType() == IRecipeType.CRAFTING || r.getType() == AllRecipes.MECHANICAL_CRAFTING.type) + && (r instanceof ShapedRecipe) && !(r instanceof MechanicalCraftingRecipe) + && MechanicalCraftingCategory.isSmall((ShapedRecipe) r)), + smallMechanicalCraftingCategory.getUid()); + registration.addRecipes(findRecipes( + r -> (r.getType() == IRecipeType.CRAFTING || r.getType() == AllRecipes.MECHANICAL_CRAFTING.type) + && (r instanceof ShapedRecipe) && !MechanicalCraftingCategory.isSmall((ShapedRecipe) r)), largeMechanicalCraftingCategory.getUid()); } @@ -156,6 +163,7 @@ public class CreateJEI implements IModPlugin { ItemStack blastingFan = fan.copy().setDisplayName( new StringTextComponent(TextFormatting.RESET + Lang.translate("recipe.blastingViaFan.fan"))); + registration.addRecipeCatalyst(new ItemStack(AllBlocks.MILLSTONE.get()), millingCategory.getUid()); registration.addRecipeCatalyst(new ItemStack(AllBlocks.CRUSHING_WHEEL.get()), crushingCategory.getUid()); registration.addRecipeCatalyst(splashingFan, splashingCategory.getUid()); registration.addRecipeCatalyst(smokingFan, smokingCategory.getUid()); diff --git a/src/main/java/com/simibubi/create/compat/jei/category/CrushingCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/CrushingCategory.java index 8a4da5a26..2b4bdc07a 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/CrushingCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/CrushingCategory.java @@ -33,7 +33,7 @@ public class CrushingCategory implements IRecipeCategory public CrushingCategory() { icon = new DoubleItemIcon(() -> new ItemStack(AllBlocks.CRUSHING_WHEEL.get()), - () -> new ItemStack(AllItems.FLOUR.get())); + () -> new ItemStack(AllItems.CRUSHED_GOLD.get())); } @Override diff --git a/src/main/java/com/simibubi/create/compat/jei/category/MillingCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/MillingCategory.java new file mode 100644 index 000000000..25a555411 --- /dev/null +++ b/src/main/java/com/simibubi/create/compat/jei/category/MillingCategory.java @@ -0,0 +1,111 @@ +package com.simibubi.create.compat.jei.category; + +import java.util.Arrays; +import java.util.List; + +import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllItems; +import com.simibubi.create.Create; +import com.simibubi.create.ScreenResources; +import com.simibubi.create.compat.jei.CreateJEI; +import com.simibubi.create.compat.jei.DoubleItemIcon; +import com.simibubi.create.compat.jei.EmptyBackground; +import com.simibubi.create.compat.jei.category.animations.AnimatedMillstone; +import com.simibubi.create.foundation.utility.Lang; +import com.simibubi.create.modules.contraptions.components.crusher.AbstractCrushingRecipe; +import com.simibubi.create.modules.contraptions.processing.ProcessingOutput; + +import mezz.jei.api.constants.VanillaTypes; +import mezz.jei.api.gui.IRecipeLayout; +import mezz.jei.api.gui.drawable.IDrawable; +import mezz.jei.api.gui.ingredient.IGuiItemStackGroup; +import mezz.jei.api.ingredients.IIngredients; +import mezz.jei.api.recipe.category.IRecipeCategory; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; + +public class MillingCategory implements IRecipeCategory { + + private static ResourceLocation ID = new ResourceLocation(Create.ID, "milling"); + private AnimatedMillstone millstone = new AnimatedMillstone(); + private IDrawable icon; + private IDrawable background = new EmptyBackground(177, 53); + + public MillingCategory() { + icon = new DoubleItemIcon(() -> new ItemStack(AllBlocks.MILLSTONE.get()), + () -> new ItemStack(AllItems.FLOUR.get())); + } + + @Override + public IDrawable getBackground() { + return background; + } + + @Override + public ResourceLocation getUid() { + return ID; + } + + @Override + public Class getRecipeClass() { + return AbstractCrushingRecipe.class; + } + + @Override + public String getTitle() { + return Lang.translate("recipe.milling"); + } + + @Override + public IDrawable getIcon() { + return icon; + } + + @Override + public void setIngredients(AbstractCrushingRecipe recipe, IIngredients ingredients) { + ingredients.setInputIngredients(recipe.getIngredients()); + ingredients.setOutputs(VanillaTypes.ITEM, recipe.getPossibleOutputs()); + } + + @Override + public void setRecipe(IRecipeLayout recipeLayout, AbstractCrushingRecipe recipe, IIngredients ingredients) { + IGuiItemStackGroup itemStacks = recipeLayout.getItemStacks(); + itemStacks.init(0, true, 14, 8); + itemStacks.set(0, Arrays.asList(recipe.getIngredients().get(0).getMatchingStacks())); + + List results = recipe.getRollableResults(); + boolean single = results.size() == 1; + for (int outputIndex = 0; outputIndex < results.size(); outputIndex++) { + int xOffset = outputIndex % 2 == 0 ? 0 : 19; + int yOffset = (outputIndex / 2) * -19; + + itemStacks.init(outputIndex + 1, false, single ? 139 : 133 + xOffset, 27 + yOffset); + itemStacks.set(outputIndex + 1, results.get(outputIndex).getStack()); + } + + CreateJEI.addStochasticTooltip(itemStacks, results); + } + + @Override + public void draw(AbstractCrushingRecipe recipe, double mouseX, double mouseY) { + int size = recipe.getPossibleOutputs().size(); + + ScreenResources.JEI_SLOT.draw(14, 8); + ScreenResources.JEI_SHADOW.draw(30, 40); + ScreenResources.JEI_ARROW.draw(85, 32); + ScreenResources.JEI_DOWN_ARROW.draw(43, 4); + + if (size > 1) { + for (int i = 0; i < size; i++) { + int xOffset = i % 2 == 0 ? 0 : 19; + int yOffset = (i / 2) * -19; + ScreenResources.JEI_SLOT.draw(133 + xOffset, 27 + yOffset); + } + } else { + ScreenResources.JEI_SLOT.draw(139, 27); + } + + millstone.draw(57, 27); + } + +} diff --git a/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedMillstone.java b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedMillstone.java new file mode 100644 index 000000000..0d186c50c --- /dev/null +++ b/src/main/java/com/simibubi/create/compat/jei/category/animations/AnimatedMillstone.java @@ -0,0 +1,55 @@ +package com.simibubi.create.compat.jei.category.animations; + +import com.mojang.blaze3d.platform.GlStateManager; +import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.AllBlocks; +import com.simibubi.create.foundation.gui.ScreenElementRenderer; + +import net.minecraft.block.BlockState; +import net.minecraft.client.renderer.model.IBakedModel; + +public class AnimatedMillstone extends AnimatedKinetics { + + @Override + public int getWidth() { + return 50; + } + + @Override + public int getHeight() { + return 50; + } + + @Override + public void draw(int xOffset, int yOffset) { + GlStateManager.pushMatrix(); + GlStateManager.enableDepthTest(); + GlStateManager.translatef(xOffset, yOffset, 0); + GlStateManager.rotatef(-15.5f, 1, 0, 0); + GlStateManager.rotatef(22.5f, 0, 1, 0); + GlStateManager.translatef(-45, -5, 0); + GlStateManager.scaled(.45f, .45f, .45f); + + GlStateManager.pushMatrix(); + ScreenElementRenderer.renderModel(this::cogwheel); + GlStateManager.popMatrix(); + + GlStateManager.pushMatrix(); + ScreenElementRenderer.renderBlock(this::body); + GlStateManager.popMatrix(); + + GlStateManager.popMatrix(); + } + + private IBakedModel cogwheel() { + float t = 25; + GlStateManager.translatef(t, -t, -t); + GlStateManager.rotated(getCurrentAngle() * 2, 0, 1, 0); + GlStateManager.translatef(-t, t, t); + return AllBlockPartials.MILLSTONE_COG.get(); + } + + private BlockState body() { + return AllBlocks.MILLSTONE.get().getDefaultState(); + } +} diff --git a/src/main/java/com/simibubi/create/config/CClient.java b/src/main/java/com/simibubi/create/config/CClient.java index 67c53c20f..718a2b33d 100644 --- a/src/main/java/com/simibubi/create/config/CClient.java +++ b/src/main/java/com/simibubi/create/config/CClient.java @@ -5,6 +5,8 @@ public class CClient extends ConfigBase { public ConfigGroup client = group(0, "client", "Client-only settings - If you're looking for general settings, look inside your worlds serverconfig folder!"); public ConfigBool tooltips = b(true, "enableTooltips", "Show item descriptions on Shift and controls on Ctrl."); + public ConfigBool enableOverstressedTooltip = + b(true, "enableOverstressedTooltip", "Display a tooltip when looking at overstressed components."); public ConfigBool explainRenderErrors = b(false, "explainRenderErrors", "Log a stack-trace when rendering issues happen within a moving contraption."); public ConfigFloat fanParticleDensity = f(.5f, 0, 1, "fanParticleDensity"); 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 73233dbb4..ff189d48e 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,6 @@ package com.simibubi.create.modules.contraptions.base; +import static net.minecraft.util.text.TextFormatting.GOLD; import static net.minecraft.util.text.TextFormatting.GRAY; import java.util.List; @@ -19,6 +20,7 @@ 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 com.simibubi.create.modules.contraptions.goggle.IHaveHoveringInformation; import net.minecraft.block.BlockState; import net.minecraft.client.resources.I18n; @@ -33,7 +35,8 @@ import net.minecraft.util.text.TextFormatting; import net.minecraft.world.World; import net.minecraftforge.common.ForgeConfigSpec.ConfigValue; -public abstract class KineticTileEntity extends SmartTileEntity implements ITickableTileEntity, IHaveGoggleInformation { +public abstract class KineticTileEntity extends SmartTileEntity + implements ITickableTileEntity, IHaveGoggleInformation, IHaveHoveringInformation { public @Nullable Long network; public @Nullable BlockPos source; @@ -353,28 +356,51 @@ public abstract class KineticTileEntity extends SmartTileEntity implements ITick return true; } + @Override + public boolean addToTooltip(List tooltip, boolean isPlayerSneaking) { + boolean notFastEnough = !isSpeedRequirementFulfilled() && getSpeed() != 0; + + if (overStressed && AllConfigs.CLIENT.enableOverstressedTooltip.get()) { + tooltip.add(spacing + GOLD + Lang.translate("gui.stress_gauge.overstressed")); + String hint = Lang.translate("gui.contraptions.network_overstressed", + I18n.format(getBlockState().getBlock().getTranslationKey())); + List cutString = TooltipHelper.cutString(spacing + hint, GRAY, TextFormatting.WHITE); + for (int i = 0; i < cutString.size(); i++) + tooltip.add((i == 0 ? "" : spacing) + cutString.get(i)); + return true; + } + + if (notFastEnough) { + tooltip.add(spacing + GOLD + Lang.translate("tooltip.speedRequirement")); + String hint = Lang.translate("gui.contraptions.not_fast_enough", + I18n.format(getBlockState().getBlock().getTranslationKey())); + List cutString = TooltipHelper.cutString(spacing + hint, GRAY, TextFormatting.WHITE); + for (int i = 0; i < cutString.size(); i++) + tooltip.add((i == 0 ? "" : spacing) + cutString.get(i)); + return true; + } + + return false; + } + @Override public boolean addToGoggleTooltip(List tooltip, boolean isPlayerSneaking) { boolean added = false; float stressAtBase = getStressApplied(); - boolean notFastEnough = !isSpeedRequirementFulfilled() && getSpeed() != 0; - - if (notFastEnough) { - tooltip.addAll(TooltipHelper.cutString(spacing + Lang.translate("gui.contraptions.not_fast_enough", I18n.format(getBlockState().getBlock().getTranslationKey())), GRAY, TextFormatting.WHITE)); - added = true; - } - - if (getStressApplied() != 0 && StressImpact.isEnabled()){ + if (getStressApplied() != 0 && StressImpact.isEnabled()) { tooltip.add(spacing + Lang.translate("gui.goggles.kinetic_stats")); tooltip.add(spacing + TextFormatting.GRAY + Lang.translate("tooltip.stressImpact")); float stressTotal = stressAtBase * Math.abs(getSpeed()); - String stressString = spacing + "%s%s" + Lang.translate("generic.unit.stress") + " " + TextFormatting.DARK_GRAY + "%s"; + String stressString = + spacing + "%s%s" + Lang.translate("generic.unit.stress") + " " + TextFormatting.DARK_GRAY + "%s"; - tooltip.add(String.format(stressString, TextFormatting.AQUA, IHaveGoggleInformation.format(stressAtBase), Lang.translate("gui.goggles.base_value"))); - tooltip.add(String.format(stressString, TextFormatting.GRAY, IHaveGoggleInformation.format(stressTotal), Lang.translate("gui.goggles.at_current_speed"))); + tooltip.add(String.format(stressString, TextFormatting.AQUA, IHaveGoggleInformation.format(stressAtBase), + Lang.translate("gui.goggles.base_value"))); + tooltip.add(String.format(stressString, TextFormatting.GRAY, IHaveGoggleInformation.format(stressTotal), + Lang.translate("gui.goggles.at_current_speed"))); added = true; } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillingRecipe.java b/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillingRecipe.java index c9a480b35..be6c6cd56 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillingRecipe.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillingRecipe.java @@ -27,7 +27,7 @@ public class MillingRecipe extends AbstractCrushingRecipe { @Override protected int getMaxOutputCount() { - return 7; + return 4; } } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneBlock.java index 28adb70db..71d707646 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneBlock.java @@ -5,14 +5,27 @@ import com.simibubi.create.modules.contraptions.base.KineticBlock; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; +import net.minecraft.entity.Entity; +import net.minecraft.entity.item.ItemEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.inventory.InventoryHelper; +import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Direction; 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; import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.world.IBlockReader; import net.minecraft.world.IWorldReader; +import net.minecraft.world.World; +import net.minecraftforge.common.util.LazyOptional; +import net.minecraftforge.items.CapabilityItemHandler; +import net.minecraftforge.items.IItemHandler; +import net.minecraftforge.items.IItemHandlerModifiable; +import net.minecraftforge.items.ItemStackHandler; public class MillstoneBlock extends KineticBlock { @@ -29,7 +42,7 @@ public class MillstoneBlock extends KineticBlock { protected boolean hasStaticPart() { return true; } - + @Override public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { return AllShapes.MILLSTONE; @@ -39,6 +52,81 @@ public class MillstoneBlock extends KineticBlock { public boolean hasShaftTowards(IWorldReader world, BlockPos pos, BlockState state, Direction face) { return face == Direction.DOWN; } + + @Override + public boolean onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, + BlockRayTraceResult hit) { + if (!player.getHeldItem(handIn).isEmpty()) + return false; + if (worldIn.getTileEntity(pos) == null) + return false; + if (worldIn.isRemote) + return true; + + TileEntity tileEntity = worldIn.getTileEntity(pos); + if (!(tileEntity instanceof MillstoneTileEntity)) + return false; + MillstoneTileEntity millstone = (MillstoneTileEntity) tileEntity; + + IItemHandlerModifiable inv = millstone.outputInv; + for (int slot = 0; slot < inv.getSlots(); slot++) { + player.inventory.placeItemBackInInventory(worldIn, inv.getStackInSlot(slot)); + inv.setStackInSlot(slot, ItemStack.EMPTY); + } + millstone.markDirty(); + millstone.sendData(); + return true; + } + + @Override + public void onLanded(IBlockReader worldIn, Entity entityIn) { + super.onLanded(worldIn, entityIn); + + if (entityIn.world.isRemote) + return; + if (!(entityIn instanceof ItemEntity)) + return; + + BlockPos pos = entityIn.getPosition(); + TileEntity tileEntity = worldIn.getTileEntity(pos); + if (!(tileEntity instanceof MillstoneTileEntity)) { + tileEntity = worldIn.getTileEntity(pos.down()); + if (!(tileEntity instanceof MillstoneTileEntity)) + return; + } + + MillstoneTileEntity millstone = (MillstoneTileEntity) tileEntity; + ItemEntity itemEntity = (ItemEntity) entityIn; + LazyOptional capability = millstone.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY); + if (!capability.isPresent()) + return; + + ItemStack remainder = capability.orElse(new ItemStackHandler()).insertItem(0, itemEntity.getItem(), false); + if (remainder.isEmpty()) + itemEntity.remove(); + if (remainder.getCount() < itemEntity.getItem().getCount()) + itemEntity.setItem(remainder); + } + + @Override + public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) { + if (state.hasTileEntity() && state.getBlock() != newState.getBlock()) { + TileEntity tileEntity = worldIn.getTileEntity(pos); + if (!(tileEntity instanceof MillstoneTileEntity)) + return; + MillstoneTileEntity te = (MillstoneTileEntity) tileEntity; + for (int slot = 0; slot < te.inputInv.getSlots(); slot++) { + InventoryHelper.spawnItemStack(worldIn, pos.getX(), pos.getY(), pos.getZ(), + te.inputInv.getStackInSlot(slot)); + } + for (int slot = 0; slot < te.outputInv.getSlots(); slot++) { + InventoryHelper.spawnItemStack(worldIn, pos.getX(), pos.getY(), pos.getZ(), + te.outputInv.getStackInSlot(slot)); + } + + worldIn.removeTileEntity(pos); + } + } @Override public boolean hasIntegratedCogwheel(IWorldReader world, BlockPos pos, BlockState state) { diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneRenderer.java b/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneRenderer.java index ff8b12d84..519774db4 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneRenderer.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneRenderer.java @@ -10,7 +10,7 @@ public class MillstoneRenderer extends KineticTileEntityRenderer { @Override protected SuperByteBuffer getRotatedModel(KineticTileEntity te) { - return CreateClient.bufferCache.renderPartial(AllBlockPartials.MILL_STONE_COG, te.getBlockState()); + return CreateClient.bufferCache.renderPartial(AllBlockPartials.MILLSTONE_COG, te.getBlockState()); } } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneTileEntity.java index 0059bb366..247272b33 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/millstone/MillstoneTileEntity.java @@ -65,7 +65,6 @@ public class MillstoneTileEntity extends KineticTileEntity { if (lastRecipe == null || !lastRecipe.matches(inventoryIn, world)) { Optional recipe = world.getRecipeManager().getRecipe(AllRecipes.MILLING.getType(), inventoryIn, world); - inputInv.getStackInSlot(0).shrink(1); if (!recipe.isPresent()) { timer = 100; sendData(); @@ -83,9 +82,6 @@ public class MillstoneTileEntity extends KineticTileEntity { private void process() { RecipeWrapper inventoryIn = new RecipeWrapper(inputInv); - ItemStack stackInSlot = inputInv.getStackInSlot(0); - stackInSlot.shrink(1); - inputInv.setStackInSlot(0, stackInSlot); if (lastRecipe == null || !lastRecipe.matches(inventoryIn, world)) { Optional recipe = @@ -95,6 +91,9 @@ public class MillstoneTileEntity extends KineticTileEntity { lastRecipe = recipe.get(); } + ItemStack stackInSlot = inputInv.getStackInSlot(0); + stackInSlot.shrink(1); + inputInv.setStackInSlot(0, stackInSlot); lastRecipe.rollResults().forEach(stack -> ItemHandlerHelper.insertItemStacked(outputInv, stack, false)); sendData(); markDirty(); diff --git a/src/main/java/com/simibubi/create/modules/contraptions/goggle/GoggleOverlayRenderer.java b/src/main/java/com/simibubi/create/modules/contraptions/goggle/GoggleOverlayRenderer.java index 9a76cd34b..c432d5530 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/goggle/GoggleOverlayRenderer.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/goggle/GoggleOverlayRenderer.java @@ -41,17 +41,34 @@ public class GoggleOverlayRenderer { ItemStack goggles = mc.player.getItemStackFromSlot(EquipmentSlotType.HEAD); TileEntity te = world.getTileEntity(pos); - if (!AllItems.GOGGLES.typeOf(goggles)) - return; + boolean goggleInformation = te instanceof IHaveGoggleInformation; + boolean hoveringInformation = te instanceof IHaveHoveringInformation; - if (!(te instanceof IHaveGoggleInformation)) + if (!goggleInformation && !hoveringInformation) return; - IHaveGoggleInformation gte = (IHaveGoggleInformation) te; - List tooltip = new ArrayList<>(); - if (!gte.addToGoggleTooltip(tooltip, mc.player.isSneaking())) + if (goggleInformation && AllItems.GOGGLES.typeOf(goggles)) { + IHaveGoggleInformation gte = (IHaveGoggleInformation) te; + if (!gte.addToGoggleTooltip(tooltip, mc.player.isSneaking())) + goggleInformation = false; + } + + if (hoveringInformation) { + boolean goggleAddedInformation = !tooltip.isEmpty(); + if (goggleAddedInformation) + tooltip.add(""); + IHaveHoveringInformation hte = (IHaveHoveringInformation) te; + if (!hte.addToTooltip(tooltip, mc.player.isSneaking())) + hoveringInformation = false; + if (goggleAddedInformation && !hoveringInformation) + tooltip.remove(tooltip.size() - 1); + } + + if (!goggleInformation && !hoveringInformation) + return; + if (tooltip.isEmpty()) return; GlStateManager.pushMatrix(); @@ -70,7 +87,7 @@ public class GoggleOverlayRenderer { tooltipScreen.init(mc, mc.mainWindow.getScaledWidth(), mc.mainWindow.getScaledHeight()); tooltipScreen.renderTooltip(tooltip, tooltipScreen.width / 2, tooltipScreen.height / 2); - ItemStack item = goggles; + ItemStack item = AllItems.GOGGLES.asStack(); ScreenElementRenderer.render3DItem(() -> { GlStateManager.translated(tooltipScreen.width / 2 + 10, tooltipScreen.height / 2 - 16, 0); return item; diff --git a/src/main/java/com/simibubi/create/modules/contraptions/goggle/IHaveHoveringInformation.java b/src/main/java/com/simibubi/create/modules/contraptions/goggle/IHaveHoveringInformation.java new file mode 100644 index 000000000..d830babf0 --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/contraptions/goggle/IHaveHoveringInformation.java @@ -0,0 +1,14 @@ +package com.simibubi.create.modules.contraptions.goggle; + +import java.util.List; + +/* +* Implement this Interface in the TileEntity class that wants to add info to the screen +* */ +public interface IHaveHoveringInformation { + + default boolean addToTooltip(List tooltip, boolean isPlayerSneaking){ + return false; + } + +} 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 eaa5bb9e4..ec78f988f 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 @@ -51,6 +51,8 @@ public abstract class BasinOperatingTileEntity extends KineticTileEntity { } public void gatherInputs() { + if (!basinInv.isPresent()) + return; BasinInventory inv = (BasinInventory) basinInv.orElse(null); inputs = new ArrayList<>(); IItemHandlerModifiable inputHandler = inv.getInputHandler(); diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/gauge/GaugeBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/gauge/GaugeBlock.java index 592ecf8a1..bcd1f077b 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/relays/gauge/GaugeBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/gauge/GaugeBlock.java @@ -6,6 +6,7 @@ import com.simibubi.create.foundation.utility.ColorHelper; import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.modules.contraptions.base.DirectionalAxisKineticBlock; +import com.simibubi.create.modules.contraptions.base.IRotate; import net.minecraft.block.Block; import net.minecraft.block.BlockState; @@ -25,7 +26,6 @@ import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.shapes.ISelectionContext; import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.world.IBlockReader; -import net.minecraft.world.IWorldReader; import net.minecraft.world.World; public class GaugeBlock extends DirectionalAxisKineticBlock { @@ -65,34 +65,41 @@ public class GaugeBlock extends DirectionalAxisKineticBlock { return Blocks.SPRUCE_PLANKS.getMaterialColor(state, worldIn, pos); } + @Override + public BlockState getStateForPlacement(BlockItemUseContext context) { + World world = context.getWorld(); + Direction face = context.getFace(); + BlockPos placedOnPos = context.getPos().offset(context.getFace().getOpposite()); + BlockState placedOnState = world.getBlockState(placedOnPos); + Block block = placedOnState.getBlock(); + + if (block instanceof IRotate && ((IRotate) block).hasShaftTowards(world, placedOnPos, placedOnState, face)) { + BlockState toPlace = getDefaultState(); + Direction horizontalFacing = context.getPlacementHorizontalFacing(); + Direction nearestLookingDirection = context.getNearestLookingDirection(); + boolean lookPositive = nearestLookingDirection.getAxisDirection() == AxisDirection.POSITIVE; + if (face.getAxis() == Axis.X) { + toPlace = toPlace.with(FACING, lookPositive ? Direction.NORTH : Direction.SOUTH) + .with(AXIS_ALONG_FIRST_COORDINATE, true); + } else if (face.getAxis() == Axis.Y) { + toPlace = toPlace.with(FACING, horizontalFacing.getOpposite()).with(AXIS_ALONG_FIRST_COORDINATE, + horizontalFacing.getAxis() == Axis.X); + } else { + toPlace = toPlace.with(FACING, lookPositive ? Direction.WEST : Direction.EAST) + .with(AXIS_ALONG_FIRST_COORDINATE, false); + } + + return toPlace; + } + + return super.getStateForPlacement(context); + } + @Override protected boolean hasStaticPart() { return true; } - @Override - public boolean isValidPosition(BlockState state, IWorldReader worldIn, BlockPos pos) { - Direction facing = state.get(FACING).getOpposite(); - BlockPos neighbourPos = pos.offset(facing); - BlockState neighbour = worldIn.getBlockState(neighbourPos); - return Block.hasSolidSide(neighbour, worldIn, neighbourPos, facing.getOpposite()); - } - - @Override - public void neighborChanged(BlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos, - boolean isMoving) { - if (worldIn.isRemote) - return; - - Direction blockFacing = state.get(FACING); - if (fromPos.equals(pos.offset(blockFacing.getOpposite()))) { - if (!isValidPosition(state, worldIn, pos)) { - worldIn.destroyBlock(pos, true); - return; - } - } - } - @Override protected Direction getFacingForPlacement(BlockItemUseContext context) { return context.getFace(); diff --git a/src/main/java/com/simibubi/create/modules/logistics/item/filter/FilterItem.java b/src/main/java/com/simibubi/create/modules/logistics/item/filter/FilterItem.java index bd9d2e4f2..9d8b478c5 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/item/filter/FilterItem.java +++ b/src/main/java/com/simibubi/create/modules/logistics/item/filter/FilterItem.java @@ -58,7 +58,7 @@ public class FilterItem extends Item implements INamedContainerProvider { ItemDescription.add(tooltip, makeSummary); } } - + private List makeSummary(ItemStack filter) { List list = new ArrayList<>(); diff --git a/src/main/resources/assets/create/lang/en_us.json b/src/main/resources/assets/create/lang/en_us.json index 9b03596d7..4173464b0 100644 --- a/src/main/resources/assets/create/lang/en_us.json +++ b/src/main/resources/assets/create/lang/en_us.json @@ -269,6 +269,7 @@ "death.attack.create.cuckoo_clock_explosion": "%1$s was blown up by tampered cuckoo clock", "create.recipe.crushing": "Crushing", + "create.recipe.milling": "Milling", "create.recipe.splashing": "Bulk Washing", "create.recipe.splashing.fan": "Fan behind Flowing Water", "create.recipe.smokingViaFan": "Bulk Smoking", @@ -400,6 +401,7 @@ "create.gui.stress_gauge.no_rotation": "No Rotation", "create.gui.contraptions.not_fast_enough": "It appears that this %1$s is _not_ rotating with _enough_ _speed_.", + "create.gui.contraptions.network_overstressed": "It appears that this contraption is _overstressed_. Add more sources or _slow_ _down_ the components with a high _stress_ _impact_.", "create.gui.flexcrate.title": "Adjustable Crate", "create.gui.flexcrate.storageSpace": "Storage Space", @@ -849,6 +851,11 @@ "block.create.turntable.tooltip": "TURNTABLE", "block.create.turntable.tooltip.summary": "Turns _Rotational_ _Force_ into refined Motion Sickness.", + + "block.create.millstone.tooltip": "MILLSTONE", + "block.create.millstone.tooltip.summary": "A kinetic component suitable for _grinding_ inserted _materials_. Can be powered by an adjacent cogwheel or by connecting to the shaft at the bottom.", + "block.create.millstone.tooltip.condition1": "When Rotated", + "block.create.millstone.tooltip.behaviour1": "Starts applying _milling_ _recipes_ to any items inserted from the side or the top of the block.", "block.create.crushing_wheel.tooltip": "CRUSHING WHEEL", "block.create.crushing_wheel.tooltip.summary": "Large rotatable wheels that _break_ _down_ anything.", diff --git a/src/main/resources/assets/create/models/block/millstone/inner.json b/src/main/resources/assets/create/models/block/millstone/inner.json index bb8230e10..1a21a6e74 100644 --- a/src/main/resources/assets/create/models/block/millstone/inner.json +++ b/src/main/resources/assets/create/models/block/millstone/inner.json @@ -83,7 +83,9 @@ "north": {"uv": [1, 1.5, 5, 5], "texture": "#5"}, "east": {"uv": [1, 1.5, 5, 5], "texture": "#5"}, "south": {"uv": [1, 1.5, 5, 5], "texture": "#5"}, - "west": {"uv": [1, 1.5, 5, 5], "texture": "#5"} + "west": {"uv": [1, 1.5, 5, 5], "texture": "#5"}, + "up": {"uv": [1, 1, 5, 5], "texture": "#5"}, + "down": {"uv": [1, 1, 5, 5], "texture": "#5"} } }, { diff --git a/src/main/resources/data/create/recipes/crafting_shaped/contraptions/crushing_wheel.json b/src/main/resources/data/create/recipes/crafting_shaped/contraptions/crushing_wheel.json deleted file mode 100644 index abc2e30cc..000000000 --- a/src/main/resources/data/create/recipes/crafting_shaped/contraptions/crushing_wheel.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "type": "crafting_shaped", - "pattern": [ - "ABA", - "BSB", - "ABA" - ], - "key": { - "B": { - "item": "minecraft:polished_andesite" - }, - "A": { - "item": "create:andesite_alloy" - }, - "S": { - "item": "create:large_cogwheel" - } - }, - "result": { - "item": "create:crushing_wheel", - "count": 1 - }, - "conditions": [ - { - "type": "create:module", - "module": "contraptions" - } - ] -} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/milling/diamond_horse_armor.json b/src/main/resources/data/create/recipes/crushing/diamond_horse_armor.json similarity index 92% rename from src/main/resources/data/create/recipes/milling/diamond_horse_armor.json rename to src/main/resources/data/create/recipes/crushing/diamond_horse_armor.json index 56c501b18..0b1d66440 100644 --- a/src/main/resources/data/create/recipes/milling/diamond_horse_armor.json +++ b/src/main/resources/data/create/recipes/crushing/diamond_horse_armor.json @@ -1,5 +1,5 @@ { - "type": "create:milling", + "type": "create:crushing", "ingredients": [ { "item": "minecraft:diamond_horse_armor" diff --git a/src/main/resources/data/create/recipes/milling/golden_horse_armor.json b/src/main/resources/data/create/recipes/crushing/golden_horse_armor.json similarity index 94% rename from src/main/resources/data/create/recipes/milling/golden_horse_armor.json rename to src/main/resources/data/create/recipes/crushing/golden_horse_armor.json index 4574bcabf..6ea7d4bcf 100644 --- a/src/main/resources/data/create/recipes/milling/golden_horse_armor.json +++ b/src/main/resources/data/create/recipes/crushing/golden_horse_armor.json @@ -1,5 +1,5 @@ { - "type": "create:milling", + "type": "create:crushing", "ingredients": [ { "item": "minecraft:golden_horse_armor" diff --git a/src/main/resources/data/create/recipes/crushing/gravel.json b/src/main/resources/data/create/recipes/crushing/gravel.json new file mode 100644 index 000000000..7a24b7d2b --- /dev/null +++ b/src/main/resources/data/create/recipes/crushing/gravel.json @@ -0,0 +1,25 @@ +{ + "type": "create:crushing", + "ingredients": [ + { + "item": "minecraft:gravel" + } + ], + "results": [ + { + "item": "minecraft:sand", + "count": 1 + }, + { + "item": "minecraft:clay_ball", + "count": 1, + "chance": 0.1 + }, + { + "item": "minecraft:flint", + "count": 1, + "chance": 0.2 + } + ], + "processingTime": 250 +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/milling/iron_horse_armor.json b/src/main/resources/data/create/recipes/crushing/iron_horse_armor.json similarity index 94% rename from src/main/resources/data/create/recipes/milling/iron_horse_armor.json rename to src/main/resources/data/create/recipes/crushing/iron_horse_armor.json index aeafb2d50..88ba0c780 100644 --- a/src/main/resources/data/create/recipes/milling/iron_horse_armor.json +++ b/src/main/resources/data/create/recipes/crushing/iron_horse_armor.json @@ -1,5 +1,5 @@ { - "type": "create:milling", + "type": "create:crushing", "ingredients": [ { "item": "minecraft:iron_horse_armor" diff --git a/src/main/resources/data/create/recipes/milling/leather_horse_armor.json b/src/main/resources/data/create/recipes/crushing/leather_horse_armor.json similarity index 89% rename from src/main/resources/data/create/recipes/milling/leather_horse_armor.json rename to src/main/resources/data/create/recipes/crushing/leather_horse_armor.json index 21c4494ab..eda689e4d 100644 --- a/src/main/resources/data/create/recipes/milling/leather_horse_armor.json +++ b/src/main/resources/data/create/recipes/crushing/leather_horse_armor.json @@ -1,5 +1,5 @@ { - "type": "create:milling", + "type": "create:crushing", "ingredients": [ { "item": "minecraft:leather_horse_armor" diff --git a/src/main/resources/data/create/recipes/crushing/sand.json b/src/main/resources/data/create/recipes/crushing/sand.json new file mode 100644 index 000000000..8d02bd559 --- /dev/null +++ b/src/main/resources/data/create/recipes/crushing/sand.json @@ -0,0 +1,25 @@ +{ + "type": "create:crushing", + "ingredients": [ + { + "item": "minecraft:sand" + } + ], + "results": [ + { + "item": "create:limesand", + "count": 1 + }, + { + "item": "create:limesand", + "count": 1, + "chance": 0.5 + }, + { + "item": "minecraft:bone_meal", + "count": 1, + "chance": 0.05 + } + ], + "processingTime": 150 +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/mechanical_crafting/crushing_wheel.json b/src/main/resources/data/create/recipes/mechanical_crafting/crushing_wheel.json new file mode 100644 index 000000000..aaaea0924 --- /dev/null +++ b/src/main/resources/data/create/recipes/mechanical_crafting/crushing_wheel.json @@ -0,0 +1,34 @@ +{ + "type": "create:mechanical_crafting", + "pattern": [ + " PPP ", + "PSBSP", + "PBCBP", + "PSBSP", + " PPP " + ], + "key": { + "P": { + "item": "create:andesite_alloy" + }, + "S": { + "tag": "forge:rods/wooden" + }, + "C": { + "item": "create:andesite_casing" + }, + "B": { + "tag": "forge:stone" + } + }, + "result": { + "item": "create:crushing_wheel", + "count": 2 + }, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/milling/clay.json b/src/main/resources/data/create/recipes/milling/clay.json index 0ff90e484..cd1aa80a5 100644 --- a/src/main/resources/data/create/recipes/milling/clay.json +++ b/src/main/resources/data/create/recipes/milling/clay.json @@ -14,11 +14,6 @@ "item": "minecraft:clay_ball", "count": 1, "chance": 0.5 - }, - { - "item": "minecraft:flint", - "count": 1, - "chance": 0.2 } ], "processingTime": 50 diff --git a/src/main/resources/data/create/recipes/milling/copper_ore.json b/src/main/resources/data/create/recipes/milling/copper_ore.json new file mode 100644 index 000000000..9b38e4c2a --- /dev/null +++ b/src/main/resources/data/create/recipes/milling/copper_ore.json @@ -0,0 +1,15 @@ +{ + "type": "create:milling", + "ingredients": [ + { + "tag": "forge:ores/copper" + } + ], + "results": [ + { + "item": "create:crushed_copper", + "count": 1 + } + ], + "processingTime": 350 +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/milling/gold_ore.json b/src/main/resources/data/create/recipes/milling/gold_ore.json new file mode 100644 index 000000000..1c54dea85 --- /dev/null +++ b/src/main/resources/data/create/recipes/milling/gold_ore.json @@ -0,0 +1,15 @@ +{ + "type": "create:milling", + "ingredients": [ + { + "tag": "forge:ores/gold" + } + ], + "results": [ + { + "item": "create:crushed_gold", + "count": 1 + } + ], + "processingTime": 350 +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/milling/gravel.json b/src/main/resources/data/create/recipes/milling/gravel.json index eacdb9296..458acbf33 100644 --- a/src/main/resources/data/create/recipes/milling/gravel.json +++ b/src/main/resources/data/create/recipes/milling/gravel.json @@ -6,19 +6,9 @@ } ], "results": [ - { - "item": "minecraft:sand", - "count": 1 - }, - { - "item": "minecraft:clay_ball", - "count": 1, - "chance": 0.1 - }, { "item": "minecraft:flint", - "count": 1, - "chance": 0.2 + "count": 1 } ], "processingTime": 250 diff --git a/src/main/resources/data/create/recipes/milling/iron_ore.json b/src/main/resources/data/create/recipes/milling/iron_ore.json new file mode 100644 index 000000000..e20c3713f --- /dev/null +++ b/src/main/resources/data/create/recipes/milling/iron_ore.json @@ -0,0 +1,15 @@ +{ + "type": "create:milling", + "ingredients": [ + { + "tag": "forge:ores/iron" + } + ], + "results": [ + { + "item": "create:crushed_iron", + "count": 1 + } + ], + "processingTime": 400 +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/milling/sand.json b/src/main/resources/data/create/recipes/milling/sand.json index 68321f4a8..acf76e900 100644 --- a/src/main/resources/data/create/recipes/milling/sand.json +++ b/src/main/resources/data/create/recipes/milling/sand.json @@ -9,16 +9,6 @@ { "item": "create:limesand", "count": 1 - }, - { - "item": "create:limesand", - "count": 1, - "chance": 0.5 - }, - { - "item": "minecraft:bone_meal", - "count": 1, - "chance": 0.05 } ], "processingTime": 150 diff --git a/src/main/resources/data/create/recipes/milling/zinc_ore.json b/src/main/resources/data/create/recipes/milling/zinc_ore.json new file mode 100644 index 000000000..23c066517 --- /dev/null +++ b/src/main/resources/data/create/recipes/milling/zinc_ore.json @@ -0,0 +1,15 @@ +{ + "type": "create:milling", + "ingredients": [ + { + "tag": "forge:ores/zinc" + } + ], + "results": [ + { + "item": "create:crushed_zinc", + "count": 1 + } + ], + "processingTime": 350 +} \ No newline at end of file From b885a60003172cd327112435403561f46b5378d9 Mon Sep 17 00:00:00 2001 From: Zelophed Date: Sat, 28 Mar 2020 02:27:43 +0100 Subject: [PATCH 06/11] added datagen for BlockTags to AllBlocks -use the runData run configuration to generate json data --- build.gradle | 4 +- .../java/com/simibubi/create/AllBlocks.java | 195 ++++++++++-------- .../com/simibubi/create/AllSoundEvents.java | 23 ++- .../com/simibubi/create/AllTileEntities.java | 2 +- .../com/simibubi/create/CreateClient.java | 2 +- .../com/simibubi/create/CreateItemGroup.java | 4 +- .../utility/data/AllBlocksTagProvider.java | 52 +++++ .../foundation/utility/data/Generator.java | 38 +--- .../utility/data/ICanGenerateJson.java | 11 - .../foundation/utility/data/ITaggable.java | 50 +++++ .../mounted/MountedContraption.java | 2 +- .../MechanicalPistonTileEntityRenderer.java | 2 +- .../crusher/CrushingWheelBlock.java | 2 +- .../deployer/DeployerTileEntityRenderer.java | 2 +- .../components/saw/SawTileEntityRenderer.java | 2 +- .../contraptions/relays/belt/BeltBlock.java | 4 +- .../relays/belt/BeltConnectorItem.java | 2 +- .../relays/gauge/GaugeTileEntityRenderer.java | 2 +- .../symmetry/mirror/CrossPlaneMirror.java | 2 +- .../symmetry/mirror/PlaneMirror.java | 2 +- .../symmetry/mirror/TriplePlaneMirror.java | 2 +- .../block/SchematicannonScreen.java | 2 +- 22 files changed, 261 insertions(+), 146 deletions(-) create mode 100644 src/main/java/com/simibubi/create/foundation/utility/data/AllBlocksTagProvider.java delete mode 100644 src/main/java/com/simibubi/create/foundation/utility/data/ICanGenerateJson.java create mode 100644 src/main/java/com/simibubi/create/foundation/utility/data/ITaggable.java diff --git a/build.gradle b/build.gradle index 171d7fc89..873f2bb7a 100644 --- a/build.gradle +++ b/build.gradle @@ -26,6 +26,7 @@ minecraft { client { workingDirectory project.file('run') property 'forge.logging.console.level', 'info' + property 'fml.earlyprogresswindow', 'false' mods { create { source sourceSets.main @@ -45,8 +46,9 @@ minecraft { data { workingDirectory project.file('run') - property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' + property 'forge.logging.markers', 'REGISTRIES,REGISTRYDUMP' property 'forge.logging.console.level', 'debug' + property 'fml.earlyprogresswindow', 'false' args '--mod', 'create', '--all', '--output', file('src/generated/resources/') mods { create { diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index 0ccf8401c..e3a6c32d8 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -5,6 +5,7 @@ import com.simibubi.create.foundation.block.IHaveCustomBlockItem; import com.simibubi.create.foundation.block.IHaveNoBlockItem; import com.simibubi.create.foundation.block.ProperStairsBlock; import com.simibubi.create.foundation.utility.Lang; +import com.simibubi.create.foundation.utility.data.ITaggable; import com.simibubi.create.foundation.world.OxidizingBlock; import com.simibubi.create.modules.IModule; import com.simibubi.create.modules.contraptions.CasingBlock; @@ -99,12 +100,16 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.color.BlockColors; import net.minecraft.item.BlockItem; import net.minecraft.item.Item; +import net.minecraft.util.ResourceLocation; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.ToolType; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.registries.IForgeRegistry; +import java.util.HashSet; +import java.util.Set; + public enum AllBlocks { __SCHEMATICS__(), @@ -150,7 +155,7 @@ public enum AllBlocks { ROPE_PULLEY(new PulleyBlock()), ROPE(new PulleyBlock.RopeBlock()), PULLEY_MAGNET(new PulleyBlock.MagnetBlock()), - CART_ASSEMBLER(new CartAssemblerBlock()), + CART_ASSEMBLER(new TaggedBlock<>(new CartAssemblerBlock()).withVanillaTags(ITaggable.TagType.BLOCK, "rails")), MINECART_ANCHOR(new MinecartAnchorBlock()), TRANSLATION_CHASSIS(new LinearChassisBlock()), TRANSLATION_CHASSIS_SECONDARY(new LinearChassisBlock()), @@ -200,10 +205,10 @@ public enum AllBlocks { SYMMETRY_CROSSPLANE(new CrossPlaneSymmetryBlock()), SYMMETRY_TRIPLEPLANE(new TriplePlaneSymmetryBlock()), WINDOW_IN_A_BLOCK(new WindowInABlockBlock()), - COCOA_LOG(new CocoaLogBlock()), + COCOA_LOG(new TaggedBlock<>(new CocoaLogBlock()).withVanillaTags(ITaggable.TagType.BLOCK, "jungle_logs")), __PALETTES__(), - TILED_GLASS(new GlassBlock(Properties.from(Blocks.GLASS))), + TILED_GLASS(new TaggedBlock<>(new GlassBlock(Properties.from(Blocks.GLASS))).withVanillaTags(ITaggable.TagType.BLOCK, "impermeable").withForgeTags("glass")), FRAMED_GLASS(new CTGlassBlock(AllCTs.FRAMED_GLASS, false)), HORIZONTAL_FRAMED_GLASS(new HorizontalCTGlassBlock(AllCTs.HORIZONTAL_FRAMED_GLASS, AllCTs.FRAMED_GLASS, false)), VERTICAL_FRAMED_GLASS(new VerticalCTGlassBlock(AllCTs.VERTICAL_FRAMED_GLASS, false)), @@ -216,17 +221,17 @@ public enum AllBlocks { ACACIA_GLASS(new CTWindowBlock(AllCTs.ACACIA_GLASS, false)), IRON_GLASS(new CTWindowBlock(AllCTs.IRON_GLASS, false)), - TILED_GLASS_PANE(new GlassPaneBlock(Properties.from(Blocks.GLASS))), - FRAMED_GLASS_PANE(new CTGlassPaneBlock(FRAMED_GLASS.block)), - HORIZONTAL_FRAMED_GLASS_PANE(new CTGlassPaneBlock(HORIZONTAL_FRAMED_GLASS.block)), - VERTICAL_FRAMED_GLASS_PANE(new CTGlassPaneBlock(VERTICAL_FRAMED_GLASS.block)), - OAK_GLASS_PANE(new CTGlassPaneBlock(OAK_GLASS.block)), - SPRUCE_GLASS_PANE(new CTGlassPaneBlock(SPRUCE_GLASS.block)), - BIRCH_GLASS_PANE(new CTGlassPaneBlock(BIRCH_GLASS.block)), - JUNGLE_GLASS_PANE(new CTGlassPaneBlock(JUNGLE_GLASS.block)), - DARK_OAK_GLASS_PANE(new CTGlassPaneBlock(DARK_OAK_GLASS.block)), - ACACIA_GLASS_PANE(new CTGlassPaneBlock(ACACIA_GLASS.block)), - IRON_GLASS_PANE(new CTGlassPaneBlock(IRON_GLASS.block)), + TILED_GLASS_PANE(new TaggedBlock<>(new GlassPaneBlock(Properties.from(Blocks.GLASS))).withForgeTags("glass_panes")), + FRAMED_GLASS_PANE(new CTGlassPaneBlock(FRAMED_GLASS.get())), + HORIZONTAL_FRAMED_GLASS_PANE(new CTGlassPaneBlock(HORIZONTAL_FRAMED_GLASS.get())), + VERTICAL_FRAMED_GLASS_PANE(new CTGlassPaneBlock(VERTICAL_FRAMED_GLASS.get())), + OAK_GLASS_PANE(new CTGlassPaneBlock(OAK_GLASS.get())), + SPRUCE_GLASS_PANE(new CTGlassPaneBlock(SPRUCE_GLASS.get())), + BIRCH_GLASS_PANE(new CTGlassPaneBlock(BIRCH_GLASS.get())), + JUNGLE_GLASS_PANE(new CTGlassPaneBlock(JUNGLE_GLASS.get())), + DARK_OAK_GLASS_PANE(new CTGlassPaneBlock(DARK_OAK_GLASS.get())), + ACACIA_GLASS_PANE(new CTGlassPaneBlock(ACACIA_GLASS.get())), + IRON_GLASS_PANE(new CTGlassPaneBlock(IRON_GLASS.get())), GRANITE_BRICKS(new Block(Properties.from(Blocks.GRANITE))), GRANITE_LAYERS(new LayeredCTBlock(Properties.from(Blocks.GRANITE), AllCTs.GRANITE_LAYERS, AllCTs.POLISHED_GRANITE)), @@ -236,56 +241,56 @@ public enum AllBlocks { ANDESITE_LAYERS( new LayeredCTBlock(Properties.from(Blocks.ANDESITE), AllCTs.ANDESITE_LAYERS, AllCTs.POLISHED_ANDESITE)), - GABBRO(new Block(Properties.from(Blocks.GRANITE)), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), - POLISHED_GABBRO(new Block(Properties.from(GABBRO.block))), - GABBRO_BRICKS(new Block(Properties.from(GABBRO.block)), ComesWith.STAIRS, ComesWith.WALL), - PAVED_GABBRO_BRICKS(new Block(Properties.from(GABBRO.block)), ComesWith.SLAB), - INDENTED_GABBRO(new Block(Properties.from(GABBRO.block)), ComesWith.SLAB), - SLIGHTLY_MOSSY_GABBRO_BRICKS(new Block(Properties.from(GABBRO.block))), - MOSSY_GABBRO_BRICKS(new Block(Properties.from(GABBRO.block))), - GABBRO_LAYERS(new LayeredCTBlock(Properties.from(GABBRO.block), AllCTs.GABBRO_LAYERS, AllCTs.POLISHED_GABBRO)), + GABBRO(new TaggedBlock<>(new Block(Properties.from(Blocks.GRANITE))).withForgeTags("stone"), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), + POLISHED_GABBRO(new TaggedBlock<>(new Block(Properties.from(GABBRO.get()))).withForgeTags("stone")), + GABBRO_BRICKS(new Block(Properties.from(GABBRO.get())), ComesWith.STAIRS, ComesWith.WALL), + PAVED_GABBRO_BRICKS(new Block(Properties.from(GABBRO.get())), ComesWith.SLAB), + INDENTED_GABBRO(new Block(Properties.from(GABBRO.get())), ComesWith.SLAB), + SLIGHTLY_MOSSY_GABBRO_BRICKS(new Block(Properties.from(GABBRO.get()))), + MOSSY_GABBRO_BRICKS(new Block(Properties.from(GABBRO.get()))), + GABBRO_LAYERS(new LayeredCTBlock(Properties.from(GABBRO.get()), AllCTs.GABBRO_LAYERS, AllCTs.POLISHED_GABBRO)), - DOLOMITE(new Block(Properties.from(Blocks.QUARTZ_BLOCK)), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), - DOLOMITE_BRICKS(new Block(Properties.from(DOLOMITE.block))), - POLISHED_DOLOMITE(new Block(Properties.from(DOLOMITE.block))), - DOLOMITE_PILLAR(new RotatedPillarBlock(Properties.from(DOLOMITE.block))), + DOLOMITE(new TaggedBlock<>(new Block(Properties.from(Blocks.QUARTZ_BLOCK))).withForgeTags("stone"), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), + DOLOMITE_BRICKS(new Block(Properties.from(DOLOMITE.get()))), + POLISHED_DOLOMITE(new TaggedBlock<>(new Block(Properties.from(DOLOMITE.get()))).withForgeTags("stone")), + DOLOMITE_PILLAR(new RotatedPillarBlock(Properties.from(DOLOMITE.get()))), DOLOMITE_LAYERS( - new LayeredCTBlock(Properties.from(DOLOMITE.block), AllCTs.DOLOMITE_LAYERS, AllCTs.POLISHED_DOLOMITE)), + new LayeredCTBlock(Properties.from(DOLOMITE.get()), AllCTs.DOLOMITE_LAYERS, AllCTs.POLISHED_DOLOMITE)), LIMESAND(new FallingBlock(Properties.from(Blocks.SAND))), - LIMESTONE(new Block(Properties.from(Blocks.SANDSTONE)), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), - LIMESTONE_BRICKS(new Block(Properties.from(LIMESTONE.block)), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), - POLISHED_LIMESTONE(new Block(Properties.from(LIMESTONE.block)), ComesWith.SLAB), - LIMESTONE_PILLAR(new RotatedPillarBlock(Properties.from(LIMESTONE.block))), + LIMESTONE(new TaggedBlock<>(new Block(Properties.from(Blocks.SANDSTONE))).withForgeTags("stone"), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), + LIMESTONE_BRICKS(new Block(Properties.from(LIMESTONE.get())), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), + POLISHED_LIMESTONE(new TaggedBlock<>(new Block(Properties.from(LIMESTONE.get()))).withForgeTags("stone"), ComesWith.SLAB), + LIMESTONE_PILLAR(new RotatedPillarBlock(Properties.from(LIMESTONE.get()))), LIMESTONE_LAYERS( - new LayeredCTBlock(Properties.from(LIMESTONE.block), AllCTs.LIMESTONE_LAYERS, AllCTs.POLISHED_LIMESTONE)), - WEATHERED_LIMESTONE(new Block(Properties.from(Blocks.ANDESITE)), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), - WEATHERED_LIMESTONE_BRICKS(new Block(Properties.from(WEATHERED_LIMESTONE.block)), ComesWith.STAIRS, ComesWith.SLAB, + new LayeredCTBlock(Properties.from(LIMESTONE.get()), AllCTs.LIMESTONE_LAYERS, AllCTs.POLISHED_LIMESTONE)), + WEATHERED_LIMESTONE(new TaggedBlock<>(new Block(Properties.from(Blocks.ANDESITE))).withForgeTags("stone"), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), + WEATHERED_LIMESTONE_BRICKS(new Block(Properties.from(WEATHERED_LIMESTONE.get())), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), - POLISHED_WEATHERED_LIMESTONE(new Block(Properties.from(WEATHERED_LIMESTONE.block)), ComesWith.SLAB), - WEATHERED_LIMESTONE_PILLAR(new RotatedPillarBlock(Properties.from(WEATHERED_LIMESTONE.block))), - WEATHERED_LIMESTONE_LAYERS(new LayeredCTBlock(Properties.from(WEATHERED_LIMESTONE.block), + POLISHED_WEATHERED_LIMESTONE(new TaggedBlock<>(new Block(Properties.from(WEATHERED_LIMESTONE.get()))).withForgeTags("stone"), ComesWith.SLAB), + WEATHERED_LIMESTONE_PILLAR(new RotatedPillarBlock(Properties.from(WEATHERED_LIMESTONE.get()))), + WEATHERED_LIMESTONE_LAYERS(new LayeredCTBlock(Properties.from(WEATHERED_LIMESTONE.get()), AllCTs.WEATHERED_LIMESTONE_LAYERS, AllCTs.POLISHED_WEATHERED_LIMESTONE)), NATURAL_SCORIA(new ScoriaBlock()), - SCORIA(new Block(Properties.from(Blocks.ANDESITE)), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), - POLISHED_SCORIA(new Block(Properties.from(SCORIA.block)), ComesWith.SLAB), - SCORIA_BRICKS(new Block(Properties.from(SCORIA.block))), - SCORIA_LAYERS(new LayeredCTBlock(Properties.from(SCORIA.block), AllCTs.SCORIA_LAYERS, AllCTs.POLISHED_SCORIA)), - SCORIA_PILLAR(new RotatedPillarBlock(Properties.from(SCORIA.block))), + SCORIA(new TaggedBlock<>(new Block(Properties.from(Blocks.ANDESITE))).withForgeTags("stone"), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), + POLISHED_SCORIA(new TaggedBlock<>(new Block(Properties.from(SCORIA.get()))).withForgeTags("stone"), ComesWith.SLAB), + SCORIA_BRICKS(new Block(Properties.from(SCORIA.get()))), + SCORIA_LAYERS(new LayeredCTBlock(Properties.from(SCORIA.get()), AllCTs.SCORIA_LAYERS, AllCTs.POLISHED_SCORIA)), + SCORIA_PILLAR(new RotatedPillarBlock(Properties.from(SCORIA.get()))), DARK_SCORIA(new Block(Properties.from(Blocks.ANDESITE))), - POLISHED_DARK_SCORIA(new Block(Properties.from(DARK_SCORIA.block))), - DARK_SCORIA_TILES(new Block(Properties.from(DARK_SCORIA.block)), ComesWith.STAIRS, ComesWith.SLAB), - DARK_SCORIA_BRICKS(new Block(Properties.from(DARK_SCORIA.block)), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), + POLISHED_DARK_SCORIA(new Block(Properties.from(DARK_SCORIA.get()))), + DARK_SCORIA_TILES(new Block(Properties.from(DARK_SCORIA.get())), ComesWith.STAIRS, ComesWith.SLAB), + DARK_SCORIA_BRICKS(new Block(Properties.from(DARK_SCORIA.get())), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), __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_ORE(new TaggedBlock<>(new OxidizingBlock(Properties.from(Blocks.IRON_ORE), 1)).withForgeTags("ores/copper")), + ZINC_ORE(new TaggedBlock<>(new Block(Properties.from(Blocks.GOLD_ORE).harvestLevel(2).harvestTool(ToolType.PICKAXE))).withForgeTags("ores/zinc")), + COPPER_BLOCK(new TaggedBlock<>(new OxidizingBlock(Properties.from(Blocks.IRON_BLOCK), 1 / 32f)).withForgeTags("storage_blocks/copper")), 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))), + ZINC_BLOCK(new TaggedBlock<>(new Block(Properties.from(Blocks.IRON_BLOCK))).withForgeTags("storage_blocks/zinc")), + BRASS_BLOCK(new TaggedBlock<>(new Block(Properties.from(Blocks.IRON_BLOCK))).withForgeTags("storage_blocks/brass")), ; @@ -297,27 +302,28 @@ public enum AllBlocks { static IModule currentModule; } - public Block block; - public Block[] alsoRegistered; + private TaggedBlock taggedBlock; + public TaggedBlock[] alsoRegistered; public IModule module; - private AllBlocks() { - CategoryTracker.currentModule = new IModule() { - @Override - public String getModuleName() { - return Lang.asId(name()).replaceAll("__", ""); - } - }; + AllBlocks() { + CategoryTracker.currentModule = () -> Lang.asId(name()).replaceAll("__", ""); + taggedBlock = new TaggedBlock<>(null); } - private AllBlocks(Block block, ComesWith... comesWith) { - this.block = block; - this.block.setRegistryName(Create.ID, Lang.asId(name())); + AllBlocks(Block block, ComesWith... comesWith) { + this(new TaggedBlock<>(block), comesWith); + } + + AllBlocks(TaggedBlock taggedBlockIn, ComesWith... comesWith){ + this.taggedBlock = taggedBlockIn; + this.taggedBlock.getBlock().setRegistryName(Create.ID, Lang.asId(name())); this.module = CategoryTracker.currentModule; - alsoRegistered = new Block[comesWith.length]; + alsoRegistered = new TaggedBlock[comesWith.length]; for (int i = 0; i < comesWith.length; i++) - alsoRegistered[i] = makeRelatedBlock(block, comesWith[i]); + alsoRegistered[i] = makeRelatedBlock(taggedBlock.getBlock(), comesWith[i]); + } public static void register(RegistryEvent.Register event) { @@ -327,9 +333,9 @@ public enum AllBlocks { if (block.get() == null) continue; - registry.register(block.block); - for (Block extra : block.alsoRegistered) - registry.register(extra); + registry.register(block.get()); + for (TaggedBlock extra : block.alsoRegistered) + registry.register(extra.block); } } @@ -342,8 +348,8 @@ public enum AllBlocks { continue; registerAsItem(registry, def); - for (Block extra : block.alsoRegistered) - registerAsItem(registry, extra); + for (TaggedBlock extra : block.alsoRegistered) + registerAsItem(registry, extra.block); } } @@ -360,52 +366,77 @@ public enum AllBlocks { } public Block get() { - return block; + return taggedBlock.getBlock(); + } + + public ITaggable getTaggable() { + return taggedBlock; } public BlockState getDefault() { - return block.getDefaultState(); + return get().getDefaultState(); } public boolean typeOf(BlockState state) { - return state.getBlock() == block; + return state.getBlock() == get(); } - private Block makeRelatedBlock(Block block, ComesWith feature) { + private TaggedBlock makeRelatedBlock(Block block, ComesWith feature) { Properties properties = Properties.from(block); - Block featured = null; + TaggedBlock featured = null; switch (feature) { case FENCE: - featured = new FenceBlock(properties); + featured = new TaggedBlock<>(new FenceBlock(properties)).withVanillaTags(ITaggable.TagType.BLOCK, "fences"); break; case SLAB: - featured = new SlabBlock(properties); + featured = new TaggedBlock<>(new SlabBlock(properties)).withVanillaTags(ITaggable.TagType.BLOCK, "slabs"); break; case STAIRS: - featured = new ProperStairsBlock(block); + featured = new TaggedBlock<>(new ProperStairsBlock(block)).withVanillaTags(ITaggable.TagType.BLOCK, "stairs"); break; case WALL: - featured = new WallBlock(properties); + featured = new TaggedBlock<>(new WallBlock(properties)).withVanillaTags(ITaggable.TagType.BLOCK, "walls"); break; case FENCE_GATE: - featured = new FenceGateBlock(properties); + featured = new TaggedBlock<>(new FenceGateBlock(properties)); break; default: return null; } - return featured.setRegistryName(Create.ID, block.getRegistryName().getPath() + "_" + Lang.asId(feature.name())); + featured.block.setRegistryName(Create.ID, block.getRegistryName().getPath() + "_" + Lang.asId(feature.name())); + return featured; } @OnlyIn(Dist.CLIENT) public static void registerColorHandlers() { BlockColors blockColors = Minecraft.getInstance().getBlockColors(); for (AllBlocks block : values()) { - if (block.block instanceof IHaveColorHandler) { - blockColors.register(((IHaveColorHandler) block.block).getColorHandler(), block.block); + if (block.get() instanceof IHaveColorHandler) { + blockColors.register(((IHaveColorHandler) block.get()).getColorHandler(), block.get()); } } } + public static class TaggedBlock implements ITaggable> { + //A wrapper around Block that allows for tags to be included. needed for datagen + + private Set tagSetBlock = new HashSet<>(); + private Set tagSetBlockItem = new HashSet<>(); + private T block; + + public TaggedBlock(T blockIn){ + block = blockIn; + } + + public T getBlock() { + return block; + } + + @Override + public Set getTagSet(TagType type) { + return type == TagType.BLOCK ? tagSetBlock : tagSetBlockItem; + } + } } diff --git a/src/main/java/com/simibubi/create/AllSoundEvents.java b/src/main/java/com/simibubi/create/AllSoundEvents.java index 3d0defc41..e778e611e 100644 --- a/src/main/java/com/simibubi/create/AllSoundEvents.java +++ b/src/main/java/com/simibubi/create/AllSoundEvents.java @@ -8,7 +8,6 @@ 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; @@ -18,7 +17,7 @@ import net.minecraft.util.SoundEvents; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.registries.IForgeRegistry; -public enum AllSoundEvents implements ICanGenerateJson { +public enum AllSoundEvents implements IDataProvider { CUCKOO_PIG("creeperclock"), CUCKOO_CREEPER("pigclock"), @@ -59,7 +58,7 @@ public enum AllSoundEvents implements ICanGenerateJson { return event; } - private String getName() { + private String getEventName() { return id; } @@ -68,7 +67,7 @@ public enum AllSoundEvents implements ICanGenerateJson { for (AllSoundEvents entry : values()) { - ResourceLocation rec = new ResourceLocation(Create.ID, entry.getName()); + ResourceLocation rec = new ResourceLocation(Create.ID, entry.getEventName()); SoundEvent sound = new SoundEvent(rec).setRegistryName(rec); registry.register(sound); entry.event = sound; @@ -92,11 +91,11 @@ public enum AllSoundEvents implements ICanGenerateJson { arr.add(s); } else { // own sound - arr.add(Create.ID + ":" + soundEvent.getName()); + arr.add(Create.ID + ":" + soundEvent.getEventName()); } entry.add("sounds", arr); - entry.addProperty("subtitle", Create.ID + ".subtitle." + soundEvent.getName()); - json.add(soundEvent.getName(), entry); + entry.addProperty("subtitle", Create.ID + ".subtitle." + soundEvent.getEventName()); + json.add(soundEvent.getEventName(), entry); } IDataProvider.save(GSON, cache, json, path.resolve("sounds.json")); @@ -105,4 +104,14 @@ public enum AllSoundEvents implements ICanGenerateJson { } } + + @Override + public void act(DirectoryCache cache) throws IOException { + + } + + @Override + public String getName() { + return null; + } } diff --git a/src/main/java/com/simibubi/create/AllTileEntities.java b/src/main/java/com/simibubi/create/AllTileEntities.java index 6ed91379b..5825be755 100644 --- a/src/main/java/com/simibubi/create/AllTileEntities.java +++ b/src/main/java/com/simibubi/create/AllTileEntities.java @@ -183,7 +183,7 @@ public enum AllTileEntities { for (AllTileEntities tileEntity : values()) { Block[] blocks = new Block[tileEntity.blocks.length]; for (int i = 0; i < blocks.length; i++) - blocks[i] = tileEntity.blocks[i].block; + blocks[i] = tileEntity.blocks[i].get(); ResourceLocation resourceLocation = new ResourceLocation(Create.ID, Lang.asId(tileEntity.name())); tileEntity.type = TileEntityType.Builder.create(tileEntity.supplier, blocks).build(null) diff --git a/src/main/java/com/simibubi/create/CreateClient.java b/src/main/java/com/simibubi/create/CreateClient.java index 06882c481..6809029d2 100644 --- a/src/main/java/com/simibubi/create/CreateClient.java +++ b/src/main/java/com/simibubi/create/CreateClient.java @@ -147,7 +147,7 @@ public class CreateClient { @OnlyIn(Dist.CLIENT) protected static ModelResourceLocation getBlockModelLocation(AllBlocks block, String suffix) { - return new ModelResourceLocation(block.block.getRegistryName(), suffix); + return new ModelResourceLocation(block.get().getRegistryName(), suffix); } @OnlyIn(Dist.CLIENT) diff --git a/src/main/java/com/simibubi/create/CreateItemGroup.java b/src/main/java/com/simibubi/create/CreateItemGroup.java index 726ce1675..e882e1647 100644 --- a/src/main/java/com/simibubi/create/CreateItemGroup.java +++ b/src/main/java/com/simibubi/create/CreateItemGroup.java @@ -46,8 +46,8 @@ public final class CreateItemGroup extends ItemGroup { continue; def.asItem().fillItemGroup(this, items); - for (Block alsoRegistered : block.alsoRegistered) - alsoRegistered.asItem().fillItemGroup(this, items); + for (AllBlocks.TaggedBlock alsoRegistered : block.alsoRegistered) + alsoRegistered.getBlock().asItem().fillItemGroup(this, items); } } diff --git a/src/main/java/com/simibubi/create/foundation/utility/data/AllBlocksTagProvider.java b/src/main/java/com/simibubi/create/foundation/utility/data/AllBlocksTagProvider.java new file mode 100644 index 000000000..6d2a3550e --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/utility/data/AllBlocksTagProvider.java @@ -0,0 +1,52 @@ +package com.simibubi.create.foundation.utility.data; + +import com.simibubi.create.AllBlocks; +import net.minecraft.block.Block; +import net.minecraft.data.BlockTagsProvider; +import net.minecraft.data.DataGenerator; +import net.minecraft.tags.BlockTags; +import net.minecraft.tags.Tag; +import net.minecraft.util.ResourceLocation; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +public class AllBlocksTagProvider extends BlockTagsProvider { + + static Map createdTags; + + protected AllBlocksTagProvider(DataGenerator generatorIn) { + super(generatorIn); + } + + @Override + protected void registerTags() { + createdTags = new HashMap<>(); + + for (AllBlocks entry : + AllBlocks.values()) { + entry.getTaggable().getTagSet(ITaggable.TagType.BLOCK).forEach(resLoc -> { + if (resLoc.getNamespace().equals("forge") && resLoc.getPath().contains("/")) + builder(new ResourceLocation(resLoc.getNamespace(), resLoc.getPath().split("/")[0])).add(new Tag<>(resLoc)); + builder(resLoc).add(entry.get()); + }); + if (entry.alsoRegistered == null) + continue; + + Arrays.stream(entry.alsoRegistered).forEach( + taggedBlock -> taggedBlock.getTagSet(ITaggable.TagType.BLOCK).forEach( + resLoc -> builder(resLoc).add(taggedBlock.getBlock()))); + } + } + + private Tag.Builder builder(ResourceLocation resLoc) { + return this.getBuilder(createdTags.computeIfAbsent(resLoc, BlockTags.Wrapper::new)); + + } + + @Override + public String getName() { + return "Create Block Tags"; + } +} 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 7411a85c7..b09467276 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,36 +1,18 @@ package com.simibubi.create.foundation.utility.data; -import java.io.IOException; -import java.nio.file.Path; -import java.nio.file.Paths; - -import com.simibubi.create.AllSoundEvents; - -import net.minecraft.data.DirectoryCache; +import net.minecraft.data.DataGenerator; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.event.lifecycle.GatherDataEvent; +@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD) public class Generator { - /* - * this can probably be called by some gradle task or so but im not know how, so for now i just added a main below and execute from there when we need to generate jsons - **/ - public static void generateJsonFiles(){ - Path base = Paths.get("src/main/resources"); - DirectoryCache cache; - try { - - cache = new DirectoryCache(base, "cache"); - - for (ICanGenerateJson gen: - new ICanGenerateJson[]{AllSoundEvents.CUCKOO_CREEPER}) { - gen.generate(base, cache); - } - - } catch (IOException e) { - e.printStackTrace(); - } + @SubscribeEvent + public static void gatherData(GatherDataEvent event){ + DataGenerator gen = event.getGenerator(); + //gen.addProvider(AllSoundEvents.CUCKOO_PIG); + gen.addProvider(new AllBlocksTagProvider(gen)); } - public static void main(String[] args) { - generateJsonFiles(); - } } 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 deleted file mode 100644 index 1caf2acb5..000000000 --- a/src/main/java/com/simibubi/create/foundation/utility/data/ICanGenerateJson.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.simibubi.create.foundation.utility.data; - -import java.nio.file.Path; - -import net.minecraft.data.DirectoryCache; - -public interface ICanGenerateJson { - - //path points to the resource1s base folder - void generate(Path path, DirectoryCache cache); -} diff --git a/src/main/java/com/simibubi/create/foundation/utility/data/ITaggable.java b/src/main/java/com/simibubi/create/foundation/utility/data/ITaggable.java new file mode 100644 index 000000000..a99072332 --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/utility/data/ITaggable.java @@ -0,0 +1,50 @@ +package com.simibubi.create.foundation.utility.data; + +import net.minecraft.util.ResourceLocation; + +import java.util.*; + +public interface ITaggable { + + enum TagType { + BLOCK, ITEM; + } + + default T withTags(ResourceLocation... tagsIn) { + Collections.addAll(getTagSet(TagType.BLOCK), tagsIn); + Collections.addAll(getTagSet(TagType.ITEM), tagsIn); + return (T) this; + } + + default T withTags(TagType type, ResourceLocation... tagsIn) { + Collections.addAll(getTagSet(type), tagsIn); + return (T) this; + } + + default T withTagsInNamespace(String namespace, String... tagsIn) { + return withTags(Arrays.stream(tagsIn).map(s -> new ResourceLocation(namespace, s)).toArray(ResourceLocation[]::new)); + } + + default T withTagsInNamespace(TagType type, String namespace, String... tagsIn) { + return withTags(type, Arrays.stream(tagsIn).map(s -> new ResourceLocation(namespace, s)).toArray(ResourceLocation[]::new)); + } + + default T withCreateTags(String... tagsIn) { + return withTagsInNamespace("create", tagsIn); + } + + default T withForgeTags(String... tagsIn) { + return withTagsInNamespace("forge", tagsIn); + } + + default T withVanillaTags(String... tagsIn) { + return withTagsInNamespace("minecraft", tagsIn); + } + + default T withVanillaTags(TagType type, String... tagsIn) { + return withTagsInNamespace(type, "minecraft", tagsIn); + } + + //take a look at AllBlocks.TaggedBlock for more info + Set getTagSet(TagType type); +} diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/mounted/MountedContraption.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/mounted/MountedContraption.java index 364d01a19..1dd193592 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/mounted/MountedContraption.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/mounted/MountedContraption.java @@ -44,7 +44,7 @@ public class MountedContraption extends Contraption { Axis axis = state.get(RAIL_SHAPE) == RailShape.EAST_WEST ? Axis.X : Axis.Z; contraption.add(pos, Pair.of(new BlockInfo(pos, - AllBlocks.MINECART_ANCHOR.block.getDefaultState().with(BlockStateProperties.HORIZONTAL_AXIS, axis), + AllBlocks.MINECART_ANCHOR.get().getDefaultState().with(BlockStateProperties.HORIZONTAL_AXIS, axis), null), null)); contraption.removeBlocksFromWorld(world, BlockPos.ZERO); contraption.initActors(world); diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/piston/MechanicalPistonTileEntityRenderer.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/piston/MechanicalPistonTileEntityRenderer.java index 4e3bde060..092e9eda4 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/piston/MechanicalPistonTileEntityRenderer.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/piston/MechanicalPistonTileEntityRenderer.java @@ -19,7 +19,7 @@ public class MechanicalPistonTileEntityRenderer extends KineticTileEntityRendere @Override protected BlockState getRenderedBlockState(KineticTileEntity te) { - return AllBlocks.SHAFT.block.getDefaultState().with(BlockStateProperties.AXIS, + return AllBlocks.SHAFT.get().getDefaultState().with(BlockStateProperties.AXIS, ((IRotate) te.getBlockState().getBlock()).getRotationAxis(te.getBlockState())); } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingWheelBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingWheelBlock.java index 33218cfc3..f4e64a5eb 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingWheelBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingWheelBlock.java @@ -101,7 +101,7 @@ public class CrushingWheelBlock extends RotatedPillarKineticBlock { world.setBlockState(controllerPos, world.getBlockState(controllerPos).with(VALID, controllerShouldBeValid)); } - ((CrushingWheelControllerBlock) AllBlocks.CRUSHING_WHEEL_CONTROLLER.block) + ((CrushingWheelControllerBlock) AllBlocks.CRUSHING_WHEEL_CONTROLLER.get()) .updateSpeed(world.getBlockState(controllerPos), world, controllerPos); } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/deployer/DeployerTileEntityRenderer.java b/src/main/java/com/simibubi/create/modules/contraptions/components/deployer/DeployerTileEntityRenderer.java index 3a1630c42..af0917779 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/deployer/DeployerTileEntityRenderer.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/deployer/DeployerTileEntityRenderer.java @@ -135,7 +135,7 @@ public class DeployerTileEntityRenderer extends SafeTileEntityRenderer protected BlockState getRenderedBlockState(KineticTileEntity te) { BlockState state = te.getBlockState(); - return AllBlocks.SHAFT.block.getDefaultState().with(AXIS, ((IRotate) state.getBlock()).getRotationAxis(state)); + return AllBlocks.SHAFT.get().getDefaultState().with(AXIS, ((IRotate) state.getBlock()).getRotationAxis(state)); } } 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 2073e752e..70c33b0f6 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 @@ -281,7 +281,7 @@ public class BeltBlock extends HorizontalKineticBlock return ActionResultType.SUCCESS; world.setBlockState(context.getPos(), state.with(CASING, false), 3); if (!player.isCreative()) - player.inventory.placeItemBackInInventory(world, new ItemStack(AllBlocks.BRASS_CASING.block)); + player.inventory.placeItemBackInInventory(world, new ItemStack(AllBlocks.BRASS_CASING.get())); return ActionResultType.SUCCESS; } @@ -292,7 +292,7 @@ public class BeltBlock extends HorizontalKineticBlock belt.detachKinetics(); belt.attachKinetics(); if (!player.isCreative()) - player.inventory.placeItemBackInInventory(world, new ItemStack(AllBlocks.SHAFT.block)); + player.inventory.placeItemBackInInventory(world, new ItemStack(AllBlocks.SHAFT.get())); return ActionResultType.SUCCESS; } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltConnectorItem.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltConnectorItem.java index 500d3e069..0ae6ba1ec 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltConnectorItem.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltConnectorItem.java @@ -27,7 +27,7 @@ import net.minecraft.world.World; public class BeltConnectorItem extends BlockItem implements IAddedByOther { public BeltConnectorItem(Properties properties) { - super(AllBlocks.BELT.block, properties); + super(AllBlocks.BELT.get(), properties); } @Override diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/gauge/GaugeTileEntityRenderer.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/gauge/GaugeTileEntityRenderer.java index ca504251d..2936928cc 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/relays/gauge/GaugeTileEntityRenderer.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/gauge/GaugeTileEntityRenderer.java @@ -53,7 +53,7 @@ public class GaugeTileEntityRenderer extends KineticTileEntityRenderer { @Override protected BlockState getRenderedBlockState(KineticTileEntity te) { - return AllBlocks.SHAFT.block.getDefaultState().with(BlockStateProperties.AXIS, + return AllBlocks.SHAFT.get().getDefaultState().with(BlockStateProperties.AXIS, ((IRotate) te.getBlockState().getBlock()).getRotationAxis(te.getBlockState())); } diff --git a/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/CrossPlaneMirror.java b/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/CrossPlaneMirror.java index 2b39d9533..e5218d133 100644 --- a/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/CrossPlaneMirror.java +++ b/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/CrossPlaneMirror.java @@ -85,7 +85,7 @@ public class CrossPlaneMirror extends SymmetryMirror { @Override public BlockState getModel() { - return AllBlocks.SYMMETRY_CROSSPLANE.block.getDefaultState().with(CrossPlaneSymmetryBlock.align, + return AllBlocks.SYMMETRY_CROSSPLANE.get().getDefaultState().with(CrossPlaneSymmetryBlock.align, (Align) orientation); } diff --git a/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/PlaneMirror.java b/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/PlaneMirror.java index 485dd9719..dcd670f95 100644 --- a/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/PlaneMirror.java +++ b/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/PlaneMirror.java @@ -81,7 +81,7 @@ public class PlaneMirror extends SymmetryMirror { @Override public BlockState getModel() { - return AllBlocks.SYMMETRY_PLANE.block.getDefaultState().with(PlaneSymmetryBlock.align, (Align) orientation); + return AllBlocks.SYMMETRY_PLANE.get().getDefaultState().with(PlaneSymmetryBlock.align, (Align) orientation); } @Override diff --git a/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/TriplePlaneMirror.java b/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/TriplePlaneMirror.java index 13cdf7cc9..c65b8e379 100644 --- a/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/TriplePlaneMirror.java +++ b/src/main/java/com/simibubi/create/modules/curiosities/symmetry/mirror/TriplePlaneMirror.java @@ -43,7 +43,7 @@ public class TriplePlaneMirror extends SymmetryMirror { @Override public BlockState getModel() { - return AllBlocks.SYMMETRY_TRIPLEPLANE.block.getDefaultState(); + return AllBlocks.SYMMETRY_TRIPLEPLANE.get().getDefaultState(); } @Override diff --git a/src/main/java/com/simibubi/create/modules/schematics/block/SchematicannonScreen.java b/src/main/java/com/simibubi/create/modules/schematics/block/SchematicannonScreen.java index 00f38641d..9bfff0b58 100644 --- a/src/main/java/com/simibubi/create/modules/schematics/block/SchematicannonScreen.java +++ b/src/main/java/com/simibubi/create/modules/schematics/block/SchematicannonScreen.java @@ -244,7 +244,7 @@ public class SchematicannonScreen extends AbstractSimiContainerScreen Date: Sat, 28 Mar 2020 17:48:55 +0100 Subject: [PATCH 07/11] Portable Funnels & Extractors - Fixed custom sword not having a sweeping effect - Fixed invalid kinetic tileentity state when dimension is being unloaded - Mechanical harvesters now interact with kelp blocks - Extractors and Funnels are now portable and have special movement traits #117 - Fixed false positives on having reached the block movement limit for contraptions - Fixed self-modification within a belt's update cycle, addresses #116 - Fixed belt processing not re-activating segement attachments, addresses #132 - Fixed reversing components (gearbox, gearshift) breaking when a new source overpowers the network - Reduced attack damage of the Deforester - Fixed redstone links not being powered by wires consistently #106 - New entries for attribute filters: Washable, Smeltable, Smokable and Smeltable in Blast furnace - Fixed redstone links behaving inconsistently when unloaded and reloaded - Bumped oldest supported forge version --- .../java/com/simibubi/create/AllItems.java | 9 +-- .../filtering/FilteringBehaviour.java | 2 +- .../modules/contraptions/KineticNetwork.java | 6 +- .../contraptions/RotationPropagator.java | 7 +- .../contraptions/base/KineticTileEntity.java | 5 +- .../actors/HarvesterMovementBehaviour.java | 11 +++- .../contraptions/BlockMovementTraits.java | 22 ++++++- .../components/contraptions/Contraption.java | 6 +- .../bearing/MechanicalBearingTileEntity.java | 2 +- .../deployer/DeployerMovementBehaviour.java | 6 +- .../relays/belt/BeltInventory.java | 37 ++++++++--- .../relays/belt/BeltTileEntity.java | 2 +- .../relays/belt/ItemHandlerBeltSegment.java | 2 +- .../relays/gauge/StressGaugeTileEntity.java | 19 ++++-- .../deforester/DeforesterItem.java | 2 +- .../curiosities/tools/BlazingToolItem.java | 15 +++-- .../curiosities/tools/SandPaperItem.java | 7 +- .../modules/curiosities/tools/ToolEvents.java | 22 +++++-- .../modules/logistics/InWorldProcessing.java | 21 +++--- .../logistics/RedstoneLinkNetworkHandler.java | 4 ++ .../logistics/block/RedstoneLinkBlock.java | 9 ++- .../logistics/block/belts/FunnelBlock.java | 10 ++- .../block/belts/FunnelMovementBehaviour.java | 48 ++++++++++++++ .../block/extractor/ExtractorBlock.java | 10 ++- .../extractor/ExtractorMovementBehaviour.java | 66 +++++++++++++++++++ .../block/transposer/TransposerBlock.java | 2 +- .../item/filter/AttributeFilterScreen.java | 2 +- .../logistics/item/filter/FilterItem.java | 10 +-- .../logistics/item/filter/ItemAttribute.java | 53 +++++++++++++-- src/main/resources/META-INF/mods.toml | 2 +- .../resources/assets/create/lang/en_us.json | 4 ++ 31 files changed, 345 insertions(+), 78 deletions(-) create mode 100644 src/main/java/com/simibubi/create/modules/logistics/block/belts/FunnelMovementBehaviour.java create mode 100644 src/main/java/com/simibubi/create/modules/logistics/block/extractor/ExtractorMovementBehaviour.java diff --git a/src/main/java/com/simibubi/create/AllItems.java b/src/main/java/com/simibubi/create/AllItems.java index 289cd0cdb..2e6300b06 100644 --- a/src/main/java/com/simibubi/create/AllItems.java +++ b/src/main/java/com/simibubi/create/AllItems.java @@ -4,7 +4,6 @@ import static com.simibubi.create.foundation.item.AllToolTypes.AXE; import static com.simibubi.create.foundation.item.AllToolTypes.HOE; import static com.simibubi.create.foundation.item.AllToolTypes.PICKAXE; import static com.simibubi.create.foundation.item.AllToolTypes.SHOVEL; -import static com.simibubi.create.foundation.item.AllToolTypes.SWORD; import java.util.function.Function; @@ -21,6 +20,7 @@ import com.simibubi.create.modules.curiosities.RefinedRadianceItem; import com.simibubi.create.modules.curiosities.ShadowSteelItem; import com.simibubi.create.modules.curiosities.deforester.DeforesterItem; import com.simibubi.create.modules.curiosities.symmetry.SymmetryWandItem; +import com.simibubi.create.modules.curiosities.tools.AllToolTiers; import com.simibubi.create.modules.curiosities.tools.BlazingToolItem; import com.simibubi.create.modules.curiosities.tools.RoseQuartzToolItem; import com.simibubi.create.modules.curiosities.tools.SandPaperItem; @@ -39,6 +39,7 @@ import net.minecraft.item.Item; import net.minecraft.item.Item.Properties; import net.minecraft.item.ItemStack; import net.minecraft.item.Rarity; +import net.minecraft.item.SwordItem; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.event.RegistryEvent; @@ -113,16 +114,16 @@ public enum AllItems { BLAZING_PICKAXE(p -> new BlazingToolItem(1, -2.8F, p, PICKAXE)), BLAZING_SHOVEL(p -> new BlazingToolItem(1.5F, -3.0F, p, SHOVEL)), BLAZING_AXE(p -> new BlazingToolItem(5.0F, -3.0F, p, AXE)), - BLAZING_SWORD(p -> new BlazingToolItem(3, -2.4F, p, SWORD)), + BLAZING_SWORD(p -> new SwordItem(AllToolTiers.BLAZING, 3, -2.4F, p)), ROSE_QUARTZ_PICKAXE(p -> new RoseQuartzToolItem(1, -2.8F, p, PICKAXE)), ROSE_QUARTZ_SHOVEL(p -> new RoseQuartzToolItem(1.5F, -3.0F, p, SHOVEL)), ROSE_QUARTZ_AXE(p -> new RoseQuartzToolItem(5.0F, -3.0F, p, AXE)), - ROSE_QUARTZ_SWORD(p -> new RoseQuartzToolItem(3, -2.4F, p, SWORD)), + ROSE_QUARTZ_SWORD(p -> new SwordItem(AllToolTiers.ROSE_QUARTZ, 3, -2.4F, p)), SHADOW_STEEL_PICKAXE(p -> new ShadowSteelToolItem(2.5F, -2.0F, p, PICKAXE)), SHADOW_STEEL_MATTOCK(p -> new ShadowSteelToolItem(2.5F, -1.5F, p, SHOVEL, AXE, HOE)), - SHADOW_STEEL_SWORD(p -> new ShadowSteelToolItem(3, -2.0F, p, SWORD)), + SHADOW_STEEL_SWORD(p -> new SwordItem(AllToolTiers.SHADOW_STEEL, 3, -2.0F, p)), ; diff --git a/src/main/java/com/simibubi/create/foundation/behaviour/filtering/FilteringBehaviour.java b/src/main/java/com/simibubi/create/foundation/behaviour/filtering/FilteringBehaviour.java index fea3afc19..82fa386e5 100644 --- a/src/main/java/com/simibubi/create/foundation/behaviour/filtering/FilteringBehaviour.java +++ b/src/main/java/com/simibubi/create/foundation/behaviour/filtering/FilteringBehaviour.java @@ -145,7 +145,7 @@ public class FilteringBehaviour extends TileEntityBehaviour { } public boolean test(ItemStack stack) { - return filter.isEmpty() || FilterItem.test(stack, filter); + return filter.isEmpty() || FilterItem.test(tileEntity.getWorld(), stack, filter); } @Override diff --git a/src/main/java/com/simibubi/create/modules/contraptions/KineticNetwork.java b/src/main/java/com/simibubi/create/modules/contraptions/KineticNetwork.java index a0ae23f18..ef4d62a29 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/KineticNetwork.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/KineticNetwork.java @@ -61,7 +61,7 @@ public class KineticNetwork { if (te.isSource()) sources.put(te, te.getAddedStressCapacity()); members.put(te, te.getStressApplied()); - te.updateStressFromNetwork(currentCapacity, currentStress); + te.updateFromNetwork(currentCapacity, currentStress, getSize()); te.networkDirty = true; } @@ -81,7 +81,7 @@ public class KineticNetwork { if (te.isSource()) sources.remove(te); members.remove(te); - te.updateStressFromNetwork(0, 0); + te.updateFromNetwork(0, 0, 0); if (members.isEmpty()) { TorquePropagator.networks.get(te.getWorld()).remove(this.id); @@ -93,7 +93,7 @@ public class KineticNetwork { public void sync() { for (KineticTileEntity te : members.keySet()) - te.updateStressFromNetwork(currentCapacity, currentStress); + te.updateFromNetwork(currentCapacity, currentStress, getSize()); } public void updateCapacity() { diff --git a/src/main/java/com/simibubi/create/modules/contraptions/RotationPropagator.java b/src/main/java/com/simibubi/create/modules/contraptions/RotationPropagator.java index 15bfe06ba..373c0493f 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/RotationPropagator.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/RotationPropagator.java @@ -123,7 +123,8 @@ public class RotationPropagator { if (isLargeGearToSpeedController(stateTo, stateFrom, diff)) return SpeedControllerTileEntity.getConveyedSpeed(to, from, false); - return from.getTheoreticalSpeed() * getRotationSpeedModifier(from, to); + float rotationSpeedModifier = getRotationSpeedModifier(from, to); + return from.getTheoreticalSpeed() * rotationSpeedModifier; } private static boolean isLargeToLargeGear(BlockState from, BlockState to, BlockPos diff) { @@ -233,8 +234,8 @@ public class RotationPropagator { // Neighbour faster, overpower the incoming tree if (Math.abs(oppositeSpeed) > Math.abs(speedOfCurrent)) { float prevSpeed = currentTE.getSpeed(); - currentTE.setSpeed(oppositeSpeed); currentTE.setSource(neighbourTE.getPos()); + currentTE.setSpeed(getConveyedSpeed(neighbourTE, currentTE)); currentTE.onSpeedChanged(prevSpeed); currentTE.sendData(); @@ -256,8 +257,8 @@ public class RotationPropagator { currentTE.removeSource(); float prevSpeed = neighbourTE.getSpeed(); - neighbourTE.setSpeed(newSpeed); neighbourTE.setSource(currentTE.getPos()); + neighbourTE.setSpeed(getConveyedSpeed(currentTE, neighbourTE)); neighbourTE.onSpeedChanged(prevSpeed); neighbourTE.sendData(); propagateNewSource(neighbourTE); 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 ff189d48e..3f4f88cef 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 @@ -120,10 +120,11 @@ public abstract class KineticTileEntity extends SmartTileEntity } } - public void updateStressFromNetwork(float maxStress, float currentStress) { + public void updateFromNetwork(float maxStress, float currentStress, int networkSize) { networkDirty = false; this.capacity = maxStress; this.stress = currentStress; + this.networkSize = networkSize; boolean overStressed = maxStress < currentStress && StressImpact.isEnabled(); if (overStressed != this.overStressed) { @@ -182,7 +183,7 @@ public abstract class KineticTileEntity extends SmartTileEntity networkTag.putLong("Id", this.network); networkTag.putFloat("Stress", stress); networkTag.putFloat("Capacity", capacity); - networkTag.putInt("Size", getOrCreateNetwork().getSize()); + networkTag.putInt("Size", networkSize); float stressApplied = getStressApplied(); float addedStressCapacity = getAddedStressCapacity(); diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/actors/HarvesterMovementBehaviour.java b/src/main/java/com/simibubi/create/modules/contraptions/components/actors/HarvesterMovementBehaviour.java index 8daef1d42..2f3bfe2b0 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/actors/HarvesterMovementBehaviour.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/actors/HarvesterMovementBehaviour.java @@ -13,6 +13,7 @@ import com.simibubi.create.modules.contraptions.components.contraptions.Movement import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.block.CropsBlock; +import net.minecraft.block.KelpBlock; import net.minecraft.block.SugarCaneBlock; import net.minecraft.item.ItemStack; import net.minecraft.state.IProperty; @@ -111,6 +112,8 @@ public class HarvesterMovementBehaviour extends MovementBehaviour { return false; } + if (state.getBlock() instanceof KelpBlock) + return true; if (state.getBlock() instanceof IPlantable) return true; } @@ -124,7 +127,9 @@ public class HarvesterMovementBehaviour extends MovementBehaviour { return crop.withAge(0); } if (state.getBlock() == Blocks.SUGAR_CANE) { - return Blocks.AIR.getDefaultState(); + if (state.getFluidState().isEmpty()) + return Blocks.AIR.getDefaultState(); + return state.getFluidState().getBlockState(); } if (state.getCollisionShape(world, pos).isEmpty()) { for (IProperty property : state.getProperties()) { @@ -136,7 +141,9 @@ public class HarvesterMovementBehaviour extends MovementBehaviour { } } - return Blocks.AIR.getDefaultState(); + if (state.getFluidState().isEmpty()) + return Blocks.AIR.getDefaultState(); + return state.getFluidState().getBlockState(); } } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/BlockMovementTraits.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/BlockMovementTraits.java index 75e51b50a..573e4b63d 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/BlockMovementTraits.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/BlockMovementTraits.java @@ -4,6 +4,10 @@ import com.simibubi.create.AllBlocks; import com.simibubi.create.modules.contraptions.components.actors.HarvesterBlock; import com.simibubi.create.modules.contraptions.components.actors.PortableStorageInterfaceBlock; import com.simibubi.create.modules.contraptions.components.contraptions.chassis.AbstractChassisBlock; +import com.simibubi.create.modules.logistics.block.belts.AttachedLogisticalBlock; +import com.simibubi.create.modules.logistics.block.belts.FunnelBlock; +import com.simibubi.create.modules.logistics.block.extractor.ExtractorBlock; +import com.simibubi.create.modules.logistics.block.transposer.TransposerBlock; import net.minecraft.block.AbstractPressurePlateBlock; import net.minecraft.block.AbstractRailBlock; @@ -11,6 +15,7 @@ import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.block.DoorBlock; +import net.minecraft.block.FenceGateBlock; import net.minecraft.block.FlowerPotBlock; import net.minecraft.block.HorizontalFaceBlock; import net.minecraft.block.LadderBlock; @@ -32,6 +37,8 @@ public class BlockMovementTraits { BlockState state = world.getBlockState(pos); if (isBrittle(state)) return true; + if (state.getBlock() instanceof FenceGateBlock) + return true; if (state.getMaterial().isReplaceable()) return false; if (state.getCollisionShape(world, pos).isEmpty()) @@ -41,14 +48,19 @@ public class BlockMovementTraits { public static boolean movementAllowed(World world, BlockPos pos) { BlockState blockState = world.getBlockState(pos); - if (blockState.getBlock() instanceof AbstractChassisBlock) + Block block = blockState.getBlock(); + if (block instanceof AbstractChassisBlock) return true; if (blockState.getBlockHardness(world, pos) == -1) return false; - if (blockState.getBlock() == Blocks.OBSIDIAN) + if (block == Blocks.OBSIDIAN) return false; if (AllBlocks.BELT.typeOf(blockState)) return true; + if (block instanceof ExtractorBlock) + return true; + if (block instanceof FunnelBlock) + return true; return blockState.getPushReaction() != PushReaction.BLOCK; } @@ -62,6 +74,10 @@ public class BlockMovementTraits { return true; if (block instanceof LadderBlock) return true; + if (block instanceof ExtractorBlock) + return true; + if (block instanceof FunnelBlock) + return true; if (block instanceof TorchBlock) return true; if (block instanceof FlowerPotBlock) @@ -94,6 +110,8 @@ public class BlockMovementTraits { return direction == Direction.DOWN; if (block instanceof DoorBlock) return direction == Direction.DOWN; + if (block instanceof AttachedLogisticalBlock && !(block instanceof TransposerBlock)) + return direction == AttachedLogisticalBlock.getBlockFacing(state); if (block instanceof FlowerPotBlock) return direction == Direction.DOWN; if (block instanceof RedstoneDiodeBlock) diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/Contraption.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/Contraption.java index 1b63899e1..84dd90e5f 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/Contraption.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/Contraption.java @@ -114,9 +114,7 @@ public abstract class Contraption { frontier.add(pos); if (!addToInitialFrontier(world, pos, forcedDirection, frontier)) return false; - - Integer blockLimit = AllConfigs.SERVER.kinetics.maxBlocksMoved.get(); - for (int limit = blockLimit; limit > 0; limit--) { + for (int limit = 100000; limit > 0; limit--) { if (frontier.isEmpty()) return true; if (!moveBlock(world, frontier.remove(0), forcedDirection, frontier, visited)) @@ -183,6 +181,8 @@ public abstract class Contraption { } add(pos, capture(world, pos)); + if (blocks.size() > AllConfigs.SERVER.kinetics.maxBlocksMoved.get()) + return false; return true; } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/MechanicalBearingTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/MechanicalBearingTileEntity.java index 8033bbd6c..0ac222e99 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/MechanicalBearingTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/MechanicalBearingTileEntity.java @@ -126,7 +126,7 @@ public class MechanicalBearingTileEntity extends GeneratingKineticTileEntity imp @Override public float getInterpolatedAngle(float partialTicks) { - if (movedContraption == null || movedContraption.isStalled()) + if (movedContraption == null || movedContraption.isStalled() || !running) partialTicks = 0; return MathHelper.lerp(partialTicks, angle, angle + getAngularSpeed()); } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/deployer/DeployerMovementBehaviour.java b/src/main/java/com/simibubi/create/modules/contraptions/components/deployer/DeployerMovementBehaviour.java index a700fced5..91485ee75 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/deployer/DeployerMovementBehaviour.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/deployer/DeployerMovementBehaviour.java @@ -104,8 +104,9 @@ public class DeployerMovementBehaviour extends MovementBehaviour { if (player == null) return; if (player.getHeldItemMainhand().isEmpty()) { + ItemStack filter = getFilter(context); ItemStack held = ItemHelper.extract(context.contraption.inventory, - stack -> FilterItem.test(stack, getFilter(context)), 1, false); + stack -> FilterItem.test(context.world, stack, filter), 1, false); player.setHeldItem(Hand.MAIN_HAND, held); } } @@ -123,7 +124,8 @@ public class DeployerMovementBehaviour extends MovementBehaviour { if (itemstack.isEmpty()) continue; - if (list == inv.mainInventory && i == inv.currentItem && FilterItem.test(itemstack, filter)) + if (list == inv.mainInventory && i == inv.currentItem + && FilterItem.test(context.world, itemstack, filter)) continue; dropItem(context, itemstack); diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltInventory.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltInventory.java index a83f21e74..0bf9f9bc4 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltInventory.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltInventory.java @@ -37,12 +37,14 @@ public class BeltInventory { final BeltTileEntity belt; final List items; + final List toInsert; boolean beltMovementPositive; final float SEGMENT_WINDOW = .75f; public BeltInventory(BeltTileEntity te) { this.belt = te; items = new LinkedList<>(); + toInsert = new LinkedList<>(); } public void tick() { @@ -54,6 +56,14 @@ public class BeltInventory { belt.markDirty(); belt.sendData(); } + + // Add items from previous cycle + if (!toInsert.isEmpty()) { + toInsert.forEach(this::insert); + toInsert.clear(); + belt.markDirty(); + belt.sendData(); + } // Assuming the first entry is furthest on the belt TransportedItemStack stackInFront = null; @@ -325,18 +335,29 @@ public class BeltInventory { else if (!beltMovementPositive) segmentPos += 1f; - for (TransportedItemStack stack : items) { - float currentPos = stack.beltPosition; - - if (stack.insertedAt == segment && stack.insertedFrom == side - && (beltMovementPositive ? currentPos <= segmentPos + 1 : currentPos >= segmentPos - 1)) + for (TransportedItemStack stack : items) + if (isBlocking(segment, side, segmentPos, stack)) return false; - - } + for (TransportedItemStack stack : toInsert) + if (isBlocking(segment, side, segmentPos, stack)) + return false; + return true; } - protected void insert(TransportedItemStack newStack) { + private boolean isBlocking(int segment, Direction side, float segmentPos, TransportedItemStack stack) { + float currentPos = stack.beltPosition; + if (stack.insertedAt == segment && stack.insertedFrom == side + && (beltMovementPositive ? currentPos <= segmentPos + 1 : currentPos >= segmentPos - 1)) + return true; + return false; + } + + public void addItem(TransportedItemStack newStack) { + toInsert.add(newStack); + } + + private void insert(TransportedItemStack newStack) { if (items.isEmpty()) items.add(newStack); else { diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltTileEntity.java index 7c9117173..45afa22a5 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltTileEntity.java @@ -347,7 +347,7 @@ public class BeltTileEntity extends KineticTileEntity { transportedStack.insertedAt = index; transportedStack.insertedFrom = side; transportedStack.prevBeltPosition = transportedStack.beltPosition; - nextInventory.insert(transportedStack); + nextInventory.addItem(transportedStack); nextBeltController.markDirty(); nextBeltController.sendData(); diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/ItemHandlerBeltSegment.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/ItemHandlerBeltSegment.java index 8a1884b03..6ba9f7c1a 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/ItemHandlerBeltSegment.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/ItemHandlerBeltSegment.java @@ -34,7 +34,7 @@ public class ItemHandlerBeltSegment implements IItemHandler { newStack.insertedAt = offset; newStack.beltPosition = offset + .5f + (beltInventory.beltMovementPositive ? -1 : 1) / 16f; newStack.prevBeltPosition = newStack.beltPosition; - this.beltInventory.insert(newStack); + this.beltInventory.addItem(newStack); this.beltInventory.belt.markDirty(); this.beltInventory.belt.sendData(); } 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 180edce95..fb4523184 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 @@ -18,8 +18,8 @@ public class StressGaugeTileEntity extends GaugeTileEntity { } @Override - public void updateStressFromNetwork(float maxStress, float currentStress) { - super.updateStressFromNetwork(maxStress, currentStress); + public void updateFromNetwork(float maxStress, float currentStress, int networkSize) { + super.updateFromNetwork(maxStress, currentStress, networkSize); if (!StressImpact.isEnabled()) dialTarget = 0; @@ -51,7 +51,8 @@ public class StressGaugeTileEntity extends GaugeTileEntity { markDirty(); return; } - updateStressFromNetwork(capacity, stress); + + updateFromNetwork(capacity, stress, getOrCreateNetwork().getSize()); } @Override @@ -67,7 +68,8 @@ public class StressGaugeTileEntity extends GaugeTileEntity { tooltip.add(spacing + TextFormatting.GRAY + Lang.translate("gui.stress_gauge.title")); if (getTheoreticalSpeed() == 0) - tooltip.add(TextFormatting.DARK_GRAY + ItemDescription.makeProgressBar(3, -1) + Lang.translate("gui.stress_gauge.no_rotation")); + tooltip.add(TextFormatting.DARK_GRAY + ItemDescription.makeProgressBar(3, -1) + + Lang.translate("gui.stress_gauge.no_rotation")); else { tooltip.add(spacing + StressImpact.getFormattedStressText(stressFraction)); @@ -76,10 +78,13 @@ public class StressGaugeTileEntity extends GaugeTileEntity { double remainingCapacity = capacity - getNetworkStress(); double remainingCapacityAtBase = remainingCapacity / Math.abs(getTheoreticalSpeed()); - String capacityString = spacing + StressImpact.of(stressFraction).getRelativeColor() + "%s" + Lang.translate("generic.unit.stress") + " " + TextFormatting.DARK_GRAY + "%s"; + String capacityString = spacing + StressImpact.of(stressFraction).getRelativeColor() + "%s" + + Lang.translate("generic.unit.stress") + " " + TextFormatting.DARK_GRAY + "%s"; - tooltip.add(String.format(capacityString, IHaveGoggleInformation.format(remainingCapacityAtBase), Lang.translate("gui.goggles.base_value"))); - tooltip.add(String.format(capacityString, IHaveGoggleInformation.format(remainingCapacity), Lang.translate("gui.goggles.at_current_speed"))); + tooltip.add(String.format(capacityString, IHaveGoggleInformation.format(remainingCapacityAtBase), + Lang.translate("gui.goggles.base_value"))); + tooltip.add(String.format(capacityString, IHaveGoggleInformation.format(remainingCapacity), + Lang.translate("gui.goggles.at_current_speed"))); } diff --git a/src/main/java/com/simibubi/create/modules/curiosities/deforester/DeforesterItem.java b/src/main/java/com/simibubi/create/modules/curiosities/deforester/DeforesterItem.java index aa9c3eb4c..a265b31a2 100644 --- a/src/main/java/com/simibubi/create/modules/curiosities/deforester/DeforesterItem.java +++ b/src/main/java/com/simibubi/create/modules/curiosities/deforester/DeforesterItem.java @@ -32,7 +32,7 @@ import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus; public class DeforesterItem extends AxeItem implements IHaveCustomItemModel { public DeforesterItem(Properties builder) { - super(AllToolTiers.RADIANT, 10.0F, -3.1F, builder); + super(AllToolTiers.RADIANT, 5.0F, -3.1F, builder); } // Moved away from Item#onBlockDestroyed as it does not get called in Creative diff --git a/src/main/java/com/simibubi/create/modules/curiosities/tools/BlazingToolItem.java b/src/main/java/com/simibubi/create/modules/curiosities/tools/BlazingToolItem.java index 27aa1107a..7c24a302f 100644 --- a/src/main/java/com/simibubi/create/modules/curiosities/tools/BlazingToolItem.java +++ b/src/main/java/com/simibubi/create/modules/curiosities/tools/BlazingToolItem.java @@ -67,12 +67,16 @@ public class BlazingToolItem extends AbstractToolItem { public void modifyDrops(Collection drops, IWorld world, BlockPos pos, ItemStack tool, BlockState state) { super.modifyDrops(drops, world, pos, tool, state); World worldIn = world.getWorld(); - helperFurnace.setWorld(worldIn); - - RecipeManager recipeManager = worldIn.getRecipeManager(); int enchantmentLevel = EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, tool); if (state == null) enchantmentLevel = 0; + List smeltedStacks = smeltDrops(drops, worldIn, enchantmentLevel); + drops.addAll(smeltedStacks); + } + + public static List smeltDrops(Collection drops, World worldIn, int enchantmentLevel) { + helperFurnace.setWorld(worldIn); + RecipeManager recipeManager = worldIn.getRecipeManager(); List smeltedStacks = new ArrayList<>(); Iterator dropper = drops.iterator(); while (dropper.hasNext()) { @@ -87,13 +91,12 @@ public class BlazingToolItem extends AbstractToolItem { float modifier = 1; if (stack.getItem() instanceof BlockItem && !(out.getItem() instanceof BlockItem)) - modifier += world.getRandom().nextFloat() * enchantmentLevel; + modifier += worldIn.getRandom().nextFloat() * enchantmentLevel; out.setCount((int) (out.getCount() * modifier + .4f)); smeltedStacks.addAll(ItemHelper.multipliedOutput(stack, out)); } - - drops.addAll(smeltedStacks); + return smeltedStacks; } @Override diff --git a/src/main/java/com/simibubi/create/modules/curiosities/tools/SandPaperItem.java b/src/main/java/com/simibubi/create/modules/curiosities/tools/SandPaperItem.java index ff23eafc6..d50bd5948 100644 --- a/src/main/java/com/simibubi/create/modules/curiosities/tools/SandPaperItem.java +++ b/src/main/java/com/simibubi/create/modules/curiosities/tools/SandPaperItem.java @@ -113,7 +113,12 @@ public class SandPaperItem extends Item implements IHaveCustomItemModel { public boolean canApplyAtEnchantingTable(ItemStack stack, Enchantment enchantment) { return enchantment == Enchantments.FORTUNE || super.canApplyAtEnchantingTable(stack, enchantment); } - + + @Override + public int getItemEnchantability(ItemStack stack) { + return 1; + } + @Override public ItemStack onItemUseFinish(ItemStack stack, World worldIn, LivingEntity entityLiving) { if (!(entityLiving instanceof PlayerEntity)) diff --git a/src/main/java/com/simibubi/create/modules/curiosities/tools/ToolEvents.java b/src/main/java/com/simibubi/create/modules/curiosities/tools/ToolEvents.java index 8c845a458..5b10dc99a 100644 --- a/src/main/java/com/simibubi/create/modules/curiosities/tools/ToolEvents.java +++ b/src/main/java/com/simibubi/create/modules/curiosities/tools/ToolEvents.java @@ -16,8 +16,10 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.item.ItemEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.ServerPlayerEntity; +import net.minecraft.item.IItemTier; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.item.TieredItem; import net.minecraft.nbt.CompoundNBT; import net.minecraft.util.EntityDamageSource; import net.minecraft.util.math.BlockPos; @@ -98,8 +100,11 @@ public class ToolEvents { ItemStack heldItemMainhand = player.getHeldItemMainhand(); String marker = "create_roseQuartzRange"; CompoundNBT persistentData = player.getPersistentData(); + Item item = heldItemMainhand.getItem(); + boolean holdingRoseQuartz = + item instanceof TieredItem && ((TieredItem) item).getTier() == AllToolTiers.ROSE_QUARTZ; - if (!(heldItemMainhand.getItem() instanceof RoseQuartzToolItem)) { + if (!holdingRoseQuartz) { if (persistentData.contains(marker)) { player.getAttributes().removeAttributeModifiers(RoseQuartzToolItem.rangeModifier); persistentData.remove(marker); @@ -127,18 +132,20 @@ public class ToolEvents { PlayerEntity player = (PlayerEntity) trueSource; ItemStack heldItemMainhand = player.getHeldItemMainhand(); Item item = heldItemMainhand.getItem(); + IItemTier tier = item instanceof TieredItem ? ((TieredItem) item).getTier() : null; - if (item instanceof ShadowSteelToolItem) + if (tier == AllToolTiers.SHADOW_STEEL) event.setCanceled(true); - if (item instanceof BlazingToolItem) { - BlazingToolItem blazingToolItem = (BlazingToolItem) item; + if (tier == AllToolTiers.BLAZING) { List drops = event.getDrops().stream().map(entity -> { ItemStack stack = entity.getItem(); entity.remove(); return stack; }).collect(Collectors.toList()); - blazingToolItem.modifyDrops(drops, world, player.getPosition(), heldItemMainhand, null); + + drops = BlazingToolItem.smeltDrops(drops, world, 0); + event.getDrops().clear(); drops.stream().map(stack -> { ItemEntity entity = new ItemEntity(world, target.posX, target.posY, target.posZ, stack); @@ -156,7 +163,10 @@ public class ToolEvents { if (attackingPlayer == null) return; ItemStack heldItemMainhand = attackingPlayer.getHeldItemMainhand(); - if (heldItemMainhand.getItem() instanceof ShadowSteelToolItem) { + Item item = heldItemMainhand.getItem(); + IItemTier tier = item instanceof TieredItem ? ((TieredItem) item).getTier() : null; + + if (tier == AllToolTiers.SHADOW_STEEL) { int level = EnchantmentHelper.getEnchantmentLevel(Enchantments.LOOTING, heldItemMainhand); float modifier = 1 + event.getEntity().world.getRandom().nextFloat() * level; event.setDroppedExperience((int) (event.getDroppedExperience() * modifier + .4f)); diff --git a/src/main/java/com/simibubi/create/modules/logistics/InWorldProcessing.java b/src/main/java/com/simibubi/create/modules/logistics/InWorldProcessing.java index 498957d09..7153180af 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/InWorldProcessing.java +++ b/src/main/java/com/simibubi/create/modules/logistics/InWorldProcessing.java @@ -58,7 +58,7 @@ public class InWorldProcessing { public static Type byBlock(IBlockReader reader, BlockPos pos) { BlockState blockState = reader.getBlockState(pos); IFluidState fluidState = reader.getFluidState(pos); - if (fluidState.getFluid() == Fluids.WATER) + if (fluidState.getFluid() == Fluids.WATER || fluidState.getFluid() == Fluids.FLOWING_WATER) return Type.SPLASHING; if (blockState.getBlock() == Blocks.FIRE || (blockState.getBlock() == Blocks.CAMPFIRE && blockState.get(CampfireBlock.LIT))) @@ -103,16 +103,19 @@ public class InWorldProcessing { return recipe.isPresent(); } - if (type == Type.SPLASHING) { - splashingInv.setInventorySlotContents(0, stack); - Optional recipe = - world.getRecipeManager().getRecipe(AllRecipes.SPLASHING.getType(), splashingInv, world); - return recipe.isPresent(); - } + if (type == Type.SPLASHING) + return isWashable(stack, world); return false; } + public static boolean isWashable(ItemStack stack, World world) { + splashingInv.setInventorySlotContents(0, stack); + Optional recipe = + world.getRecipeManager().getRecipe(AllRecipes.SPLASHING.getType(), splashingInv, world); + return recipe.isPresent(); + } + public static void applyProcessing(ItemEntity entity, Type type) { if (decrementProcessingTime(entity, type) != 0) return; @@ -152,6 +155,8 @@ public class InWorldProcessing { List transportedStacks = new ArrayList<>(); for (ItemStack additional : stacks) { TransportedItemStack newTransported = transported.getSimilar(); + newTransported.beltPosition -= Math.signum(belt.getDirectionAwareBeltMovementSpeed()) * 1/32f; + newTransported.prevBeltPosition = newTransported.beltPosition; newTransported.stack = additional.copy(); transportedStacks.add(newTransported); } @@ -279,7 +284,7 @@ public class InWorldProcessing { public static void spawnParticlesForProcessing(World world, Vec3d vec, Type type) { if (!world.isRemote) return; - if (world.rand.nextInt(4) != 0) + if (world.rand.nextInt(8) != 0) return; switch (type) { diff --git a/src/main/java/com/simibubi/create/modules/logistics/RedstoneLinkNetworkHandler.java b/src/main/java/com/simibubi/create/modules/logistics/RedstoneLinkNetworkHandler.java index 84068e0d5..71fd9a820 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/RedstoneLinkNetworkHandler.java +++ b/src/main/java/com/simibubi/create/modules/logistics/RedstoneLinkNetworkHandler.java @@ -93,6 +93,10 @@ public class RedstoneLinkNetworkHandler { iterator.remove(); continue; } + if (actor.getWorld().getTileEntity(other.tileEntity.getPos()) != other.tileEntity) { + iterator.remove(); + continue; + } if (!withinRange(actor, other)) continue; if (other.isTransmitting()) { diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/RedstoneLinkBlock.java b/src/main/java/com/simibubi/create/modules/logistics/block/RedstoneLinkBlock.java index c6d4d6f2d..09fc35705 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/block/RedstoneLinkBlock.java +++ b/src/main/java/com/simibubi/create/modules/logistics/block/RedstoneLinkBlock.java @@ -2,6 +2,7 @@ package com.simibubi.create.modules.logistics.block; import com.simibubi.create.foundation.block.ProperDirectionalBlock; import com.simibubi.create.foundation.utility.AllShapes; +import com.simibubi.create.foundation.utility.Iterate; import net.minecraft.block.Block; import net.minecraft.block.BlockState; @@ -61,6 +62,12 @@ public class RedstoneLinkBlock extends ProperDirectionalBlock { return; boolean shouldPower = worldIn.getWorld().isBlockPowered(pos); + + for (Direction direction : Iterate.directions) { + BlockPos blockpos = pos.offset(direction); + shouldPower |= worldIn.getRedstonePower(blockpos, Direction.UP) > 0; + } + boolean previouslyPowered = state.get(POWERED); if (previouslyPowered != shouldPower) { @@ -134,7 +141,7 @@ public class RedstoneLinkBlock extends ProperDirectionalBlock { @Override public boolean canConnectRedstone(BlockState state, IBlockReader world, BlockPos pos, Direction side) { - return state.get(FACING) == Direction.UP && side != null; + return side != null; } @Override diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/belts/FunnelBlock.java b/src/main/java/com/simibubi/create/modules/logistics/block/belts/FunnelBlock.java index d8df6946e..53c0ce5c8 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/block/belts/FunnelBlock.java +++ b/src/main/java/com/simibubi/create/modules/logistics/block/belts/FunnelBlock.java @@ -9,6 +9,8 @@ import com.simibubi.create.foundation.behaviour.base.TileEntityBehaviour; import com.simibubi.create.foundation.behaviour.filtering.FilteringBehaviour; import com.simibubi.create.foundation.block.IWithTileEntity; import com.simibubi.create.foundation.utility.AllShapes; +import com.simibubi.create.modules.contraptions.components.contraptions.IPortableBlock; +import com.simibubi.create.modules.contraptions.components.contraptions.MovementBehaviour; import com.simibubi.create.modules.contraptions.relays.belt.AllBeltAttachments.BeltAttachmentState; import com.simibubi.create.modules.contraptions.relays.belt.AllBeltAttachments.IBeltAttachment; import com.simibubi.create.modules.contraptions.relays.belt.BeltTileEntity; @@ -34,9 +36,10 @@ import net.minecraft.world.IBlockReader; import net.minecraft.world.IWorld; import net.minecraft.world.World; -public class FunnelBlock extends AttachedLogisticalBlock implements IBeltAttachment, IWithTileEntity { +public class FunnelBlock extends AttachedLogisticalBlock implements IBeltAttachment, IWithTileEntity, IPortableBlock { public static final BooleanProperty BELT = BooleanProperty.create("belt"); + public static final MovementBehaviour MOVEMENT = new FunnelMovementBehaviour(); @Override protected void fillStateContainer(Builder builder) { @@ -211,4 +214,9 @@ public class FunnelBlock extends AttachedLogisticalBlock implements IBeltAttachm } } + @Override + public MovementBehaviour getMovementBehaviour() { + return MOVEMENT; + } + } diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/belts/FunnelMovementBehaviour.java b/src/main/java/com/simibubi/create/modules/logistics/block/belts/FunnelMovementBehaviour.java new file mode 100644 index 000000000..0831d5b57 --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/logistics/block/belts/FunnelMovementBehaviour.java @@ -0,0 +1,48 @@ +package com.simibubi.create.modules.logistics.block.belts; + +import java.util.List; + +import com.simibubi.create.modules.contraptions.components.contraptions.MovementBehaviour; +import com.simibubi.create.modules.contraptions.components.contraptions.MovementContext; +import com.simibubi.create.modules.logistics.item.filter.FilterItem; + +import net.minecraft.entity.item.ItemEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraftforge.items.ItemHandlerHelper; + +public class FunnelMovementBehaviour extends MovementBehaviour { + + @Override + public void visitNewPosition(MovementContext context, BlockPos pos) { + super.visitNewPosition(context, pos); + + World world = context.world; + List items = world.getEntitiesWithinAABB(ItemEntity.class, new AxisAlignedBB(pos)); + ItemStack filter = getFilter(context); + + for (ItemEntity item : items) { + ItemStack toInsert = item.getItem(); + if (!filter.isEmpty() && !FilterItem.test(context.world, toInsert, filter)) + continue; + ItemStack remainder = ItemHandlerHelper.insertItemStacked(context.contraption.inventory, toInsert, false); + if (remainder.getCount() == toInsert.getCount()) + continue; + if (remainder.isEmpty()) { + item.setItem(ItemStack.EMPTY); + item.remove(); + continue; + } + + item.setItem(remainder); + } + + } + + private ItemStack getFilter(MovementContext context) { + return ItemStack.read(context.tileData.getCompound("Filter")); + } + +} diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/extractor/ExtractorBlock.java b/src/main/java/com/simibubi/create/modules/logistics/block/extractor/ExtractorBlock.java index 172ed7d97..c389bd418 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/block/extractor/ExtractorBlock.java +++ b/src/main/java/com/simibubi/create/modules/logistics/block/extractor/ExtractorBlock.java @@ -4,6 +4,8 @@ import com.simibubi.create.AllBlocks; import com.simibubi.create.foundation.utility.AllShapes; import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.VecHelper; +import com.simibubi.create.modules.contraptions.components.contraptions.IPortableBlock; +import com.simibubi.create.modules.contraptions.components.contraptions.MovementBehaviour; import com.simibubi.create.modules.logistics.block.belts.AttachedLogisticalBlock; import com.simibubi.create.modules.logistics.block.belts.BeltAttachableLogisticalBlock; @@ -22,9 +24,10 @@ import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.world.IBlockReader; import net.minecraft.world.World; -public class ExtractorBlock extends BeltAttachableLogisticalBlock { +public class ExtractorBlock extends BeltAttachableLogisticalBlock implements IPortableBlock { public static BooleanProperty POWERED = BlockStateProperties.POWERED; + private static final MovementBehaviour MOVEMENT = new ExtractorMovementBehaviour(); public ExtractorBlock() { super(); @@ -119,4 +122,9 @@ public class ExtractorBlock extends BeltAttachableLogisticalBlock { } } + @Override + public MovementBehaviour getMovementBehaviour() { + return MOVEMENT; + } + } \ No newline at end of file diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/extractor/ExtractorMovementBehaviour.java b/src/main/java/com/simibubi/create/modules/logistics/block/extractor/ExtractorMovementBehaviour.java new file mode 100644 index 000000000..3662aab8c --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/logistics/block/extractor/ExtractorMovementBehaviour.java @@ -0,0 +1,66 @@ +package com.simibubi.create.modules.logistics.block.extractor; + +import com.simibubi.create.foundation.item.ItemHelper; +import com.simibubi.create.foundation.utility.VecHelper; +import com.simibubi.create.modules.contraptions.components.contraptions.MovementBehaviour; +import com.simibubi.create.modules.contraptions.components.contraptions.MovementContext; +import com.simibubi.create.modules.logistics.block.belts.AttachedLogisticalBlock; +import com.simibubi.create.modules.logistics.item.filter.FilterItem; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.item.ItemEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.util.Direction; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.SoundEvents; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Vec3d; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.World; + +public class ExtractorMovementBehaviour extends MovementBehaviour { + + @Override + public void visitNewPosition(MovementContext context, BlockPos pos) { + super.visitNewPosition(context, pos); + + World world = context.world; + VoxelShape collisionShape = world.getBlockState(pos).getCollisionShape(world, pos); + if (!collisionShape.isEmpty()) + return; + if (!world.getEntitiesWithinAABB(ItemEntity.class, new AxisAlignedBB(pos)).isEmpty()) + return; + + ItemStack filter = getFilter(context); + int amount = getFilterAmount(context); + ItemStack dropped = ItemHelper.extract(context.contraption.inventory, + stack -> FilterItem.test(context.world, stack, filter), amount == 0 ? -1 : amount, false); + + if (dropped.isEmpty()) + return; + if (world.isRemote) + return; + + Vec3d entityPos = VecHelper.getCenterOf(pos).add(0, -0.5f, 0); + Entity entityIn = null; + Direction facing = AttachedLogisticalBlock.getBlockFacing(context.state); + if (facing == Direction.DOWN) + entityPos = entityPos.add(0, .5, 0); + + entityIn = new ItemEntity(world, entityPos.x, entityPos.y, entityPos.z, dropped); + entityIn.setMotion(Vec3d.ZERO); + ((ItemEntity) entityIn).setPickupDelay(5); + world.playSound(null, pos, SoundEvents.ENTITY_ITEM_PICKUP, SoundCategory.BLOCKS, 1/16f, .1f); + world.addEntity(entityIn); + } + + private ItemStack getFilter(MovementContext context) { + return ItemStack.read(context.tileData.getCompound("Filter")); + } + + private int getFilterAmount(MovementContext context) { + return context.tileData.getInt("FilterAmount"); + } + +} diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/transposer/TransposerBlock.java b/src/main/java/com/simibubi/create/modules/logistics/block/transposer/TransposerBlock.java index c3580de1b..172541992 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/block/transposer/TransposerBlock.java +++ b/src/main/java/com/simibubi/create/modules/logistics/block/transposer/TransposerBlock.java @@ -30,7 +30,7 @@ public class TransposerBlock extends BeltAttachableLogisticalBlock implements IW public TransposerBlock() { setDefaultState(getDefaultState().with(POWERED, false)); } - + @Override public boolean hasTileEntity(BlockState state) { return true; diff --git a/src/main/java/com/simibubi/create/modules/logistics/item/filter/AttributeFilterScreen.java b/src/main/java/com/simibubi/create/modules/logistics/item/filter/AttributeFilterScreen.java index f5b32a1f7..4a1a4423a 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/item/filter/AttributeFilterScreen.java +++ b/src/main/java/com/simibubi/create/modules/logistics/item/filter/AttributeFilterScreen.java @@ -109,7 +109,7 @@ public class AttributeFilterScreen extends AbstractFilterScreen options = attributesOfItem.stream().map(ItemAttribute::format).collect(Collectors.toList()); attributeSelector.forOptions(options); attributeSelector.active = true; diff --git a/src/main/java/com/simibubi/create/modules/logistics/item/filter/FilterItem.java b/src/main/java/com/simibubi/create/modules/logistics/item/filter/FilterItem.java index 9d8b478c5..1e7b08a67 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/item/filter/FilterItem.java +++ b/src/main/java/com/simibubi/create/modules/logistics/item/filter/FilterItem.java @@ -152,11 +152,11 @@ public class FilterItem extends Item implements INamedContainerProvider { return newInv; } - public static boolean test(ItemStack stack, ItemStack filter) { - return test(stack, filter, false); + public static boolean test(World world, ItemStack stack, ItemStack filter) { + return test(world, stack, filter, false); } - private static boolean test(ItemStack stack, ItemStack filter, boolean matchNBT) { + private static boolean test(World world, ItemStack stack, ItemStack filter, boolean matchNBT) { if (filter.isEmpty()) return true; @@ -172,7 +172,7 @@ public class FilterItem extends Item implements INamedContainerProvider { ItemStack stackInSlot = filterItems.getStackInSlot(slot); if (stackInSlot.isEmpty()) continue; - boolean matches = test(stack, stackInSlot, respectNBT); + boolean matches = test(world, stack, stackInSlot, respectNBT); if (matches) return !blacklist; } @@ -184,7 +184,7 @@ public class FilterItem extends Item implements INamedContainerProvider { ListNBT attributes = filter.getOrCreateTag().getList("MatchedAttributes", NBT.TAG_COMPOUND); for (INBT inbt : attributes) { ItemAttribute attribute = ItemAttribute.fromNBT((CompoundNBT) inbt); - boolean matches = attribute.appliesTo(stack); + boolean matches = attribute.appliesTo(stack, world); if (matches) { switch (whitelistMode) { diff --git a/src/main/java/com/simibubi/create/modules/logistics/item/filter/ItemAttribute.java b/src/main/java/com/simibubi/create/modules/logistics/item/filter/ItemAttribute.java index 11f17fa82..43ac89f0a 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/item/filter/ItemAttribute.java +++ b/src/main/java/com/simibubi/create/modules/logistics/item/filter/ItemAttribute.java @@ -5,6 +5,7 @@ import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Optional; +import java.util.function.BiPredicate; import java.util.function.Predicate; import java.util.stream.Collectors; @@ -12,20 +13,27 @@ import org.apache.commons.lang3.StringUtils; import com.google.common.base.Predicates; import com.simibubi.create.foundation.utility.Lang; +import com.simibubi.create.modules.logistics.InWorldProcessing; import net.minecraft.client.resources.I18n; +import net.minecraft.inventory.IInventory; import net.minecraft.item.BlockItem; import net.minecraft.item.Item; import net.minecraft.item.ItemGroup; import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.IRecipe; +import net.minecraft.item.crafting.IRecipeType; import net.minecraft.nbt.CompoundNBT; import net.minecraft.tileentity.AbstractFurnaceTileEntity; import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.fml.ModContainer; import net.minecraftforge.fml.ModList; import net.minecraftforge.forgespi.language.IModInfo; +import net.minecraftforge.items.ItemStackHandler; +import net.minecraftforge.items.wrapper.RecipeWrapper; public interface ItemAttribute { @@ -41,7 +49,15 @@ public interface ItemAttribute { return attributeType; } - public boolean appliesTo(ItemStack stack); + default boolean appliesTo(ItemStack stack, World world) { + return appliesTo(stack); + } + + boolean appliesTo(ItemStack stack); + + default List listAttributesOf(ItemStack stack, World world) { + return listAttributesOf(stack); + } public List listAttributesOf(ItemStack stack); @@ -73,7 +89,7 @@ public interface ItemAttribute { default boolean canRead(CompoundNBT nbt) { return nbt.contains(getNBTKey()); } - + default String getNBTKey() { return getTranslationKey(); } @@ -93,28 +109,55 @@ public interface ItemAttribute { BADLY_DAMAGED(s -> s.isDamaged() && s.getDamage() / s.getMaxDamage() > 3 / 4f), NOT_STACKABLE(Predicates.not(ItemStack::isStackable)), EQUIPABLE(s -> s.getEquipmentSlot() != null), - FURNACE_FUEL(AbstractFurnaceTileEntity::isFuel); + FURNACE_FUEL(AbstractFurnaceTileEntity::isFuel), + WASHABLE(InWorldProcessing::isWashable), + SMELTABLE((s, w) -> testRecipe(s, w, IRecipeType.SMELTING)), + SMOKABLE((s, w) -> testRecipe(s, w, IRecipeType.SMOKING)), + BLASTABLE((s, w) -> testRecipe(s, w, IRecipeType.BLASTING)); + private static final RecipeWrapper RECIPE_WRAPPER = new RecipeWrapper(new ItemStackHandler(1)); private Predicate test; + private BiPredicate testWithWorld; private StandardTraits(Predicate test) { this.test = test; } + private static boolean testRecipe(ItemStack s, World w, IRecipeType> smelting) { + RECIPE_WRAPPER.setInventorySlotContents(0, s.copy()); + return w.getRecipeManager().getRecipe(smelting, RECIPE_WRAPPER, w).isPresent(); + } + + private StandardTraits(BiPredicate test) { + this.testWithWorld = test; + } + + @Override + public boolean appliesTo(ItemStack stack, World world) { + if (testWithWorld != null) + return testWithWorld.test(stack, world); + return appliesTo(stack); + } + @Override public boolean appliesTo(ItemStack stack) { return test.test(stack); } @Override - public List listAttributesOf(ItemStack stack) { + public List listAttributesOf(ItemStack stack, World world) { List attributes = new ArrayList<>(); for (StandardTraits trait : values()) - if (trait.test.test(stack)) + if (trait.appliesTo(stack, world)) attributes.add(trait); return attributes; } + @Override + public List listAttributesOf(ItemStack stack) { + return null; + } + @Override public String getTranslationKey() { return Lang.asId(name()); diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 5146cb722..3471d8dbe 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -14,7 +14,7 @@ Technology that empowers the player.''' [[dependencies.create]] modId="forge" mandatory=true - versionRange="[28.1.20,)" + versionRange="[28.1.56,)" ordering="NONE" side="BOTH" diff --git a/src/main/resources/assets/create/lang/en_us.json b/src/main/resources/assets/create/lang/en_us.json index f6c0b1bca..29539f949 100644 --- a/src/main/resources/assets/create/lang/en_us.json +++ b/src/main/resources/assets/create/lang/en_us.json @@ -545,6 +545,10 @@ "create.item_attributes.placeable": "is placeable", "create.item_attributes.consumable": "can be eaten", + "create.item_attributes.smeltable": "can be Smelted", + "create.item_attributes.washable": "can be Washed", + "create.item_attributes.smokable": "can be Smoked", + "create.item_attributes.blastable": "is smeltable in Blast Furnace", "create.item_attributes.enchanted": "is enchanted", "create.item_attributes.damaged": "is damaged", "create.item_attributes.badly_damaged": "is heavily damaged", From 1da43f8ffc1ab8c1e53751ecbb20e1adcfadddfc Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Sat, 28 Mar 2020 19:03:18 +0100 Subject: [PATCH 08/11] More generic chest detection - Possibly enabled the use of modded chest blocks for portable inventories - More safety checks --- .../create/modules/contraptions/RotationPropagator.java | 7 +++++-- .../components/contraptions/MountedStorage.java | 6 ++++-- .../modules/contraptions/components/saw/SawBlock.java | 7 ++++++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/simibubi/create/modules/contraptions/RotationPropagator.java b/src/main/java/com/simibubi/create/modules/contraptions/RotationPropagator.java index 373c0493f..96955de75 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/RotationPropagator.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/RotationPropagator.java @@ -298,8 +298,11 @@ public class RotationPropagator { BlockState neighbourState = worldIn.getBlockState(neighbourPos); if (!(neighbourState.getBlock() instanceof IRotate)) continue; - - final KineticTileEntity neighbourTE = (KineticTileEntity) worldIn.getTileEntity(neighbourPos); + TileEntity tileEntity = worldIn.getTileEntity(neighbourPos); + if (!(tileEntity instanceof KineticTileEntity)) + continue; + + final KineticTileEntity neighbourTE = (KineticTileEntity) tileEntity; if (!neighbourTE.hasSource() || !neighbourTE.source.equals(pos)) continue; diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/MountedStorage.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/MountedStorage.java index e46eb52b2..e2056fba1 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/MountedStorage.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/MountedStorage.java @@ -7,6 +7,8 @@ import net.minecraft.block.ChestBlock; import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompoundNBT; import net.minecraft.state.properties.ChestType; +import net.minecraft.tileentity.BarrelTileEntity; +import net.minecraft.tileentity.ChestTileEntity; import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntityType; import net.minecraftforge.items.CapabilityItemHandler; @@ -105,9 +107,9 @@ public class MountedStorage { TileEntityType type = te.getType(); if (type == AllTileEntities.FLEXCRATE.type) return true; - if (type == TileEntityType.BARREL) + if (te instanceof ChestTileEntity) return true; - if (type == TileEntityType.CHEST || type == TileEntityType.TRAPPED_CHEST) + if (te instanceof BarrelTileEntity) return true; return false; } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/saw/SawBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/saw/SawBlock.java index e87f73bb0..562b65710 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/saw/SawBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/saw/SawBlock.java @@ -97,7 +97,12 @@ public class SawBlock extends DirectionalAxisKineticBlock implements IWithTileEn super.onLanded(worldIn, entityIn); if (!(entityIn instanceof ItemEntity)) return; - withTileEntityDo(entityIn.world, entityIn.getPosition(), te -> { + BlockPos pos = entityIn.getPosition(); + if (!(worldIn.getTileEntity(pos) instanceof SawTileEntity)) + return; + if (entityIn.world.isRemote) + return; + withTileEntityDo(entityIn.world, pos, te -> { te.insertItem((ItemEntity) entityIn); }); } From 46d54a597c69a7ebdb7d521f1eaa6cc1b6719747 Mon Sep 17 00:00:00 2001 From: Zelophed Date: Sat, 28 Mar 2020 23:20:25 +0100 Subject: [PATCH 09/11] added datagen for ItemTags to AllBlocks and AllItems --- .../java/com/simibubi/create/AllBlocks.java | 78 ++++++++-------- .../java/com/simibubi/create/AllItems.java | 91 +++++++++++++------ .../com/simibubi/create/CreateItemGroup.java | 2 +- .../utility/data/AllItemsTagProvider.java | 67 ++++++++++++++ .../foundation/utility/data/Generator.java | 1 + .../foundation/utility/data/ITaggable.java | 8 +- 6 files changed, 174 insertions(+), 73 deletions(-) create mode 100644 src/main/java/com/simibubi/create/foundation/utility/data/AllItemsTagProvider.java diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index e3a6c32d8..78829d452 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -155,7 +155,7 @@ public enum AllBlocks { ROPE_PULLEY(new PulleyBlock()), ROPE(new PulleyBlock.RopeBlock()), PULLEY_MAGNET(new PulleyBlock.MagnetBlock()), - CART_ASSEMBLER(new TaggedBlock<>(new CartAssemblerBlock()).withVanillaTags(ITaggable.TagType.BLOCK, "rails")), + CART_ASSEMBLER(new TaggedBlock(new CartAssemblerBlock()).withVanillaTags(ITaggable.TagType.BLOCK, "rails")), MINECART_ANCHOR(new MinecartAnchorBlock()), TRANSLATION_CHASSIS(new LinearChassisBlock()), TRANSLATION_CHASSIS_SECONDARY(new LinearChassisBlock()), @@ -205,10 +205,10 @@ public enum AllBlocks { SYMMETRY_CROSSPLANE(new CrossPlaneSymmetryBlock()), SYMMETRY_TRIPLEPLANE(new TriplePlaneSymmetryBlock()), WINDOW_IN_A_BLOCK(new WindowInABlockBlock()), - COCOA_LOG(new TaggedBlock<>(new CocoaLogBlock()).withVanillaTags(ITaggable.TagType.BLOCK, "jungle_logs")), + COCOA_LOG(new TaggedBlock(new CocoaLogBlock()).withVanillaTags(ITaggable.TagType.BLOCK, "jungle_logs")), __PALETTES__(), - TILED_GLASS(new TaggedBlock<>(new GlassBlock(Properties.from(Blocks.GLASS))).withVanillaTags(ITaggable.TagType.BLOCK, "impermeable").withForgeTags("glass")), + TILED_GLASS(new TaggedBlock(new GlassBlock(Properties.from(Blocks.GLASS))).withVanillaTags(ITaggable.TagType.BLOCK, "impermeable").withForgeTags("glass")), FRAMED_GLASS(new CTGlassBlock(AllCTs.FRAMED_GLASS, false)), HORIZONTAL_FRAMED_GLASS(new HorizontalCTGlassBlock(AllCTs.HORIZONTAL_FRAMED_GLASS, AllCTs.FRAMED_GLASS, false)), VERTICAL_FRAMED_GLASS(new VerticalCTGlassBlock(AllCTs.VERTICAL_FRAMED_GLASS, false)), @@ -221,7 +221,7 @@ public enum AllBlocks { ACACIA_GLASS(new CTWindowBlock(AllCTs.ACACIA_GLASS, false)), IRON_GLASS(new CTWindowBlock(AllCTs.IRON_GLASS, false)), - TILED_GLASS_PANE(new TaggedBlock<>(new GlassPaneBlock(Properties.from(Blocks.GLASS))).withForgeTags("glass_panes")), + TILED_GLASS_PANE(new TaggedBlock(new GlassPaneBlock(Properties.from(Blocks.GLASS))).withForgeTags("glass_panes")), FRAMED_GLASS_PANE(new CTGlassPaneBlock(FRAMED_GLASS.get())), HORIZONTAL_FRAMED_GLASS_PANE(new CTGlassPaneBlock(HORIZONTAL_FRAMED_GLASS.get())), VERTICAL_FRAMED_GLASS_PANE(new CTGlassPaneBlock(VERTICAL_FRAMED_GLASS.get())), @@ -241,8 +241,8 @@ public enum AllBlocks { ANDESITE_LAYERS( new LayeredCTBlock(Properties.from(Blocks.ANDESITE), AllCTs.ANDESITE_LAYERS, AllCTs.POLISHED_ANDESITE)), - GABBRO(new TaggedBlock<>(new Block(Properties.from(Blocks.GRANITE))).withForgeTags("stone"), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), - POLISHED_GABBRO(new TaggedBlock<>(new Block(Properties.from(GABBRO.get()))).withForgeTags("stone")), + GABBRO(new TaggedBlock(new Block(Properties.from(Blocks.GRANITE))).withForgeTags("stone"), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), + POLISHED_GABBRO(new TaggedBlock(new Block(Properties.from(GABBRO.get()))).withForgeTags("stone")), GABBRO_BRICKS(new Block(Properties.from(GABBRO.get())), ComesWith.STAIRS, ComesWith.WALL), PAVED_GABBRO_BRICKS(new Block(Properties.from(GABBRO.get())), ComesWith.SLAB), INDENTED_GABBRO(new Block(Properties.from(GABBRO.get())), ComesWith.SLAB), @@ -250,31 +250,31 @@ public enum AllBlocks { MOSSY_GABBRO_BRICKS(new Block(Properties.from(GABBRO.get()))), GABBRO_LAYERS(new LayeredCTBlock(Properties.from(GABBRO.get()), AllCTs.GABBRO_LAYERS, AllCTs.POLISHED_GABBRO)), - DOLOMITE(new TaggedBlock<>(new Block(Properties.from(Blocks.QUARTZ_BLOCK))).withForgeTags("stone"), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), + DOLOMITE(new TaggedBlock(new Block(Properties.from(Blocks.QUARTZ_BLOCK))).withForgeTags("stone"), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), DOLOMITE_BRICKS(new Block(Properties.from(DOLOMITE.get()))), - POLISHED_DOLOMITE(new TaggedBlock<>(new Block(Properties.from(DOLOMITE.get()))).withForgeTags("stone")), + POLISHED_DOLOMITE(new TaggedBlock(new Block(Properties.from(DOLOMITE.get()))).withForgeTags("stone")), DOLOMITE_PILLAR(new RotatedPillarBlock(Properties.from(DOLOMITE.get()))), DOLOMITE_LAYERS( new LayeredCTBlock(Properties.from(DOLOMITE.get()), AllCTs.DOLOMITE_LAYERS, AllCTs.POLISHED_DOLOMITE)), LIMESAND(new FallingBlock(Properties.from(Blocks.SAND))), - LIMESTONE(new TaggedBlock<>(new Block(Properties.from(Blocks.SANDSTONE))).withForgeTags("stone"), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), + LIMESTONE(new TaggedBlock(new Block(Properties.from(Blocks.SANDSTONE))).withForgeTags("stone"), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), LIMESTONE_BRICKS(new Block(Properties.from(LIMESTONE.get())), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), - POLISHED_LIMESTONE(new TaggedBlock<>(new Block(Properties.from(LIMESTONE.get()))).withForgeTags("stone"), ComesWith.SLAB), + POLISHED_LIMESTONE(new TaggedBlock(new Block(Properties.from(LIMESTONE.get()))).withForgeTags("stone"), ComesWith.SLAB), LIMESTONE_PILLAR(new RotatedPillarBlock(Properties.from(LIMESTONE.get()))), LIMESTONE_LAYERS( new LayeredCTBlock(Properties.from(LIMESTONE.get()), AllCTs.LIMESTONE_LAYERS, AllCTs.POLISHED_LIMESTONE)), - WEATHERED_LIMESTONE(new TaggedBlock<>(new Block(Properties.from(Blocks.ANDESITE))).withForgeTags("stone"), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), + WEATHERED_LIMESTONE(new TaggedBlock(new Block(Properties.from(Blocks.ANDESITE))).withForgeTags("stone"), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), WEATHERED_LIMESTONE_BRICKS(new Block(Properties.from(WEATHERED_LIMESTONE.get())), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), - POLISHED_WEATHERED_LIMESTONE(new TaggedBlock<>(new Block(Properties.from(WEATHERED_LIMESTONE.get()))).withForgeTags("stone"), ComesWith.SLAB), + POLISHED_WEATHERED_LIMESTONE(new TaggedBlock(new Block(Properties.from(WEATHERED_LIMESTONE.get()))).withForgeTags("stone"), ComesWith.SLAB), WEATHERED_LIMESTONE_PILLAR(new RotatedPillarBlock(Properties.from(WEATHERED_LIMESTONE.get()))), WEATHERED_LIMESTONE_LAYERS(new LayeredCTBlock(Properties.from(WEATHERED_LIMESTONE.get()), AllCTs.WEATHERED_LIMESTONE_LAYERS, AllCTs.POLISHED_WEATHERED_LIMESTONE)), NATURAL_SCORIA(new ScoriaBlock()), - SCORIA(new TaggedBlock<>(new Block(Properties.from(Blocks.ANDESITE))).withForgeTags("stone"), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), - POLISHED_SCORIA(new TaggedBlock<>(new Block(Properties.from(SCORIA.get()))).withForgeTags("stone"), ComesWith.SLAB), + SCORIA(new TaggedBlock(new Block(Properties.from(Blocks.ANDESITE))).withForgeTags("stone"), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), + POLISHED_SCORIA(new TaggedBlock(new Block(Properties.from(SCORIA.get()))).withForgeTags("stone"), ComesWith.SLAB), SCORIA_BRICKS(new Block(Properties.from(SCORIA.get()))), SCORIA_LAYERS(new LayeredCTBlock(Properties.from(SCORIA.get()), AllCTs.SCORIA_LAYERS, AllCTs.POLISHED_SCORIA)), SCORIA_PILLAR(new RotatedPillarBlock(Properties.from(SCORIA.get()))), @@ -285,37 +285,37 @@ public enum AllBlocks { DARK_SCORIA_BRICKS(new Block(Properties.from(DARK_SCORIA.get())), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), __MATERIALS__(), - COPPER_ORE(new TaggedBlock<>(new OxidizingBlock(Properties.from(Blocks.IRON_ORE), 1)).withForgeTags("ores/copper")), - ZINC_ORE(new TaggedBlock<>(new Block(Properties.from(Blocks.GOLD_ORE).harvestLevel(2).harvestTool(ToolType.PICKAXE))).withForgeTags("ores/zinc")), - COPPER_BLOCK(new TaggedBlock<>(new OxidizingBlock(Properties.from(Blocks.IRON_BLOCK), 1 / 32f)).withForgeTags("storage_blocks/copper")), + COPPER_ORE(new TaggedBlock(new OxidizingBlock(Properties.from(Blocks.IRON_ORE), 1)).withForgeTags("ores/copper")), + ZINC_ORE(new TaggedBlock(new Block(Properties.from(Blocks.GOLD_ORE).harvestLevel(2).harvestTool(ToolType.PICKAXE))).withForgeTags("ores/zinc")), + COPPER_BLOCK(new TaggedBlock(new OxidizingBlock(Properties.from(Blocks.IRON_BLOCK), 1 / 32f)).withForgeTags("storage_blocks/copper")), COPPER_SHINGLES(new OxidizingBlock(Properties.from(Blocks.IRON_BLOCK), 1 / 32f)), - ZINC_BLOCK(new TaggedBlock<>(new Block(Properties.from(Blocks.IRON_BLOCK))).withForgeTags("storage_blocks/zinc")), - BRASS_BLOCK(new TaggedBlock<>(new Block(Properties.from(Blocks.IRON_BLOCK))).withForgeTags("storage_blocks/brass")), + ZINC_BLOCK(new TaggedBlock(new Block(Properties.from(Blocks.IRON_BLOCK))).withForgeTags("storage_blocks/zinc")), + BRASS_BLOCK(new TaggedBlock(new Block(Properties.from(Blocks.IRON_BLOCK))).withForgeTags("storage_blocks/brass")), ; private enum ComesWith { - WALL, FENCE, FENCE_GATE, SLAB, STAIRS; + WALL, FENCE, FENCE_GATE, SLAB, STAIRS } private static class CategoryTracker { static IModule currentModule; } - private TaggedBlock taggedBlock; - public TaggedBlock[] alsoRegistered; + private TaggedBlock taggedBlock; + public TaggedBlock[] alsoRegistered; public IModule module; AllBlocks() { CategoryTracker.currentModule = () -> Lang.asId(name()).replaceAll("__", ""); - taggedBlock = new TaggedBlock<>(null); + taggedBlock = new TaggedBlock(null); } AllBlocks(Block block, ComesWith... comesWith) { - this(new TaggedBlock<>(block), comesWith); + this(new TaggedBlock(block), comesWith); } - AllBlocks(TaggedBlock taggedBlockIn, ComesWith... comesWith){ + AllBlocks(TaggedBlock taggedBlockIn, ComesWith... comesWith){ this.taggedBlock = taggedBlockIn; this.taggedBlock.getBlock().setRegistryName(Create.ID, Lang.asId(name())); this.module = CategoryTracker.currentModule; @@ -334,7 +334,7 @@ public enum AllBlocks { continue; registry.register(block.get()); - for (TaggedBlock extra : block.alsoRegistered) + for (TaggedBlock extra : block.alsoRegistered) registry.register(extra.block); } } @@ -348,13 +348,13 @@ public enum AllBlocks { continue; registerAsItem(registry, def); - for (TaggedBlock extra : block.alsoRegistered) + for (TaggedBlock extra : block.alsoRegistered) registerAsItem(registry, extra.block); } } private static void registerAsItem(IForgeRegistry registry, Block blockIn) { - BlockItem blockItem = null; + BlockItem blockItem; Item.Properties standardItemProperties = AllItems.includeInItemGroup(); if (blockIn instanceof IHaveCustomBlockItem) @@ -381,25 +381,25 @@ public enum AllBlocks { return state.getBlock() == get(); } - private TaggedBlock makeRelatedBlock(Block block, ComesWith feature) { + private TaggedBlock makeRelatedBlock(Block block, ComesWith feature) { Properties properties = Properties.from(block); - TaggedBlock featured = null; + TaggedBlock featured; switch (feature) { case FENCE: - featured = new TaggedBlock<>(new FenceBlock(properties)).withVanillaTags(ITaggable.TagType.BLOCK, "fences"); + featured = new TaggedBlock(new FenceBlock(properties)).withVanillaTags(ITaggable.TagType.BLOCK, "fences"); break; case SLAB: - featured = new TaggedBlock<>(new SlabBlock(properties)).withVanillaTags(ITaggable.TagType.BLOCK, "slabs"); + featured = new TaggedBlock(new SlabBlock(properties)).withVanillaTags(ITaggable.TagType.BLOCK, "slabs"); break; case STAIRS: - featured = new TaggedBlock<>(new ProperStairsBlock(block)).withVanillaTags(ITaggable.TagType.BLOCK, "stairs"); + featured = new TaggedBlock(new ProperStairsBlock(block)).withVanillaTags(ITaggable.TagType.BLOCK, "stairs"); break; case WALL: - featured = new TaggedBlock<>(new WallBlock(properties)).withVanillaTags(ITaggable.TagType.BLOCK, "walls"); + featured = new TaggedBlock(new WallBlock(properties)).withVanillaTags(ITaggable.TagType.BLOCK, "walls"); break; case FENCE_GATE: - featured = new TaggedBlock<>(new FenceGateBlock(properties)); + featured = new TaggedBlock(new FenceGateBlock(properties)); break; default: return null; @@ -419,18 +419,18 @@ public enum AllBlocks { } } - public static class TaggedBlock implements ITaggable> { + public static class TaggedBlock implements ITaggable { //A wrapper around Block that allows for tags to be included. needed for datagen private Set tagSetBlock = new HashSet<>(); private Set tagSetBlockItem = new HashSet<>(); - private T block; + private Block block; - public TaggedBlock(T blockIn){ + public TaggedBlock(Block blockIn){ block = blockIn; } - public T getBlock() { + public Block getBlock() { return block; } diff --git a/src/main/java/com/simibubi/create/AllItems.java b/src/main/java/com/simibubi/create/AllItems.java index 2e6300b06..2df371fbb 100644 --- a/src/main/java/com/simibubi/create/AllItems.java +++ b/src/main/java/com/simibubi/create/AllItems.java @@ -5,11 +5,14 @@ import static com.simibubi.create.foundation.item.AllToolTypes.HOE; import static com.simibubi.create.foundation.item.AllToolTypes.PICKAXE; import static com.simibubi.create.foundation.item.AllToolTypes.SHOVEL; +import java.util.HashSet; +import java.util.Set; import java.util.function.Function; import com.simibubi.create.foundation.item.IHaveCustomItemModel; import com.simibubi.create.foundation.item.IItemWithColorHandler; import com.simibubi.create.foundation.utility.Lang; +import com.simibubi.create.foundation.utility.data.ITaggable; import com.simibubi.create.modules.IModule; import com.simibubi.create.modules.contraptions.GogglesItem; import com.simibubi.create.modules.contraptions.WrenchItem; @@ -39,6 +42,7 @@ import net.minecraft.item.Item; import net.minecraft.item.Item.Properties; import net.minecraft.item.ItemStack; import net.minecraft.item.Rarity; +import net.minecraft.util.ResourceLocation; import net.minecraft.item.SwordItem; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -51,14 +55,14 @@ import net.minecraftforge.registries.IForgeRegistry; public enum AllItems { __MATERIALS__(module()), - COPPER_NUGGET, - ZINC_NUGGET, - BRASS_NUGGET, - IRON_SHEET, - GOLD_SHEET, - COPPER_SHEET, - BRASS_SHEET, - LAPIS_PLATE, + COPPER_NUGGET(new TaggedItem().withForgeTags("nuggets/copper")), + ZINC_NUGGET(new TaggedItem().withForgeTags("nuggets/zinc")), + BRASS_NUGGET(new TaggedItem().withForgeTags("nuggets/brass")), + IRON_SHEET(new TaggedItem().withForgeTags("plates/iron")), + GOLD_SHEET(new TaggedItem().withForgeTags("plates/gold")), + COPPER_SHEET(new TaggedItem().withForgeTags("plates/copper")), + BRASS_SHEET(new TaggedItem().withForgeTags("plates/brass")), + LAPIS_PLATE(new TaggedItem().withForgeTags("plates/lapis")), CRUSHED_IRON, CRUSHED_GOLD, @@ -67,9 +71,9 @@ public enum AllItems { CRUSHED_BRASS, ANDESITE_ALLOY, - COPPER_INGOT, - ZINC_INGOT, - BRASS_INGOT, + COPPER_INGOT(new TaggedItem().withForgeTags("ingots/copper")), + ZINC_INGOT(new TaggedItem().withForgeTags("ingots/zinc")), + BRASS_INGOT(new TaggedItem().withForgeTags("ingots/brass")), SAND_PAPER(SandPaperItem::new), RED_SAND_PAPER(SandPaperItem::new), @@ -135,28 +139,32 @@ public enum AllItems { public IModule module; private Function specialProperties; - private Function itemSupplier; + private TaggedItem taggedItem; private Item item; - private AllItems(int moduleMarker) { - CategoryTracker.currentModule = new IModule() { - @Override - public String getModuleName() { - return Lang.asId(name()).replaceAll("__", ""); - } - }; + AllItems(int moduleMarker) { + CategoryTracker.currentModule = () -> Lang.asId(name()).replaceAll("__", ""); + taggedItem = new TaggedItem(null); } - private AllItems() { - this(Item::new); + AllItems(Function itemSupplier) { + this(new TaggedItem(itemSupplier), Function.identity()); } - private AllItems(Function itemSupplier) { - this(itemSupplier, Function.identity()); + AllItems(Function itemSupplier, Function specialProperties) { + this(new TaggedItem(itemSupplier), specialProperties); } - private AllItems(Function itemSupplier, Function specialProperties) { - this.itemSupplier = itemSupplier; + AllItems() { + this(new TaggedItem(Item::new)); + } + + AllItems(TaggedItem taggedItemIn) { + this(taggedItemIn, Function.identity()); + } + + AllItems(TaggedItem taggedItemIn, Function specialProperties) { + this.taggedItem = taggedItemIn; this.module = CategoryTracker.currentModule; this.specialProperties = specialProperties; } @@ -185,11 +193,11 @@ public enum AllItems { IForgeRegistry registry = event.getRegistry(); for (AllItems entry : values()) { - if (entry.itemSupplier == null) + if (entry.taggedItem == null || entry.taggedItem.getItemSupplier() == null) continue; - entry.item = entry.itemSupplier.apply(new Properties()); - entry.item = entry.itemSupplier.apply(entry.specialProperties.apply(defaultProperties(entry))); + entry.item = entry.taggedItem.getItemSupplier().apply(new Properties()); + entry.item = entry.taggedItem.getItemSupplier().apply(entry.specialProperties.apply(defaultProperties(entry))); entry.item.setRegistryName(Create.ID, Lang.asId(entry.name())); registry.register(entry.item); } @@ -201,6 +209,10 @@ public enum AllItems { return item; } + public TaggedItem getTaggable() { + return taggedItem; + } + public boolean typeOf(ItemStack stack) { return stack.getItem() == item; } @@ -209,6 +221,29 @@ public enum AllItems { return new ItemStack(item); } + public static class TaggedItem implements ITaggable { + + private Set tagSetItem = new HashSet<>(); + private Function itemSupplier; + + public TaggedItem(){ + this(Item::new); + } + + public TaggedItem(Function itemSupplierIn){ + this.itemSupplier = itemSupplierIn; + } + + public Function getItemSupplier() { + return itemSupplier; + } + + @Override + public Set getTagSet(TagType type) { + return tagSetItem; + } + } + // Client @OnlyIn(Dist.CLIENT) diff --git a/src/main/java/com/simibubi/create/CreateItemGroup.java b/src/main/java/com/simibubi/create/CreateItemGroup.java index e882e1647..645f1a814 100644 --- a/src/main/java/com/simibubi/create/CreateItemGroup.java +++ b/src/main/java/com/simibubi/create/CreateItemGroup.java @@ -46,7 +46,7 @@ public final class CreateItemGroup extends ItemGroup { continue; def.asItem().fillItemGroup(this, items); - for (AllBlocks.TaggedBlock alsoRegistered : block.alsoRegistered) + for (AllBlocks.TaggedBlock alsoRegistered : block.alsoRegistered) alsoRegistered.getBlock().asItem().fillItemGroup(this, items); } } diff --git a/src/main/java/com/simibubi/create/foundation/utility/data/AllItemsTagProvider.java b/src/main/java/com/simibubi/create/foundation/utility/data/AllItemsTagProvider.java new file mode 100644 index 000000000..21d2508e2 --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/utility/data/AllItemsTagProvider.java @@ -0,0 +1,67 @@ +package com.simibubi.create.foundation.utility.data; + +import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllItems; +import net.minecraft.block.Block; +import net.minecraft.data.BlockTagsProvider; +import net.minecraft.data.DataGenerator; +import net.minecraft.data.ItemTagsProvider; +import net.minecraft.item.Item; +import net.minecraft.tags.BlockTags; +import net.minecraft.tags.ItemTags; +import net.minecraft.tags.Tag; +import net.minecraft.util.ResourceLocation; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +public class AllItemsTagProvider extends ItemTagsProvider { + + static Map createdTags; + + protected AllItemsTagProvider(DataGenerator generatorIn) { + super(generatorIn); + } + + @Override + protected void registerTags() { + createdTags = new HashMap<>(); + + //first create all tags for AllBlocks as ItemBlocks + for (AllBlocks entry : + AllBlocks.values()) { + entry.getTaggable().getTagSet(ITaggable.TagType.ITEM).forEach(resLoc -> { + if (resLoc.getNamespace().equals("forge") && resLoc.getPath().contains("/")) + builder(new ResourceLocation(resLoc.getNamespace(), resLoc.getPath().split("/")[0])).add(new Tag<>(resLoc)); + builder(resLoc).add(entry.get().asItem()); + }); + if (entry.alsoRegistered == null) + continue; + + Arrays.stream(entry.alsoRegistered).forEach( + taggedBlock -> taggedBlock.getTagSet(ITaggable.TagType.ITEM).forEach( + resLoc -> builder(resLoc).add(taggedBlock.getBlock().asItem()))); + } + //now do the same for AllItems + for (AllItems entry : + AllItems.values()){ + entry.getTaggable().getTagSet(ITaggable.TagType.ITEM).forEach(resLoc -> { + if (resLoc.getNamespace().equals("forge") && resLoc.getPath().contains("/")) + builder(new ResourceLocation(resLoc.getNamespace(), resLoc.getPath().split("/")[0])).add(new Tag<>(resLoc)); + builder(resLoc).add(entry.get().asItem()); + }); + } + + } + + private Tag.Builder builder(ResourceLocation resLoc) { + return this.getBuilder(createdTags.computeIfAbsent(resLoc, ItemTags.Wrapper::new)); + + } + + @Override + public String getName() { + return "Create Item Tags"; + } +} 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 b09467276..2a0f91586 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 @@ -13,6 +13,7 @@ public class Generator { DataGenerator gen = event.getGenerator(); //gen.addProvider(AllSoundEvents.CUCKOO_PIG); gen.addProvider(new AllBlocksTagProvider(gen)); + gen.addProvider(new AllItemsTagProvider(gen)); } } diff --git a/src/main/java/com/simibubi/create/foundation/utility/data/ITaggable.java b/src/main/java/com/simibubi/create/foundation/utility/data/ITaggable.java index a99072332..7dc838549 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/data/ITaggable.java +++ b/src/main/java/com/simibubi/create/foundation/utility/data/ITaggable.java @@ -4,16 +4,14 @@ import net.minecraft.util.ResourceLocation; import java.util.*; -public interface ITaggable { +public interface ITaggable> { enum TagType { - BLOCK, ITEM; + BLOCK, ITEM } default T withTags(ResourceLocation... tagsIn) { - Collections.addAll(getTagSet(TagType.BLOCK), tagsIn); - Collections.addAll(getTagSet(TagType.ITEM), tagsIn); - return (T) this; + return this.withTags(TagType.BLOCK, tagsIn).withTags(TagType.ITEM, tagsIn); } default T withTags(TagType type, ResourceLocation... tagsIn) { From c6867532a3e37faff01b0c1cebdedb55f8868cdd Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Sat, 28 Mar 2020 23:34:26 +0100 Subject: [PATCH 10/11] Broken Bearings & World Gen - Made chassis range visualization a little less obnoxious - Fixed windmill bearings stopping on chunk reload - Fixed copper and zinc spawning in increased amounts anywhere outside of the biomes they are supposed to do so - Introduced a brass ingot mixing recipe - Fixed redstone links getting power from unloaded links --- .../foundation/world/AllWorldFeatures.java | 18 +++++++++++++++++ .../create/foundation/world/OreFeature.java | 6 +++--- .../contraptions/ChassisRangeDisplay.java | 8 +++++--- .../bearing/MechanicalBearingTileEntity.java | 11 +++++++++- .../logistics/RedstoneLinkNetworkHandler.java | 8 +++++++- .../create/recipes/mixing/brass_ingot.json | 20 +++++++++++++++++++ 6 files changed, 63 insertions(+), 8 deletions(-) create mode 100644 src/main/resources/data/create/recipes/mixing/brass_ingot.json 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 53240e1af..2f835e129 100644 --- a/src/main/java/com/simibubi/create/foundation/world/AllWorldFeatures.java +++ b/src/main/java/com/simibubi/create/foundation/world/AllWorldFeatures.java @@ -55,6 +55,24 @@ public enum AllWorldFeatures { biome.addFeature(entry.feature.getGenerationStage(), createFeature.get()); } } + +// // Debug contained ore features +// for (Biome biome : ForgeRegistries.BIOMES) { +// Debug.markTemporary(); +// System.out.println(biome.getRegistryName().getPath() + " has the following features:"); +// for (ConfiguredFeature configuredFeature : biome.getFeatures(Decoration.UNDERGROUND_ORES)) { +// IFeatureConfig config = configuredFeature.config; +// if (!(config instanceof DecoratedFeatureConfig)) +// continue; +// DecoratedFeatureConfig decoConf = (DecoratedFeatureConfig) config; +// if (!(decoConf.feature.config instanceof OreFeatureConfig)) +// continue; +// OreFeatureConfig oreConf = (OreFeatureConfig) decoConf.feature.config; +// System.out.println(configuredFeature.feature.getRegistryName().getPath()); +// System.out.println(oreConf.state.getBlock().getRegistryName().getPath()); +// System.out.println("--"); +// } +// } } public static void fillConfig(ForgeConfigSpec.Builder builder) { diff --git a/src/main/java/com/simibubi/create/foundation/world/OreFeature.java b/src/main/java/com/simibubi/create/foundation/world/OreFeature.java index 74c06e339..5c747c00b 100644 --- a/src/main/java/com/simibubi/create/foundation/world/OreFeature.java +++ b/src/main/java/com/simibubi/create/foundation/world/OreFeature.java @@ -28,7 +28,7 @@ public abstract class OreFeature extends ConfigBase protected ConfigInt maxHeight; private Block block; - private Biome.Category biomeWhitelist; + private Biome.Category specificCategory; public OreFeature(Block block, int clusterSize) { this.block = block; @@ -47,7 +47,7 @@ public abstract class OreFeature extends ConfigBase } public OreFeature inBiomes(Biome.Category category) { - biomeWhitelist = category; + specificCategory = category; return this; } @@ -58,7 +58,7 @@ public abstract class OreFeature extends ConfigBase @Override public Optional> createFeature(Biome biome) { - if (biomeWhitelist != null && biome.getCategory() == biomeWhitelist) + if (specificCategory != null && biome.getCategory() != specificCategory) return Optional.empty(); if (!canGenerate()) return Optional.empty(); diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ChassisRangeDisplay.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ChassisRangeDisplay.java index 964e1fd06..b8a1b2e42 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ChassisRangeDisplay.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/ChassisRangeDisplay.java @@ -109,7 +109,7 @@ public class ChassisRangeDisplay { boolean ctrl = AllKeys.ctrlDown(); ChassisTileEntity chassisTileEntity = (ChassisTileEntity) tileEntity; - + if (ctrl) { GroupEntry existingGroupForPos = getExistingGroupForPos(pos); if (existingGroupForPos != null) { @@ -119,7 +119,7 @@ public class ChassisRangeDisplay { return; } } - + if (!entries.containsKey(pos) || ctrl) display(chassisTileEntity); else { @@ -196,9 +196,11 @@ public class ChassisRangeDisplay { float alpha = timer > 20 ? .5f : timer / 40f; GlStateManager.color4f(1, .7f, 0, alpha); Set includedPositions = entry.includedPositions; + GlStateManager.depthMask(false); for (BlockPos pos : includedPositions) - TessellatorHelper.cube(Tessellator.getInstance().getBuffer(), pos, size, 1 / 1024f, true, false); + TessellatorHelper.cube(Tessellator.getInstance().getBuffer(), pos, size, 1 / 16f - 1 / 64f, true, false); TessellatorHelper.draw(); + GlStateManager.depthMask(true); } private static GroupEntry getExistingGroupForPos(BlockPos pos) { diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/MechanicalBearingTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/MechanicalBearingTileEntity.java index 0ac222e99..06491ad09 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/MechanicalBearingTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/contraptions/bearing/MechanicalBearingTileEntity.java @@ -34,6 +34,7 @@ public class MechanicalBearingTileEntity extends GeneratingKineticTileEntity imp protected boolean assembleNextTick; protected float clientAngleDiff; protected ScrollOptionBehaviour movementMode; + protected float lastGeneratedSpeed; public MechanicalBearingTileEntity() { super(AllTileEntities.MECHANICAL_BEARING.type); @@ -92,7 +93,7 @@ public class MechanicalBearingTileEntity extends GeneratingKineticTileEntity imp if (!running || !isWindmill) return 0; if (movedContraption == null) - return 0; + return lastGeneratedSpeed; int sails = ((BearingContraption) movedContraption.getContraption()).getSailBlocks() / 8; return MathHelper.clamp(sails, 1, 16); } @@ -102,6 +103,7 @@ public class MechanicalBearingTileEntity extends GeneratingKineticTileEntity imp tag.putBoolean("Running", running); tag.putBoolean("Windmill", isWindmill); tag.putFloat("Angle", angle); + tag.putFloat("LastGenerated", lastGeneratedSpeed); return super.write(tag); } @@ -110,6 +112,7 @@ public class MechanicalBearingTileEntity extends GeneratingKineticTileEntity imp running = tag.getBoolean("Running"); isWindmill = tag.getBoolean("Windmill"); angle = tag.getFloat("Angle"); + lastGeneratedSpeed = tag.getFloat("LastGenerated"); super.read(tag); } @@ -169,6 +172,12 @@ public class MechanicalBearingTileEntity extends GeneratingKineticTileEntity imp sendData(); updateGeneratedRotation(); } + + @Override + public void updateGeneratedRotation() { + super.updateGeneratedRotation(); + lastGeneratedSpeed = getGeneratedSpeed(); + } public void disassemble() { if (!running) diff --git a/src/main/java/com/simibubi/create/modules/logistics/RedstoneLinkNetworkHandler.java b/src/main/java/com/simibubi/create/modules/logistics/RedstoneLinkNetworkHandler.java index 71fd9a820..f8c96a725 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/RedstoneLinkNetworkHandler.java +++ b/src/main/java/com/simibubi/create/modules/logistics/RedstoneLinkNetworkHandler.java @@ -16,6 +16,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompoundNBT; import net.minecraft.world.IWorld; +import net.minecraft.world.World; public class RedstoneLinkNetworkHandler { @@ -93,7 +94,12 @@ public class RedstoneLinkNetworkHandler { iterator.remove(); continue; } - if (actor.getWorld().getTileEntity(other.tileEntity.getPos()) != other.tileEntity) { + World world = actor.getWorld(); + if (world.isBlockPresent(other.tileEntity.getPos())) { + iterator.remove(); + continue; + } + if (world.getTileEntity(other.tileEntity.getPos()) != other.tileEntity) { iterator.remove(); continue; } diff --git a/src/main/resources/data/create/recipes/mixing/brass_ingot.json b/src/main/resources/data/create/recipes/mixing/brass_ingot.json new file mode 100644 index 000000000..cf03e301b --- /dev/null +++ b/src/main/resources/data/create/recipes/mixing/brass_ingot.json @@ -0,0 +1,20 @@ +{ + "type": "create:mixing", + "ingredients": [ + { + "tag": "forge:ingots/copper" + }, + { + "tag": "forge:ingots/zinc" + }, + { + "item": "minecraft:blaze_powder" + } + ], + "results": [ + { + "item": "create:brass_ingot", + "count": 2 + } + ] +} \ No newline at end of file From 9a77081f3acf9c26a484b257f74f067fd8d19a4b Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Sun, 29 Mar 2020 00:48:18 +0100 Subject: [PATCH 11/11] Recipe tweaks - Gunpowder can now be multiplied in the mixer - Metal blocks can now be crushed back into the crushed ores. (Inefficient enough to avoid any loops) - Crushing wool in the millstone is less effective --- .../utility/data/AllItemsTagProvider.java | 22 ++++++++--------- .../foundation/utility/data/ITaggable.java | 7 ++++-- .../create/recipes/crushing/brass_block.json | 15 ++++++++++++ .../create/recipes/crushing/copper_block.json | 15 ++++++++++++ .../data/create/recipes/crushing/wool.json | 20 ++++++++++++++++ .../create/recipes/crushing/zinc_block.json | 15 ++++++++++++ .../data/create/recipes/milling/wool.json | 7 +----- .../data/create/recipes/mixing/gunpowder.json | 24 +++++++++++++++++++ 8 files changed, 105 insertions(+), 20 deletions(-) create mode 100644 src/main/resources/data/create/recipes/crushing/brass_block.json create mode 100644 src/main/resources/data/create/recipes/crushing/copper_block.json create mode 100644 src/main/resources/data/create/recipes/crushing/wool.json create mode 100644 src/main/resources/data/create/recipes/crushing/zinc_block.json create mode 100644 src/main/resources/data/create/recipes/mixing/gunpowder.json diff --git a/src/main/java/com/simibubi/create/foundation/utility/data/AllItemsTagProvider.java b/src/main/java/com/simibubi/create/foundation/utility/data/AllItemsTagProvider.java index 21d2508e2..0e8d74417 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/data/AllItemsTagProvider.java +++ b/src/main/java/com/simibubi/create/foundation/utility/data/AllItemsTagProvider.java @@ -1,21 +1,19 @@ package com.simibubi.create.foundation.utility.data; -import com.simibubi.create.AllBlocks; -import com.simibubi.create.AllItems; -import net.minecraft.block.Block; -import net.minecraft.data.BlockTagsProvider; -import net.minecraft.data.DataGenerator; -import net.minecraft.data.ItemTagsProvider; -import net.minecraft.item.Item; -import net.minecraft.tags.BlockTags; -import net.minecraft.tags.ItemTags; -import net.minecraft.tags.Tag; -import net.minecraft.util.ResourceLocation; - import java.util.Arrays; import java.util.HashMap; import java.util.Map; +import com.simibubi.create.AllBlocks; +import com.simibubi.create.AllItems; + +import net.minecraft.data.DataGenerator; +import net.minecraft.data.ItemTagsProvider; +import net.minecraft.item.Item; +import net.minecraft.tags.ItemTags; +import net.minecraft.tags.Tag; +import net.minecraft.util.ResourceLocation; + public class AllItemsTagProvider extends ItemTagsProvider { static Map createdTags; diff --git a/src/main/java/com/simibubi/create/foundation/utility/data/ITaggable.java b/src/main/java/com/simibubi/create/foundation/utility/data/ITaggable.java index 7dc838549..37c3ca525 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/data/ITaggable.java +++ b/src/main/java/com/simibubi/create/foundation/utility/data/ITaggable.java @@ -1,8 +1,10 @@ package com.simibubi.create.foundation.utility.data; -import net.minecraft.util.ResourceLocation; +import java.util.Arrays; +import java.util.Collections; +import java.util.Set; -import java.util.*; +import net.minecraft.util.ResourceLocation; public interface ITaggable> { @@ -14,6 +16,7 @@ public interface ITaggable> { return this.withTags(TagType.BLOCK, tagsIn).withTags(TagType.ITEM, tagsIn); } + @SuppressWarnings("unchecked") default T withTags(TagType type, ResourceLocation... tagsIn) { Collections.addAll(getTagSet(type), tagsIn); return (T) this; diff --git a/src/main/resources/data/create/recipes/crushing/brass_block.json b/src/main/resources/data/create/recipes/crushing/brass_block.json new file mode 100644 index 000000000..0ed80ebec --- /dev/null +++ b/src/main/resources/data/create/recipes/crushing/brass_block.json @@ -0,0 +1,15 @@ +{ + "type": "create:crushing", + "ingredients": [ + { + "tag": "forge:storage_blocks/brass" + } + ], + "results": [ + { + "item": "create:crushed_brass", + "count": 5 + } + ], + "processingTime": 400 +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crushing/copper_block.json b/src/main/resources/data/create/recipes/crushing/copper_block.json new file mode 100644 index 000000000..74d87c1ec --- /dev/null +++ b/src/main/resources/data/create/recipes/crushing/copper_block.json @@ -0,0 +1,15 @@ +{ + "type": "create:crushing", + "ingredients": [ + { + "tag": "forge:storage_blocks/copper" + } + ], + "results": [ + { + "item": "create:crushed_copper", + "count": 5 + } + ], + "processingTime": 400 +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crushing/wool.json b/src/main/resources/data/create/recipes/crushing/wool.json new file mode 100644 index 000000000..c5c7a7e7c --- /dev/null +++ b/src/main/resources/data/create/recipes/crushing/wool.json @@ -0,0 +1,20 @@ +{ + "type": "create:crushing", + "ingredients": [ + { + "tag": "minecraft:wool" + } + ], + "results": [ + { + "item": "minecraft:string", + "count": 2 + }, + { + "item": "minecraft:string", + "count": 1, + "chance": 0.5 + } + ], + "processingTime": 100 +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crushing/zinc_block.json b/src/main/resources/data/create/recipes/crushing/zinc_block.json new file mode 100644 index 000000000..4a467f028 --- /dev/null +++ b/src/main/resources/data/create/recipes/crushing/zinc_block.json @@ -0,0 +1,15 @@ +{ + "type": "create:crushing", + "ingredients": [ + { + "tag": "forge:storage_blocks/zinc" + } + ], + "results": [ + { + "item": "create:crushed_zinc", + "count": 5 + } + ], + "processingTime": 400 +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/milling/wool.json b/src/main/resources/data/create/recipes/milling/wool.json index 05984e870..26f95f7be 100644 --- a/src/main/resources/data/create/recipes/milling/wool.json +++ b/src/main/resources/data/create/recipes/milling/wool.json @@ -8,12 +8,7 @@ "results": [ { "item": "minecraft:string", - "count": 2 - }, - { - "item": "minecraft:string", - "count": 2, - "chance": 0.5 + "count": 1 } ], "processingTime": 100 diff --git a/src/main/resources/data/create/recipes/mixing/gunpowder.json b/src/main/resources/data/create/recipes/mixing/gunpowder.json new file mode 100644 index 000000000..f70301982 --- /dev/null +++ b/src/main/resources/data/create/recipes/mixing/gunpowder.json @@ -0,0 +1,24 @@ +{ + "type": "create:mixing", + "ingredients": [ + { + "tag": "minecraft:coals" + }, + { + "item": "create:crushed_zinc" + }, + { + "item": "minecraft:gunpowder" + }, + { + "item": "minecraft:blaze_powder", + "return_chance": 0.75 + } + ], + "results": [ + { + "item": "minecraft:gunpowder", + "count": 2 + } + ] +} \ No newline at end of file