From ca355d1ec31e418152bdb23083ded6574d8a0f34 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Fri, 13 Sep 2019 18:36:18 +0200 Subject: [PATCH] Back to Belt - Mechanical Belts can now be dyed with any color - Added the Mechanical Press with a new Pressing recipe type - Added the belt support, purely decorational - Added the FlexpeaterTM - Added some unspectacular ingredients and recipes --- .../java/com/simibubi/create/AllBlocks.java | 25 ++- .../java/com/simibubi/create/AllItems.java | 28 ++- .../java/com/simibubi/create/AllPackets.java | 2 + .../java/com/simibubi/create/AllRecipes.java | 6 + .../com/simibubi/create/AllTileEntities.java | 8 + .../com/simibubi/create/CreateClient.java | 1 + .../block/IBlockWithColorHandler.java | 9 + .../block/IBlockWithScrollableValue.java | 4 +- .../base/HorizontalKineticBlock.java | 24 ++- .../contraptions/generators/MotorBlock.java | 2 +- .../receivers/MechanicalPressBlock.java | 171 ++++++++++++++++++ .../receivers/MechanicalPressTileEntity.java | 110 +++++++++++ .../MechanicalPressTileEntityRenderer.java | 63 +++++++ .../receivers/PressingRecipe.java | 28 +++ .../constructs/AbstractChassisBlock.java | 2 +- .../constructs/RotationChassisBlock.java | 4 +- .../relays/belt/AllBeltAttachments.java | 1 + .../contraptions/relays/belt/BeltBlock.java | 20 ++ .../relays/belt/BeltSupportBlock.java | 35 ++++ .../relays/belt/BeltTileEntity.java | 21 +++ .../relays/belt/BeltTileEntityRenderer.java | 18 +- .../diodes/ConfigureFlexpeaterPacket.java | 37 ++++ .../block/diodes/FlexpeaterBlock.java | 99 ++++++++++ .../block/diodes/FlexpeaterTileEntity.java | 132 ++++++++++++++ .../diodes/FlexpeaterTileEntityRenderer.java | 83 +++++++++ .../{ => diodes}/PulseRepeaterBlock.java | 12 +- .../create/blockstates/belt_support.json | 5 + .../assets/create/blockstates/flexpeater.json | 24 +++ .../blockstates/flexpeater_indicator.json | 5 + .../create/blockstates/mechanical_press.json | 14 ++ .../blockstates/mechanical_press_head.json | 14 ++ .../resources/assets/create/lang/en_us.json | 7 + .../create/models/block/belt_support.json | 36 ++++ .../create/models/block/flexpeater.json | 63 +++++++ .../models/block/flexpeater_indicator.json | 19 ++ .../models/block/flexpeater_powered.json | 7 + .../block/flexpeater_powered_powering.json | 6 + .../models/block/flexpeater_powering.json | 6 + .../models/block/mechanical_press_base.json | 59 ++++++ .../models/block/mechanical_press_head.json | 87 +++++++++ .../create/models/item/belt_support.json | 15 ++ .../assets/create/models/item/dough.json | 6 + .../assets/create/models/item/flexpeater.json | 13 ++ .../assets/create/models/item/flour.json | 6 + .../assets/create/models/item/iron_sheet.json | 6 + .../create/models/item/mechanical_press.json | 151 ++++++++++++++++ .../assets/create/models/item/propeller.json | 6 + .../assets/create/textures/block/belt.png | Bin 322 -> 385 bytes .../create/textures/block/belt_animated.png | Bin 1185 -> 1127 bytes .../textures/block/belt_support_side.png | Bin 0 -> 491 bytes .../textures/block/brass_casing_side.png | Bin 0 -> 486 bytes .../create/textures/block/flexpeater_item.png | Bin 0 -> 527 bytes .../create/textures/block/flexpeater_off.png | Bin 0 -> 526 bytes .../create/textures/block/flexpeater_on.png | Bin 0 -> 529 bytes .../block/mechanical_press_bottom.png | Bin 0 -> 549 bytes .../textures/block/mechanical_press_head.png | Bin 0 -> 462 bytes .../textures/block/mechanical_press_pole.png | Bin 0 -> 542 bytes .../textures/block/mechanical_press_top.png | Bin 0 -> 528 bytes .../assets/create/textures/block/old_belt.png | Bin 0 -> 1156 bytes .../assets/create/textures/item/dough.png | Bin 0 -> 345 bytes .../assets/create/textures/item/flour.png | Bin 0 -> 348 bytes .../create/textures/item/iron_sheet.png | Bin 0 -> 448 bytes .../assets/create/textures/item/propeller.png | Bin 0 -> 382 bytes .../create/loot_tables/blocks/flexpeater.json | 19 ++ .../loot_tables/blocks/mechanical_press.json | 19 ++ .../data/create/recipes/crafting/dough.json | 21 +++ .../create/recipes/crafting/encased_fan.json | 2 +- .../create/recipes/crafting/flexpeater.json | 31 ++++ .../recipes/crafting/mechanical_press.json | 35 ++++ .../create/recipes/crafting/propeller.json | 26 +++ .../data/create/recipes/crushing/wheat.json | 26 +++ .../create/recipes/pressing/iron_ingot.json | 16 ++ .../data/create/recipes/smelting/bread.json | 15 ++ .../palettes => smelting}/dolomite.json | 0 .../palettes => smelting}/gabbro.json | 0 .../palettes => smelting}/limestone.json | 0 .../data/create/recipes/splashing/flour.json | 16 ++ 77 files changed, 1705 insertions(+), 21 deletions(-) create mode 100644 src/main/java/com/simibubi/create/foundation/block/IBlockWithColorHandler.java create mode 100644 src/main/java/com/simibubi/create/modules/contraptions/receivers/MechanicalPressBlock.java create mode 100644 src/main/java/com/simibubi/create/modules/contraptions/receivers/MechanicalPressTileEntity.java create mode 100644 src/main/java/com/simibubi/create/modules/contraptions/receivers/MechanicalPressTileEntityRenderer.java create mode 100644 src/main/java/com/simibubi/create/modules/contraptions/receivers/PressingRecipe.java create mode 100644 src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltSupportBlock.java create mode 100644 src/main/java/com/simibubi/create/modules/logistics/block/diodes/ConfigureFlexpeaterPacket.java create mode 100644 src/main/java/com/simibubi/create/modules/logistics/block/diodes/FlexpeaterBlock.java create mode 100644 src/main/java/com/simibubi/create/modules/logistics/block/diodes/FlexpeaterTileEntity.java create mode 100644 src/main/java/com/simibubi/create/modules/logistics/block/diodes/FlexpeaterTileEntityRenderer.java rename src/main/java/com/simibubi/create/modules/logistics/block/{ => diodes}/PulseRepeaterBlock.java (84%) create mode 100644 src/main/resources/assets/create/blockstates/belt_support.json create mode 100644 src/main/resources/assets/create/blockstates/flexpeater.json create mode 100644 src/main/resources/assets/create/blockstates/flexpeater_indicator.json create mode 100644 src/main/resources/assets/create/blockstates/mechanical_press.json create mode 100644 src/main/resources/assets/create/blockstates/mechanical_press_head.json create mode 100644 src/main/resources/assets/create/models/block/belt_support.json create mode 100644 src/main/resources/assets/create/models/block/flexpeater.json create mode 100644 src/main/resources/assets/create/models/block/flexpeater_indicator.json create mode 100644 src/main/resources/assets/create/models/block/flexpeater_powered.json create mode 100644 src/main/resources/assets/create/models/block/flexpeater_powered_powering.json create mode 100644 src/main/resources/assets/create/models/block/flexpeater_powering.json create mode 100644 src/main/resources/assets/create/models/block/mechanical_press_base.json create mode 100644 src/main/resources/assets/create/models/block/mechanical_press_head.json create mode 100644 src/main/resources/assets/create/models/item/belt_support.json create mode 100644 src/main/resources/assets/create/models/item/dough.json create mode 100644 src/main/resources/assets/create/models/item/flexpeater.json create mode 100644 src/main/resources/assets/create/models/item/flour.json create mode 100644 src/main/resources/assets/create/models/item/iron_sheet.json create mode 100644 src/main/resources/assets/create/models/item/mechanical_press.json create mode 100644 src/main/resources/assets/create/models/item/propeller.json create mode 100644 src/main/resources/assets/create/textures/block/belt_support_side.png create mode 100644 src/main/resources/assets/create/textures/block/brass_casing_side.png create mode 100644 src/main/resources/assets/create/textures/block/flexpeater_item.png create mode 100644 src/main/resources/assets/create/textures/block/flexpeater_off.png create mode 100644 src/main/resources/assets/create/textures/block/flexpeater_on.png create mode 100644 src/main/resources/assets/create/textures/block/mechanical_press_bottom.png create mode 100644 src/main/resources/assets/create/textures/block/mechanical_press_head.png create mode 100644 src/main/resources/assets/create/textures/block/mechanical_press_pole.png create mode 100644 src/main/resources/assets/create/textures/block/mechanical_press_top.png create mode 100644 src/main/resources/assets/create/textures/block/old_belt.png create mode 100644 src/main/resources/assets/create/textures/item/dough.png create mode 100644 src/main/resources/assets/create/textures/item/flour.png create mode 100644 src/main/resources/assets/create/textures/item/iron_sheet.png create mode 100644 src/main/resources/assets/create/textures/item/propeller.png create mode 100644 src/main/resources/data/create/loot_tables/blocks/flexpeater.json create mode 100644 src/main/resources/data/create/loot_tables/blocks/mechanical_press.json create mode 100644 src/main/resources/data/create/recipes/crafting/dough.json create mode 100644 src/main/resources/data/create/recipes/crafting/flexpeater.json create mode 100644 src/main/resources/data/create/recipes/crafting/mechanical_press.json create mode 100644 src/main/resources/data/create/recipes/crafting/propeller.json create mode 100644 src/main/resources/data/create/recipes/crushing/wheat.json create mode 100644 src/main/resources/data/create/recipes/pressing/iron_ingot.json create mode 100644 src/main/resources/data/create/recipes/smelting/bread.json rename src/main/resources/data/create/recipes/{crafting/palettes => smelting}/dolomite.json (100%) rename src/main/resources/data/create/recipes/{crafting/palettes => smelting}/gabbro.json (100%) rename src/main/resources/data/create/recipes/{crafting/palettes => smelting}/limestone.json (100%) create mode 100644 src/main/resources/data/create/recipes/splashing/flour.json diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index d363e89e4..06bd7e32a 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -1,5 +1,6 @@ package com.simibubi.create; +import com.simibubi.create.foundation.block.IBlockWithColorHandler; import com.simibubi.create.foundation.block.IWithoutBlockItem; import com.simibubi.create.foundation.block.ProperStairsBlock; import com.simibubi.create.foundation.block.RenderUtilityAxisBlock; @@ -12,6 +13,7 @@ import com.simibubi.create.modules.contraptions.receivers.CrushingWheelControlle import com.simibubi.create.modules.contraptions.receivers.DrillBlock; import com.simibubi.create.modules.contraptions.receivers.EncasedFanBlock; import com.simibubi.create.modules.contraptions.receivers.HarvesterBlock; +import com.simibubi.create.modules.contraptions.receivers.MechanicalPressBlock; import com.simibubi.create.modules.contraptions.receivers.TurntableBlock; import com.simibubi.create.modules.contraptions.receivers.constructs.MechanicalBearingBlock; import com.simibubi.create.modules.contraptions.receivers.constructs.MechanicalPistonBlock; @@ -29,15 +31,17 @@ import com.simibubi.create.modules.contraptions.relays.GearshiftBlock; import com.simibubi.create.modules.contraptions.relays.ShaftBlock; import com.simibubi.create.modules.contraptions.relays.ShaftHalfBlock; import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock; +import com.simibubi.create.modules.contraptions.relays.belt.BeltSupportBlock; import com.simibubi.create.modules.gardens.CocoaLogBlock; import com.simibubi.create.modules.logistics.block.BeltFunnelBlock; import com.simibubi.create.modules.logistics.block.EntityDetectorBlock; import com.simibubi.create.modules.logistics.block.ExtractorBlock; import com.simibubi.create.modules.logistics.block.FlexcrateBlock; import com.simibubi.create.modules.logistics.block.LinkedExtractorBlock; -import com.simibubi.create.modules.logistics.block.PulseRepeaterBlock; import com.simibubi.create.modules.logistics.block.RedstoneBridgeBlock; import com.simibubi.create.modules.logistics.block.StockswitchBlock; +import com.simibubi.create.modules.logistics.block.diodes.FlexpeaterBlock; +import com.simibubi.create.modules.logistics.block.diodes.PulseRepeaterBlock; import com.simibubi.create.modules.schematics.block.CreativeCrateBlock; import com.simibubi.create.modules.schematics.block.SchematicTableBlock; import com.simibubi.create.modules.schematics.block.SchematicannonBlock; @@ -54,8 +58,12 @@ import net.minecraft.block.FenceGateBlock; import net.minecraft.block.RotatedPillarBlock; import net.minecraft.block.SlabBlock; import net.minecraft.block.WallBlock; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.color.BlockColors; import net.minecraft.item.BlockItem; import net.minecraft.item.Item; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.registries.IForgeRegistry; public enum AllBlocks { @@ -77,6 +85,7 @@ public enum AllBlocks { GEARSHIFT(new GearshiftBlock()), GEARBOX(new GearboxBlock()), BELT(new BeltBlock()), + BELT_SUPPORT(new BeltSupportBlock()), BELT_PULLEY(new RenderUtilityAxisBlock()), BELT_ANIMATION(new RenderUtilityBlock()), MOTOR(new MotorBlock()), @@ -87,6 +96,8 @@ public enum AllBlocks { SHAFT_HALF(new ShaftHalfBlock()), CRUSHING_WHEEL(new CrushingWheelBlock()), CRUSHING_WHEEL_CONTROLLER(new CrushingWheelControllerBlock()), + MECHANICAL_PRESS(new MechanicalPressBlock()), + MECHANICAL_PRESS_HEAD(new MechanicalPressBlock.Head()), MECHANICAL_PISTON(new MechanicalPistonBlock(false)), STICKY_MECHANICAL_PISTON(new MechanicalPistonBlock(true)), MECHANICAL_PISTON_HEAD(new MechanicalPistonHeadBlock()), @@ -108,6 +119,8 @@ public enum AllBlocks { BELT_FUNNEL(new BeltFunnelBlock()), ENTITY_DETECTOR(new EntityDetectorBlock()), PULSE_REPEATER(new PulseRepeaterBlock()), + FLEXPEATER(new FlexpeaterBlock()), + FLEXPEATER_INDICATOR(new RenderUtilityBlock()), __CURIOSITIES__(), SYMMETRY_PLANE(new PlaneSymmetryBlock()), @@ -240,4 +253,14 @@ public enum AllBlocks { block.getRegistryName().getPath() + "_" + feature.name().toLowerCase()); } + @OnlyIn(Dist.CLIENT) + public static void registerColorHandlers() { + BlockColors blockColors = Minecraft.getInstance().getBlockColors(); + for (AllBlocks block : values()) { + if (block.block instanceof IBlockWithColorHandler) { + blockColors.register(((IBlockWithColorHandler) block.block).getColorHandler(), block.block); + } + } + } + } diff --git a/src/main/java/com/simibubi/create/AllItems.java b/src/main/java/com/simibubi/create/AllItems.java index a25b26aef..6df8f4638 100644 --- a/src/main/java/com/simibubi/create/AllItems.java +++ b/src/main/java/com/simibubi/create/AllItems.java @@ -41,14 +41,15 @@ public enum AllItems { new BuilderGunItem(new Properties().setTEISR(() -> () -> renderUsing(AllItemRenderers.BUILDER_GUN)))), __MATERIALS__(), - ANDESITE_ALLOY_CUBE(new Item(standardItemProperties())), - BLAZE_BRASS_CUBE(new Item(standardItemProperties())), - CHORUS_CHROME_CUBE(new Item(standardItemProperties().rarity(Rarity.UNCOMMON))), - SHADOW_STEEL_CUBE(new Item(standardItemProperties().rarity(Rarity.UNCOMMON))), - ROSE_QUARTZ(new Item(standardItemProperties())), - REFINED_ROSE_QUARTZ(new Item(standardItemProperties())), + IRON_SHEET(ingredient()), + ANDESITE_ALLOY_CUBE(ingredient()), + BLAZE_BRASS_CUBE(ingredient()), + CHORUS_CHROME_CUBE(ingredient(Rarity.UNCOMMON)), + SHADOW_STEEL_CUBE(ingredient(Rarity.UNCOMMON)), + ROSE_QUARTZ(ingredient()), + REFINED_ROSE_QUARTZ(ingredient()), CHROMATIC_COMPOUND_CUBE(new ChromaticCompoundCubeItem(standardItemProperties().rarity(Rarity.UNCOMMON))), - REFINED_RADIANCE_CUBE(new Item(standardItemProperties().rarity(Rarity.RARE))), + REFINED_RADIANCE_CUBE(ingredient(Rarity.RARE)), // BLAZING_PICKAXE(new BlazingToolItem(1, -2.8F, standardProperties(), PICKAXE)), // BLAZING_SHOVEL(new BlazingToolItem(1.5F, -3.0F, standardProperties(), SHOVEL)), @@ -71,9 +72,12 @@ public enum AllItems { EMPTY_BLUEPRINT(new Item(standardItemProperties().maxStackSize(1))), BLUEPRINT_AND_QUILL(new SchematicAndQuillItem(standardItemProperties().maxStackSize(1))), BLUEPRINT(new SchematicItem(standardItemProperties())), - + __CONTRAPTIONS__(), BELT_CONNECTOR(new BeltItem(standardItemProperties())), + FLOUR(ingredient()), + DOUGH(ingredient()), + PROPELLER(ingredient()), ; @@ -105,6 +109,14 @@ public enum AllItems { return new Properties().group(Create.creativeTab); } + private static Item ingredient() { + return ingredient(Rarity.COMMON); + } + + private static Item ingredient(Rarity rarity) { + return new Item(standardItemProperties().rarity(rarity)); + } + public static void registerItems(IForgeRegistry iForgeRegistry) { for (AllItems item : values()) { if (item.get() == null) diff --git a/src/main/java/com/simibubi/create/AllPackets.java b/src/main/java/com/simibubi/create/AllPackets.java index 9b10e1727..d6f1dccfa 100644 --- a/src/main/java/com/simibubi/create/AllPackets.java +++ b/src/main/java/com/simibubi/create/AllPackets.java @@ -9,6 +9,7 @@ import com.simibubi.create.foundation.packet.SimplePacketBase; import com.simibubi.create.modules.contraptions.generators.ConfigureMotorPacket; import com.simibubi.create.modules.contraptions.receivers.constructs.ConfigureChassisPacket; import com.simibubi.create.modules.curiosities.placementHandgun.BuilderGunBeamPacket; +import com.simibubi.create.modules.logistics.block.diodes.ConfigureFlexpeaterPacket; import com.simibubi.create.modules.logistics.packet.ConfigureFlexcratePacket; import com.simibubi.create.modules.logistics.packet.ConfigureStockswitchPacket; import com.simibubi.create.modules.schematics.packet.ConfigureSchematicannonPacket; @@ -31,6 +32,7 @@ public enum AllPackets { CONFIGURE_STOCKSWITCH(ConfigureStockswitchPacket.class, ConfigureStockswitchPacket::new), CONFIGURE_CHASSIS(ConfigureChassisPacket.class, ConfigureChassisPacket::new), CONFIGURE_MOTOR(ConfigureMotorPacket.class, ConfigureMotorPacket::new), + CONFIGURE_FLEXPEATER(ConfigureFlexpeaterPacket.class, ConfigureFlexpeaterPacket::new), PLACE_SCHEMATIC(SchematicPlacePacket.class, SchematicPlacePacket::new), UPLOAD_SCHEMATIC(SchematicUploadPacket.class, SchematicUploadPacket::new), diff --git a/src/main/java/com/simibubi/create/AllRecipes.java b/src/main/java/com/simibubi/create/AllRecipes.java index c5545e4e2..16cb3af25 100644 --- a/src/main/java/com/simibubi/create/AllRecipes.java +++ b/src/main/java/com/simibubi/create/AllRecipes.java @@ -4,6 +4,7 @@ import java.util.function.Supplier; import com.simibubi.create.modules.contraptions.base.ProcessingRecipeSerializer; import com.simibubi.create.modules.contraptions.receivers.CrushingRecipe; +import com.simibubi.create.modules.contraptions.receivers.PressingRecipe; import com.simibubi.create.modules.contraptions.receivers.SplashingRecipe; import com.simibubi.create.modules.curiosities.placementHandgun.BuilderGunUpgradeRecipe; @@ -26,12 +27,17 @@ public enum AllRecipes { SPLASHING(() -> { return new ProcessingRecipeSerializer<>(SplashingRecipe::new); }, Types.SPLASHING), + + PRESSING(() -> { + return new ProcessingRecipeSerializer<>(PressingRecipe::new); + }, Types.PRESSING), ; public static class Types { public static IRecipeType CRUSHING = register("crushing"); public static IRecipeType SPLASHING = register("splashing"); + public static IRecipeType PRESSING = register("pressing"); static > IRecipeType register(final String key) { return Registry.register(Registry.RECIPE_TYPE, new ResourceLocation(key), new IRecipeType() { diff --git a/src/main/java/com/simibubi/create/AllTileEntities.java b/src/main/java/com/simibubi/create/AllTileEntities.java index 84f1828b3..ebe559444 100644 --- a/src/main/java/com/simibubi/create/AllTileEntities.java +++ b/src/main/java/com/simibubi/create/AllTileEntities.java @@ -11,6 +11,8 @@ import com.simibubi.create.modules.contraptions.receivers.CrushingWheelTileEntit import com.simibubi.create.modules.contraptions.receivers.DrillTileEntity; import com.simibubi.create.modules.contraptions.receivers.EncasedFanTileEntity; import com.simibubi.create.modules.contraptions.receivers.EncasedFanTileEntityRenderer; +import com.simibubi.create.modules.contraptions.receivers.MechanicalPressTileEntity; +import com.simibubi.create.modules.contraptions.receivers.MechanicalPressTileEntityRenderer; import com.simibubi.create.modules.contraptions.receivers.TurntableTileEntity; import com.simibubi.create.modules.contraptions.receivers.constructs.ChassisTileEntity; import com.simibubi.create.modules.contraptions.receivers.constructs.MechanicalBearingTileEntity; @@ -38,6 +40,8 @@ import com.simibubi.create.modules.logistics.block.LinkedExtractorTileEntityRend import com.simibubi.create.modules.logistics.block.LinkedTileEntityRenderer; import com.simibubi.create.modules.logistics.block.RedstoneBridgeTileEntity; import com.simibubi.create.modules.logistics.block.StockswitchTileEntity; +import com.simibubi.create.modules.logistics.block.diodes.FlexpeaterTileEntity; +import com.simibubi.create.modules.logistics.block.diodes.FlexpeaterTileEntityRenderer; import com.simibubi.create.modules.schematics.block.SchematicTableTileEntity; import com.simibubi.create.modules.schematics.block.SchematicannonRenderer; import com.simibubi.create.modules.schematics.block.SchematicannonTileEntity; @@ -79,6 +83,7 @@ public enum AllTileEntities { CRUSHING_WHEEL(CrushingWheelTileEntity::new, AllBlocks.CRUSHING_WHEEL), CRUSHING_WHEEL_CONTROLLER(CrushingWheelControllerTileEntity::new, AllBlocks.CRUSHING_WHEEL_CONTROLLER), WATER_WHEEL(WaterWheelTileEntity::new, AllBlocks.WATER_WHEEL), + MECHANICAL_PRESS(MechanicalPressTileEntity::new, AllBlocks.MECHANICAL_PRESS), // Logistics REDSTONE_BRIDGE(RedstoneBridgeTileEntity::new, AllBlocks.REDSTONE_BRIDGE), @@ -88,6 +93,7 @@ public enum AllTileEntities { LINKED_EXTRACTOR(LinkedExtractorTileEntity::new, AllBlocks.LINKED_EXTRACTOR), BELT_FUNNEL(BeltFunnelTileEntity::new, AllBlocks.BELT_FUNNEL), ENTITY_DETECTOR(EntityDetectorTileEntity::new, AllBlocks.ENTITY_DETECTOR), + FLEXPEATER(FlexpeaterTileEntity::new, AllBlocks.FLEXPEATER), ; @@ -136,6 +142,8 @@ public enum AllTileEntities { bind(LinkedExtractorTileEntity.class, new LinkedExtractorTileEntityRenderer()); bind(ExtractorTileEntity.class, new ExtractorTileEntityRenderer()); bind(EntityDetectorTileEntity.class, new EntityDetectorTileEntityRenderer()); + bind(MechanicalPressTileEntity.class, new MechanicalPressTileEntityRenderer()); + bind(FlexpeaterTileEntity.class, new FlexpeaterTileEntityRenderer()); } @OnlyIn(Dist.CLIENT) diff --git a/src/main/java/com/simibubi/create/CreateClient.java b/src/main/java/com/simibubi/create/CreateClient.java index db1de6bb6..5397e445b 100644 --- a/src/main/java/com/simibubi/create/CreateClient.java +++ b/src/main/java/com/simibubi/create/CreateClient.java @@ -35,6 +35,7 @@ public class CreateClient { AllContainers.registerScreenFactories(); AllTileEntities.registerRenderers(); AllItems.registerColorHandlers(); + AllBlocks.registerColorHandlers(); } @SubscribeEvent diff --git a/src/main/java/com/simibubi/create/foundation/block/IBlockWithColorHandler.java b/src/main/java/com/simibubi/create/foundation/block/IBlockWithColorHandler.java new file mode 100644 index 000000000..bf44b1bf5 --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/block/IBlockWithColorHandler.java @@ -0,0 +1,9 @@ +package com.simibubi.create.foundation.block; + +import net.minecraft.client.renderer.color.IBlockColor; + +public interface IBlockWithColorHandler { + + public IBlockColor getColorHandler(); + +} diff --git a/src/main/java/com/simibubi/create/foundation/block/IBlockWithScrollableValue.java b/src/main/java/com/simibubi/create/foundation/block/IBlockWithScrollableValue.java index e5c4bcb43..f3fb4c8f9 100644 --- a/src/main/java/com/simibubi/create/foundation/block/IBlockWithScrollableValue.java +++ b/src/main/java/com/simibubi/create/foundation/block/IBlockWithScrollableValue.java @@ -35,7 +35,7 @@ public interface IBlockWithScrollableValue { public void onScroll(BlockState state, IWorld world, BlockPos pos, double delta); - public String getValueName(); + public String getValueName(BlockState state, IWorld world, BlockPos pos); public Vec3d getValueBoxPosition(BlockState state, IWorld world, BlockPos pos); @@ -125,7 +125,7 @@ public interface IBlockWithScrollableValue { GlStateManager.translated(bb.getZSize() + 1/32f, -1/16f, 0); GlStateManager.scaled(textScale, -textScale, textScale); - String text = block.getValueName(); + String text = block.getValueName(state, world, blockPos); mc.fontRenderer.drawString(text, 0, 0, 0x88FFBB); GlStateManager.translated(0, 0, -1 / 4f); mc.fontRenderer.drawString(text, 1, 1, 0x224433); diff --git a/src/main/java/com/simibubi/create/modules/contraptions/base/HorizontalKineticBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/base/HorizontalKineticBlock.java index ec7a69621..2fbc3a639 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/base/HorizontalKineticBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/base/HorizontalKineticBlock.java @@ -13,11 +13,11 @@ import net.minecraft.util.Rotation; public abstract class HorizontalKineticBlock extends KineticBlock { public static final IProperty HORIZONTAL_FACING = BlockStateProperties.HORIZONTAL_FACING; - + public HorizontalKineticBlock(Properties properties) { super(properties); } - + @Override protected void fillStateContainer(Builder builder) { builder.add(HORIZONTAL_FACING); @@ -29,6 +29,26 @@ public abstract class HorizontalKineticBlock extends KineticBlock { return this.getDefaultState().with(HORIZONTAL_FACING, context.getPlacementHorizontalFacing().getOpposite()); } + public Direction getPreferredHorizontalFacing(BlockItemUseContext context) { + Direction prefferedSide = null; + for (Direction side : Direction.values()) { + if (side.getAxis().isVertical()) + continue; + BlockState blockState = context.getWorld().getBlockState(context.getPos().offset(side)); + if (blockState.getBlock() instanceof IRotate) { + if (((IRotate) blockState.getBlock()).hasShaftTowards(context.getWorld(), context.getPos().offset(side), + blockState, side.getOpposite())) + if (prefferedSide != null && prefferedSide.getAxis() != side.getAxis()) { + prefferedSide = null; + break; + } else { + prefferedSide = side; + } + } + } + return prefferedSide; + } + @Override public BlockState rotate(BlockState state, Rotation rot) { return state.with(HORIZONTAL_FACING, rot.rotate(state.get(HORIZONTAL_FACING))); diff --git a/src/main/java/com/simibubi/create/modules/contraptions/generators/MotorBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/generators/MotorBlock.java index 268545e23..b8a37aaef 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/generators/MotorBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/generators/MotorBlock.java @@ -80,7 +80,7 @@ public class MotorBlock extends HorizontalKineticBlock } @Override - public String getValueName() { + public String getValueName(BlockState state, IWorld world, BlockPos pos) { return "Speed"; } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/MechanicalPressBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/MechanicalPressBlock.java new file mode 100644 index 000000000..420ee4865 --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/MechanicalPressBlock.java @@ -0,0 +1,171 @@ +package com.simibubi.create.modules.contraptions.receivers; + +import java.util.Arrays; +import java.util.List; +import java.util.Optional; + +import com.simibubi.create.AllBlocks; +import com.simibubi.create.foundation.block.IRenderUtilityBlock; +import com.simibubi.create.foundation.block.IWithTileEntity; +import com.simibubi.create.foundation.utility.ItemDescription; +import com.simibubi.create.foundation.utility.ItemDescription.Palette; +import com.simibubi.create.foundation.utility.VecHelper; +import com.simibubi.create.modules.contraptions.base.HorizontalKineticBlock; +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.BeltBlock; +import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock.Slope; +import com.simibubi.create.modules.contraptions.relays.belt.BeltTileEntity; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.block.HorizontalBlock; +import net.minecraft.entity.Entity; +import net.minecraft.item.BlockItemUseContext; +import net.minecraft.state.StateContainer.Builder; +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.IWorld; +import net.minecraft.world.World; + +public class MechanicalPressBlock extends HorizontalKineticBlock + implements IWithTileEntity, IBeltAttachment { + + public static VoxelShape SHAPE = makeCuboidShape(0, 2, 0, 16, 16, 16); + + public MechanicalPressBlock() { + super(Properties.from(Blocks.PISTON)); + } + + @Override + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + return SHAPE; + } + + @Override + public ItemDescription getDescription() { + Palette color = Palette.Red; + return new ItemDescription(color).withSummary("Applies pressure to items below it.").createTabs(); + } + + @Override + public void neighborChanged(BlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos, + boolean isMoving) { + if (worldIn.isRemote) + return; + MechanicalPressTileEntity te = (MechanicalPressTileEntity) worldIn.getTileEntity(pos); + if (te == null) + return; + + if (worldIn.isBlockPowered(pos)) { + if (!te.finished && !te.running) + te.start(false); + } else { + te.finished = false; + } + + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) { + return new MechanicalPressTileEntity(); + } + + @Override + public BlockState getStateForPlacement(BlockItemUseContext context) { + Direction prefferedSide = getPreferredHorizontalFacing(context); + if (prefferedSide != null) + return getDefaultState().with(HORIZONTAL_FACING, prefferedSide); + return super.getStateForPlacement(context); + } + + @Override + public Axis getRotationAxis(BlockState state) { + return state.get(HORIZONTAL_FACING).getAxis(); + } + + @Override + public boolean hasShaftTowards(World world, BlockPos pos, BlockState state, Direction face) { + return face.getAxis() == state.get(HORIZONTAL_FACING).getAxis(); + } + + @Override + protected boolean hasStaticPart() { + return true; + } + + public static class Head extends HorizontalBlock implements IRenderUtilityBlock { + + public Head() { + super(Properties.from(Blocks.AIR)); + } + + @Override + protected void fillStateContainer(Builder builder) { + builder.add(HORIZONTAL_FACING); + super.fillStateContainer(builder); + } + } + + @Override + public List getPotentialAttachmentLocations(BeltTileEntity te) { + return Arrays.asList(te.getPos().up(2)); + } + + @Override + public Optional getValidBeltPositionFor(IWorld world, BlockPos pos, BlockState state) { + BlockState blockState = world.getBlockState(pos.down(2)); + if (!AllBlocks.BELT.typeOf(blockState) || blockState.get(BeltBlock.SLOPE) != Slope.HORIZONTAL) + return Optional.empty(); + return Optional.of(pos.down(2)); + } + + @Override + public boolean handleEntity(BeltTileEntity te, Entity entity, BeltAttachmentState state) { + MechanicalPressTileEntity pressTe = (MechanicalPressTileEntity) te.getWorld() + .getTileEntity(state.attachmentPos); + + // Not powered + if (pressTe == null || pressTe.getSpeed() == 0) + return false; + + // Running + if (pressTe.running) { + double distanceTo = entity.getPositionVec().distanceTo(VecHelper.getCenterOf(te.getPos())); + if (distanceTo < .32f) + return true; + if (distanceTo < .4f) { + entity.setPosition(te.getPos().getX() + .5f, entity.posY, te.getPos().getZ() + .5f); + return true; + } + return false; + } + + // Start process + if (state.processingEntity != entity) { + state.processingEntity = entity; + state.processingDuration = 1; + pressTe.start(true); + return false; + } + + // Already processed + if (state.processingDuration == -1) + return false; + + // Just Finished + if (pressTe.finished) { + state.processingDuration = -1; + return false; + } + + return false; + } + +} diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/MechanicalPressTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/MechanicalPressTileEntity.java new file mode 100644 index 000000000..0d368ff76 --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/MechanicalPressTileEntity.java @@ -0,0 +1,110 @@ +package com.simibubi.create.modules.contraptions.receivers; + +import java.util.Optional; + +import com.simibubi.create.AllRecipes; +import com.simibubi.create.AllTileEntities; +import com.simibubi.create.modules.contraptions.base.KineticTileEntity; +import com.simibubi.create.modules.logistics.InWorldProcessing; + +import net.minecraft.entity.Entity; +import net.minecraft.entity.item.ItemEntity; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.tileentity.ITickableTileEntity; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.MathHelper; +import net.minecraftforge.items.ItemStackHandler; +import net.minecraftforge.items.wrapper.RecipeWrapper; + +public class MechanicalPressTileEntity extends KineticTileEntity implements ITickableTileEntity { + + public static class PressingInv extends RecipeWrapper { + public PressingInv() { + super(new ItemStackHandler(1)); + } + } + + private static PressingInv pressingInv = new PressingInv(); + public int runningTicks; + public boolean running; + public boolean beltMode; + public boolean finished; + + public MechanicalPressTileEntity() { + super(AllTileEntities.MECHANICAL_PRESS.type); + } + + @Override + public void read(CompoundNBT compound) { + running = compound.getBoolean("Running"); + beltMode = compound.getBoolean("OnBelt"); + finished = compound.getBoolean("Finished"); + runningTicks = compound.getInt("Ticks"); + super.read(compound); + } + + @Override + public CompoundNBT write(CompoundNBT compound) { + compound.putBoolean("Running", running); + compound.putBoolean("OnBelt", beltMode); + compound.putBoolean("Finished", finished); + compound.putInt("Ticks", runningTicks); + return super.write(compound); + } + + @Override + public AxisAlignedBB getRenderBoundingBox() { + return new AxisAlignedBB(pos).expand(0, -1.5, 0); + } + + public float getRenderedHeadOffset(float partialTicks) { + if (running) { + if (runningTicks < 50) { + return MathHelper.clamp((runningTicks - 1 + partialTicks) / 20f, 0, beltMode ? 1 + 3 / 16f : 1); + } + if (runningTicks >= 50) { + return MathHelper.clamp(((100 - runningTicks) + 1 - partialTicks) / 20f, 0, beltMode ? 1 + 3 / 16f : 1); + } + } + return 0; + } + + public void start(boolean onBelt) { + beltMode = onBelt; + running = true; + runningTicks = 0; + sendData(); + } + + @Override + public void tick() { + if (!running) + return; + + if (!world.isRemote && runningTicks > 100) { + + AxisAlignedBB bb = new AxisAlignedBB(pos.down(beltMode ? 2 : 1)); + for (Entity entity : world.getEntitiesWithinAABBExcludingEntity(null, bb)) { + if (!(entity instanceof ItemEntity)) + continue; + + ItemEntity itemEntity = (ItemEntity) entity; + pressingInv.setInventorySlotContents(0, itemEntity.getItem()); + Optional recipe = world.getRecipeManager().getRecipe(AllRecipes.Types.PRESSING, + pressingInv, world); + if (recipe.isPresent()) + InWorldProcessing.applyRecipeOn(itemEntity, recipe.get()); + } + + finished = true; + if (!beltMode) + finished = world.isBlockPowered(pos); + running = false; + sendData(); + return; + } + + runningTicks++; + } + +} diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/MechanicalPressTileEntityRenderer.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/MechanicalPressTileEntityRenderer.java new file mode 100644 index 000000000..2104fd28d --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/MechanicalPressTileEntityRenderer.java @@ -0,0 +1,63 @@ +package com.simibubi.create.modules.contraptions.receivers; + +import java.nio.ByteBuffer; + +import com.simibubi.create.AllBlocks; +import com.simibubi.create.foundation.utility.BufferManipulator; +import com.simibubi.create.modules.contraptions.base.KineticTileEntity; +import com.simibubi.create.modules.contraptions.base.KineticTileEntityRenderer; + +import net.minecraft.block.BlockState; +import net.minecraft.client.renderer.BufferBuilder; +import net.minecraft.state.properties.BlockStateProperties; +import net.minecraft.util.math.BlockPos; + +public class MechanicalPressTileEntityRenderer extends KineticTileEntityRenderer { + + protected class HeadTranslator extends BufferManipulator { + + public HeadTranslator(ByteBuffer original) { + super(original); + } + + public ByteBuffer getTransformed(float xIn, float yIn, float zIn, float pushDistance, int packedLightCoords) { + original.rewind(); + mutable.rewind(); + + for (int vertex = 0; vertex < vertexCount(original); vertex++) { + putPos(mutable, vertex, getX(original, vertex) + xIn, getY(original, vertex) + yIn - pushDistance, + getZ(original, vertex) + zIn); + putLight(mutable, vertex, packedLightCoords); + } + + return mutable; + } + } + + @Override + public void renderTileEntityFast(KineticTileEntity te, double x, double y, double z, float partialTicks, + int destroyStage, BufferBuilder buffer) { + super.renderTileEntityFast(te, x, y, z, partialTicks, destroyStage, buffer); + + final BlockState state = getRenderedHeadBlockState(te); + cacheIfMissing(state, HeadTranslator::new); + + final BlockPos pos = te.getPos(); + + int packedLightmapCoords = state.getPackedLightmapCoords(getWorld(), pos); + buffer.putBulkData(((HeadTranslator) cachedBuffers.get(state)).getTransformed((float) x, (float) y, (float) z, + ((MechanicalPressTileEntity) te).getRenderedHeadOffset(partialTicks), packedLightmapCoords)); + } + + @Override + protected BlockState getRenderedBlockState(KineticTileEntity te) { + return AllBlocks.SHAFT.get().getDefaultState().with(BlockStateProperties.AXIS, + te.getBlockState().get(BlockStateProperties.HORIZONTAL_FACING).getAxis()); + } + + protected BlockState getRenderedHeadBlockState(KineticTileEntity te) { + return AllBlocks.MECHANICAL_PRESS_HEAD.get().getDefaultState().with(BlockStateProperties.HORIZONTAL_FACING, + te.getBlockState().get(BlockStateProperties.HORIZONTAL_FACING)); + } + +} diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/PressingRecipe.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/PressingRecipe.java new file mode 100644 index 000000000..0b973f18a --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/PressingRecipe.java @@ -0,0 +1,28 @@ +package com.simibubi.create.modules.contraptions.receivers; + +import java.util.List; + +import com.simibubi.create.AllRecipes; +import com.simibubi.create.modules.contraptions.base.ProcessingRecipe; +import com.simibubi.create.modules.contraptions.base.StochasticOutput; +import com.simibubi.create.modules.contraptions.receivers.MechanicalPressTileEntity.PressingInv; + +import net.minecraft.item.crafting.Ingredient; +import net.minecraft.util.ResourceLocation; +import net.minecraft.world.World; + +public class PressingRecipe extends ProcessingRecipe { + + public PressingRecipe(ResourceLocation id, String group, List ingredients, + List results, int processingDuration) { + super(AllRecipes.PRESSING, id, group, ingredients, results, processingDuration); + } + + @Override + public boolean matches(PressingInv inv, World worldIn) { + if (inv.isEmpty()) + return false; + return ingredients.get(0).test(inv.getStackInSlot(0)); + } + +} diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/AbstractChassisBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/AbstractChassisBlock.java index 9d445cd0b..35af0d582 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/AbstractChassisBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/AbstractChassisBlock.java @@ -74,7 +74,7 @@ public abstract class AbstractChassisBlock extends RotatedPillarBlock } @Override - public String getValueName() { + public String getValueName(BlockState state, IWorld world, BlockPos pos) { return "Range"; } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/RotationChassisBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/RotationChassisBlock.java index 83754074a..52be5d370 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/RotationChassisBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/RotationChassisBlock.java @@ -7,6 +7,8 @@ import net.minecraft.state.BooleanProperty; import net.minecraft.state.StateContainer.Builder; import net.minecraft.util.Direction; import net.minecraft.util.Direction.Axis; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IWorld; public class RotationChassisBlock extends AbstractChassisBlock { @@ -28,7 +30,7 @@ public class RotationChassisBlock extends AbstractChassisBlock { } @Override - public String getValueName() { + public String getValueName(BlockState state, IWorld world, BlockPos pos) { return "Radius"; } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/AllBeltAttachments.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/AllBeltAttachments.java index 3ff066bfe..cb9336693 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/AllBeltAttachments.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/AllBeltAttachments.java @@ -21,6 +21,7 @@ public enum AllBeltAttachments { BELT_FUNNEL(AllBlocks.BELT_FUNNEL), BELT_OBSERVER(AllBlocks.ENTITY_DETECTOR), + MECHANICAL_PRESS(AllBlocks.MECHANICAL_PRESS), ; 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 bb36fcaba..4d8dc0e47 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 @@ -16,6 +16,7 @@ import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.entity.Entity; import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.DyeColor; import net.minecraft.item.ItemStack; import net.minecraft.state.EnumProperty; import net.minecraft.state.IProperty; @@ -23,10 +24,12 @@ import net.minecraft.state.StateContainer.Builder; 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.Direction.AxisDirection; import net.minecraft.util.IStringSerializable; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.math.Vec3i; import net.minecraft.util.math.shapes.IBooleanFunction; @@ -36,6 +39,7 @@ import net.minecraft.util.math.shapes.VoxelShapes; import net.minecraft.world.IBlockReader; import net.minecraft.world.IWorldReader; import net.minecraft.world.World; +import net.minecraftforge.common.Tags; public class BeltBlock extends HorizontalKineticBlock implements IWithoutBlockItem, IWithTileEntity { @@ -153,6 +157,22 @@ public class BeltBlock extends HorizontalKineticBlock implements IWithoutBlockIt }); } + @Override + public boolean onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, + BlockRayTraceResult hit) { + if (player.isSneaking() || !player.isAllowEdit()) + return false; + ItemStack heldItem = player.getHeldItem(handIn); + if (!Tags.Items.DYES.contains(heldItem.getItem())) + return false; + if (worldIn.isRemote) + return true; + withTileEntityDo(worldIn, pos, te -> te.applyColor(DyeColor.getColor(heldItem))); + if (!player.isCreative()) + heldItem.shrink(1); + return true; + } + @Override protected void fillStateContainer(Builder builder) { builder.add(SLOPE, PART); diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltSupportBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltSupportBlock.java new file mode 100644 index 000000000..447fdd373 --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltSupportBlock.java @@ -0,0 +1,35 @@ +package com.simibubi.create.modules.contraptions.relays.belt; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.util.math.shapes.VoxelShapes; +import net.minecraft.world.IBlockReader; + +public class BeltSupportBlock extends Block { + + public static final VoxelShape SHAPE = makeCuboidShape(0, 0, 0, 16, 27, 16); + + public BeltSupportBlock() { + super(Properties.from(Blocks.ANDESITE)); + } + + @Override + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + return SHAPE; + } + + @Override + public VoxelShape getRenderShape(BlockState state, IBlockReader worldIn, BlockPos pos) { + return VoxelShapes.fullCube(); + } + + @Override + public VoxelShape getRaytraceShape(BlockState state, IBlockReader worldIn, BlockPos pos) { + return getRenderShape(state, worldIn, pos); + } + +} 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 1eea21399..3d72955aa 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 @@ -7,6 +7,7 @@ import java.util.Map; import com.simibubi.create.AllBlocks; import com.simibubi.create.AllTileEntities; +import com.simibubi.create.foundation.utility.ColorHelper; import com.simibubi.create.modules.contraptions.base.KineticTileEntity; import com.simibubi.create.modules.contraptions.relays.belt.AllBeltAttachments.BeltAttachmentState; import com.simibubi.create.modules.contraptions.relays.belt.AllBeltAttachments.Tracker; @@ -19,6 +20,7 @@ import net.minecraft.entity.LivingEntity; import net.minecraft.entity.MoverType; import net.minecraft.entity.item.ItemEntity; import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.DyeColor; import net.minecraft.nbt.CompoundNBT; import net.minecraft.nbt.NBTUtil; import net.minecraft.state.properties.BlockStateProperties; @@ -38,6 +40,7 @@ public class BeltTileEntity extends KineticTileEntity implements ITickableTileEn public Map passengers; public AllBeltAttachments.Tracker attachmentTracker; private CompoundNBT trackerUpdateTag; + public int color; protected static class TransportedEntityInfo { int ticksSinceLastCollision; @@ -64,6 +67,7 @@ public class BeltTileEntity extends KineticTileEntity implements ITickableTileEn super(AllTileEntities.BELT.type); controller = BlockPos.ZERO; attachmentTracker = new Tracker(); + color = -1; } protected boolean isLastBelt() { @@ -86,6 +90,7 @@ public class BeltTileEntity extends KineticTileEntity implements ITickableTileEn @Override public CompoundNBT write(CompoundNBT compound) { compound.put("Controller", NBTUtil.writeBlockPos(controller)); + compound.putInt("Color", color); attachmentTracker.write(compound); return super.write(compound); } @@ -94,9 +99,25 @@ public class BeltTileEntity extends KineticTileEntity implements ITickableTileEn public void read(CompoundNBT compound) { controller = NBTUtil.readBlockPos(compound.getCompound("Controller")); trackerUpdateTag = compound; + color = compound.getInt("Color"); super.read(compound); } + public void applyColor(DyeColor colorIn) { + int colorValue = colorIn.getMapColor().colorValue; + for (BlockPos blockPos : BeltBlock.getBeltChain(world, getController())) { + BeltTileEntity tileEntity = (BeltTileEntity) world.getTileEntity(blockPos); + if (tileEntity != null) { + if (tileEntity.color == -1) { + tileEntity.color = colorValue; + } else { + tileEntity.color = ColorHelper.mixColors(tileEntity.color, colorValue, .5f); + } + tileEntity.sendData(); + } + } + } + public void setController(BlockPos controller) { this.controller = controller; } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltTileEntityRenderer.java b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltTileEntityRenderer.java index a2e0aa4fd..5680096b9 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltTileEntityRenderer.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/relays/belt/BeltTileEntityRenderer.java @@ -37,7 +37,7 @@ public class BeltTileEntityRenderer extends KineticTileEntityRenderer { beltTextures = textureMap.getSprite(new ResourceLocation(Create.ID, "block/belt_animated")); } - public ByteBuffer getTransformed(BeltTileEntity te, float x, float y, float z) { + public ByteBuffer getTransformed(BeltTileEntity te, float x, float y, float z, int color) { original.rewind(); mutable.rewind(); @@ -63,6 +63,11 @@ public class BeltTileEntityRenderer extends KineticTileEntityRenderer { float texOffX = textureOffsetX; float texOffY = textureOffsetY; + boolean defaultColor = color == -1; + int b = defaultColor ? 128 : color & 0xFF; + int g = defaultColor ? 128 : (color >> 8) & 0xFF; + int r = defaultColor ? 128 : (color >> 16) & 0xFF; + for (int vertex = 0; vertex < vertexCount(original); vertex++) { putPos(mutable, vertex, getX(original, vertex) + x, getY(original, vertex) + y, getZ(original, vertex) + z); @@ -71,6 +76,14 @@ public class BeltTileEntityRenderer extends KineticTileEntityRenderer { int bufferPosition = getBufferPosition(vertex); mutable.putFloat(bufferPosition + 16, original.getFloat(bufferPosition + 16) + texOffX); mutable.putFloat(bufferPosition + 20, original.getFloat(bufferPosition + 20) + texOffY); + + byte lumByte = getR(original, vertex); + float lum = (lumByte < 0 ? 255 + lumByte : lumByte) / 256f; + + int r2 = (int) (r * lum); + int g2 = (int) (g * lum); + int b2 = (int) (b * lum); + putColor(mutable, vertex, (byte) r2, (byte) g2, (byte) b2, (byte) 255); } return mutable; @@ -96,6 +109,7 @@ public class BeltTileEntityRenderer extends KineticTileEntityRenderer { } public void renderBeltFromCache(BeltTileEntity te, float x, float y, float z, BufferBuilder buffer) { - buffer.putBulkData(((BeltModelAnimator) cachedBuffers.get(te.getBlockState())).getTransformed(te, x, y, z)); + buffer.putBulkData( + ((BeltModelAnimator) cachedBuffers.get(te.getBlockState())).getTransformed(te, x, y, z, te.color)); } } diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/diodes/ConfigureFlexpeaterPacket.java b/src/main/java/com/simibubi/create/modules/logistics/block/diodes/ConfigureFlexpeaterPacket.java new file mode 100644 index 000000000..6112a7af8 --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/logistics/block/diodes/ConfigureFlexpeaterPacket.java @@ -0,0 +1,37 @@ +package com.simibubi.create.modules.logistics.block.diodes; + +import com.simibubi.create.foundation.packet.TileEntityConfigurationPacket; + +import net.minecraft.network.PacketBuffer; +import net.minecraft.util.math.BlockPos; + +public class ConfigureFlexpeaterPacket extends TileEntityConfigurationPacket { + + private int maxState; + + public ConfigureFlexpeaterPacket(BlockPos pos, int newMaxState) { + super(pos); + this.maxState = newMaxState; + } + + public ConfigureFlexpeaterPacket(PacketBuffer buffer) { + super(buffer); + } + + @Override + protected void writeSettings(PacketBuffer buffer) { + buffer.writeInt(maxState); + } + + @Override + protected void readSettings(PacketBuffer buffer) { + maxState = buffer.readInt(); + } + + @Override + protected void applySettings(FlexpeaterTileEntity te) { + te.maxState = maxState; + te.sendData(); + } + +} diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/diodes/FlexpeaterBlock.java b/src/main/java/com/simibubi/create/modules/logistics/block/diodes/FlexpeaterBlock.java new file mode 100644 index 000000000..86e6f780a --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/logistics/block/diodes/FlexpeaterBlock.java @@ -0,0 +1,99 @@ +package com.simibubi.create.modules.logistics.block.diodes; + +import com.simibubi.create.foundation.block.IBlockWithScrollableValue; +import com.simibubi.create.foundation.block.IWithTileEntity; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.block.RedstoneDiodeBlock; +import net.minecraft.state.BooleanProperty; +import net.minecraft.state.StateContainer.Builder; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Vec3d; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.IWorld; + +public class FlexpeaterBlock extends RedstoneDiodeBlock + implements IWithTileEntity, IBlockWithScrollableValue { + + public static BooleanProperty POWERING = BooleanProperty.create("powering"); + private static Vec3d VALUE_POS = new Vec3d(2 / 16f, 5 / 16f, 5 / 16f); + + public FlexpeaterBlock() { + super(Properties.from(Blocks.REPEATER)); + setDefaultState(getDefaultState().with(POWERED, false).with(POWERING, false)); + } + + @Override + protected void fillStateContainer(Builder builder) { + builder.add(POWERED, POWERING, HORIZONTAL_FACING); + super.fillStateContainer(builder); + } + + @Override + public boolean hasTileEntity(BlockState state) { + return true; + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) { + return new FlexpeaterTileEntity(); + } + + @Override + protected int getActiveSignal(IBlockReader worldIn, BlockPos pos, BlockState state) { + return state.get(POWERING) ? 15 : 0; + } + + @Override + public int getWeakPower(BlockState blockState, IBlockReader blockAccess, BlockPos pos, Direction side) { + return blockState.get(HORIZONTAL_FACING) == side ? this.getActiveSignal(blockAccess, pos, blockState) : 0; + } + + @Override + protected int getDelay(BlockState p_196346_1_) { + return 0; + } + + @Override + public boolean canConnectRedstone(BlockState state, IBlockReader world, BlockPos pos, Direction side) { + if (side == null) + return false; + return side.getAxis() == state.get(HORIZONTAL_FACING).getAxis(); + } + + @Override + public int getCurrentValue(BlockState state, IWorld world, BlockPos pos) { + FlexpeaterTileEntity te = (FlexpeaterTileEntity) world.getTileEntity(pos); + if (te == null) + return 0; + return te.getDisplayValue(); + } + + @Override + public void onScroll(BlockState state, IWorld world, BlockPos pos, double delta) { + withTileEntityDo(world, pos, te -> te.increment((int) Math.signum(delta))); + } + + @Override + public String getValueName(BlockState state, IWorld world, BlockPos pos) { + FlexpeaterTileEntity te = (FlexpeaterTileEntity) world.getTileEntity(pos); + if (te == null) + return ""; + return "Delay (" + te.getUnit() + ")"; + } + + @Override + public Vec3d getValueBoxPosition(BlockState state, IWorld world, BlockPos pos) { + return VALUE_POS; + } + + @Override + public Direction getValueBoxDirection(BlockState state, IWorld world, BlockPos pos) { + return Direction.UP; + } + +} diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/diodes/FlexpeaterTileEntity.java b/src/main/java/com/simibubi/create/modules/logistics/block/diodes/FlexpeaterTileEntity.java new file mode 100644 index 000000000..1b569d69d --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/logistics/block/diodes/FlexpeaterTileEntity.java @@ -0,0 +1,132 @@ +package com.simibubi.create.modules.logistics.block.diodes; + +import static com.simibubi.create.modules.logistics.block.diodes.FlexpeaterBlock.POWERING; +import static net.minecraft.block.RedstoneDiodeBlock.POWERED; + +import com.simibubi.create.AllPackets; +import com.simibubi.create.AllTileEntities; +import com.simibubi.create.foundation.block.SyncedTileEntity; + +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.tileentity.ITickableTileEntity; +import net.minecraft.util.math.MathHelper; + +public class FlexpeaterTileEntity extends SyncedTileEntity implements ITickableTileEntity { + + public int state; + public int maxState; + public int newMaxState; + public int lastModified; + public boolean charging; + + public FlexpeaterTileEntity() { + super(AllTileEntities.FLEXPEATER.type); + lastModified = -1; + maxState = 1; + } + + @Override + public void read(CompoundNBT compound) { + state = compound.getInt("State"); + charging = compound.getBoolean("Charging"); + newMaxState = maxState = compound.getInt("MaxState"); + lastModified = -1; + super.read(compound); + } + + @Override + public CompoundNBT write(CompoundNBT compound) { + compound.putInt("State", state); + compound.putInt("MaxState", maxState); + compound.putBoolean("Charging", charging); + return super.write(compound); + } + + public void increment(int amount) { + + if (amount > 0) { + if (newMaxState < 20) { + newMaxState += amount; + } else if (newMaxState < 20 * 60) { + newMaxState += amount * 20; + } else { + newMaxState += amount * 20 * 60; + } + lastModified = 0; + } + + if (amount < 0) { + if (newMaxState <= 20) { + newMaxState += amount; + } else if (newMaxState <= 20 * 60) { + newMaxState += amount * 20; + } else { + newMaxState += amount * 20 * 60; + } + lastModified = 0; + } + + newMaxState = MathHelper.clamp(newMaxState, 1, 60 * 20 * 30); + } + + @Override + public boolean hasFastRenderer() { + return true; + } + + public int getDisplayValue() { + if (newMaxState < 20) + return newMaxState; + if (newMaxState < 20 * 60) + return newMaxState / 20; + return newMaxState / 20 / 60; + } + + public String getUnit() { + if (newMaxState < 20) + return "Ticks"; + if (newMaxState < 20 * 60) + return "Seconds"; + return "Minutes"; + } + + @Override + public void tick() { + updateConfigurableValue(); + boolean powered = getBlockState().get(POWERED); + boolean powering = getBlockState().get(POWERING); + boolean atMax = state == maxState; + boolean atMin = state == 0; + + if (!charging && powered) + charging = true; + + if (charging && atMax) { + if (!powering && !world.isRemote) + world.setBlockState(pos, getBlockState().with(POWERING, true)); + if (!powered) + charging = false; + return; + } + + if (!charging && atMin) { + if (powering && !world.isRemote) + world.setBlockState(pos, getBlockState().with(POWERING, false)); + return; + } + + state += charging ? 1 : -1; + } + + public void updateConfigurableValue() { + if (!world.isRemote) + return; + if (lastModified == -1) + return; + if (lastModified++ > 10) { + lastModified = -1; + AllPackets.channel.sendToServer(new ConfigureFlexpeaterPacket(pos, newMaxState)); + } + } + +} diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/diodes/FlexpeaterTileEntityRenderer.java b/src/main/java/com/simibubi/create/modules/logistics/block/diodes/FlexpeaterTileEntityRenderer.java new file mode 100644 index 000000000..0436fc336 --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/logistics/block/diodes/FlexpeaterTileEntityRenderer.java @@ -0,0 +1,83 @@ +package com.simibubi.create.modules.logistics.block.diodes; + +import java.nio.ByteBuffer; +import java.util.Random; + +import org.lwjgl.opengl.GL11; + +import com.simibubi.create.AllBlocks; +import com.simibubi.create.foundation.utility.BufferManipulator; +import com.simibubi.create.foundation.utility.ColorHelper; + +import net.minecraft.block.BlockState; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.BlockModelRenderer; +import net.minecraft.client.renderer.BlockRendererDispatcher; +import net.minecraft.client.renderer.BufferBuilder; +import net.minecraft.client.renderer.model.IBakedModel; +import net.minecraft.client.renderer.vertex.DefaultVertexFormats; +import net.minecraft.util.math.BlockPos; +import net.minecraftforge.client.model.animation.TileEntityRendererFast; +import net.minecraftforge.client.model.data.EmptyModelData; + +public class FlexpeaterTileEntityRenderer extends TileEntityRendererFast { + + protected class FlexpeaterIndicatorRenderer extends BufferManipulator { + + public FlexpeaterIndicatorRenderer(ByteBuffer original) { + super(original); + } + + public ByteBuffer getTransformed(float xIn, float yIn, float zIn, float colorModifier, int packedLightCoords) { + original.rewind(); + mutable.rewind(); + + int color = ColorHelper.mixColors(0x2C0300, 0xCD0000, colorModifier); + + byte r = (byte) (color >> 16); + byte g = (byte) ((color >> 8) & 0xFF); + byte b = (byte) (color & 0xFF); + byte a = (byte) 255; + + for (int vertex = 0; vertex < vertexCount(original); vertex++) { + putColor(mutable, vertex, r, g, b, a); + putPos(mutable, vertex, getX(original, vertex) + xIn, getY(original, vertex) + yIn, + getZ(original, vertex) + zIn); + putLight(mutable, vertex, packedLightCoords); + } + + return mutable; + } + } + + private FlexpeaterIndicatorRenderer cachedIndicator; + + @Override + public void renderTileEntityFast(FlexpeaterTileEntity te, double x, double y, double z, float partialTicks, + int destroyStage, BufferBuilder buffer) { + BlockPos pos = te.getPos(); + + if (cachedIndicator == null) { + BlockState renderedState = AllBlocks.FLEXPEATER_INDICATOR.get().getDefaultState(); + BlockRendererDispatcher dispatcher = Minecraft.getInstance().getBlockRendererDispatcher(); + BlockModelRenderer blockRenderer = dispatcher.getBlockModelRenderer(); + IBakedModel originalModel = dispatcher.getModelForState(renderedState); + BufferBuilder builder = new BufferBuilder(0); + Random random = new Random(); + + builder.setTranslation(0, 1, 0); + builder.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK); + blockRenderer.renderModelFlat(getWorld(), originalModel, renderedState, BlockPos.ZERO.down(), builder, true, + random, 42, EmptyModelData.INSTANCE); + builder.finishDrawing(); + + cachedIndicator = new FlexpeaterIndicatorRenderer(builder.getByteBuffer()); + } + + BlockState blockState = te.getBlockState(); + int packedLightmapCoords = blockState.getPackedLightmapCoords(getWorld(), pos); + buffer.putBulkData(cachedIndicator.getTransformed((float) x, (float) y, (float) z, + te.state / (float) te.maxState, packedLightmapCoords)); + } + +} diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/PulseRepeaterBlock.java b/src/main/java/com/simibubi/create/modules/logistics/block/diodes/PulseRepeaterBlock.java similarity index 84% rename from src/main/java/com/simibubi/create/modules/logistics/block/PulseRepeaterBlock.java rename to src/main/java/com/simibubi/create/modules/logistics/block/diodes/PulseRepeaterBlock.java index 83ee29b17..a7b9e6f0a 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/block/PulseRepeaterBlock.java +++ b/src/main/java/com/simibubi/create/modules/logistics/block/diodes/PulseRepeaterBlock.java @@ -1,4 +1,4 @@ -package com.simibubi.create.modules.logistics.block; +package com.simibubi.create.modules.logistics.block.diodes; import java.util.Random; @@ -8,6 +8,7 @@ import net.minecraft.block.Blocks; import net.minecraft.block.RedstoneDiodeBlock; import net.minecraft.state.BooleanProperty; import net.minecraft.state.StateContainer.Builder; +import net.minecraft.util.Direction; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockReader; import net.minecraft.world.TickPriority; @@ -26,7 +27,14 @@ public class PulseRepeaterBlock extends RedstoneDiodeBlock { protected int getDelay(BlockState state) { return 1; } - + + @Override + public boolean canConnectRedstone(BlockState state, IBlockReader world, BlockPos pos, Direction side) { + if (side == null) + return false; + return side.getAxis() == state.get(HORIZONTAL_FACING).getAxis(); + } + @Override public void tick(BlockState state, World worldIn, BlockPos pos, Random random) { boolean powered = state.get(POWERED); diff --git a/src/main/resources/assets/create/blockstates/belt_support.json b/src/main/resources/assets/create/blockstates/belt_support.json new file mode 100644 index 000000000..7d6ec4d90 --- /dev/null +++ b/src/main/resources/assets/create/blockstates/belt_support.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "create:block/belt_support" } + } +} diff --git a/src/main/resources/assets/create/blockstates/flexpeater.json b/src/main/resources/assets/create/blockstates/flexpeater.json new file mode 100644 index 000000000..0de56e0eb --- /dev/null +++ b/src/main/resources/assets/create/blockstates/flexpeater.json @@ -0,0 +1,24 @@ +{ + "forge_marker": 1, + "variants": { + "powered=false,powering=false,facing=north": { "model": "create:block/flexpeater", "y": 180 }, + "powered=false,powering=false,facing=east": { "model": "create:block/flexpeater", "y": 270 }, + "powered=false,powering=false,facing=south": { "model": "create:block/flexpeater", "y": 0 }, + "powered=false,powering=false,facing=west": { "model": "create:block/flexpeater", "y": 90 }, + + "powered=true,powering=false,facing=north": { "model": "create:block/flexpeater_powered", "y": 180 }, + "powered=true,powering=false,facing=east": { "model": "create:block/flexpeater_powered", "y": 270 }, + "powered=true,powering=false,facing=south": { "model": "create:block/flexpeater_powered", "y": 0 }, + "powered=true,powering=false,facing=west": { "model": "create:block/flexpeater_powered", "y": 90 }, + + "powered=false,powering=true,facing=north": { "model": "create:block/flexpeater_powering", "y": 180 }, + "powered=false,powering=true,facing=east": { "model": "create:block/flexpeater_powering", "y": 270 }, + "powered=false,powering=true,facing=south": { "model": "create:block/flexpeater_powering", "y": 0 }, + "powered=false,powering=true,facing=west": { "model": "create:block/flexpeater_powering", "y": 90 }, + + "powered=true,powering=true,facing=north": { "model": "create:block/flexpeater_powered_powering", "y": 180 }, + "powered=true,powering=true,facing=east": { "model": "create:block/flexpeater_powered_powering", "y": 270 }, + "powered=true,powering=true,facing=south": { "model": "create:block/flexpeater_powered_powering", "y": 0 }, + "powered=true,powering=true,facing=west": { "model": "create:block/flexpeater_powered_powering", "y": 90 } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/blockstates/flexpeater_indicator.json b/src/main/resources/assets/create/blockstates/flexpeater_indicator.json new file mode 100644 index 000000000..d20d877af --- /dev/null +++ b/src/main/resources/assets/create/blockstates/flexpeater_indicator.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "create:block/flexpeater_indicator" } + } +} diff --git a/src/main/resources/assets/create/blockstates/mechanical_press.json b/src/main/resources/assets/create/blockstates/mechanical_press.json new file mode 100644 index 000000000..784e56ef5 --- /dev/null +++ b/src/main/resources/assets/create/blockstates/mechanical_press.json @@ -0,0 +1,14 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "create:block/mechanical_press_base" + }, + "variants": { + "facing": { + "north": { "y": 0 }, + "east": { "y": 90 }, + "west": { "y": 90 }, + "south": { "y": 0 } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/blockstates/mechanical_press_head.json b/src/main/resources/assets/create/blockstates/mechanical_press_head.json new file mode 100644 index 000000000..a37d82df9 --- /dev/null +++ b/src/main/resources/assets/create/blockstates/mechanical_press_head.json @@ -0,0 +1,14 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "create:block/mechanical_press_head" + }, + "variants": { + "facing": { + "north": { "y": 0 }, + "east": { "y": 90 }, + "west": { "y": 90 }, + "south": { "y": 0 } + } + } +} \ 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 2ab47fdc7..5f5a97482 100644 --- a/src/main/resources/assets/create/lang/en_us.json +++ b/src/main/resources/assets/create/lang/en_us.json @@ -15,6 +15,10 @@ "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": "Iron Sheets", + "item.create.propeller": "Propeller", + "item.create.flour": "Wheat Flour", + "item.create.dough": "Dough", "item.create.blazing_pickaxe": "Blazing Pickaxe", "item.create.blazing_shovel": "Blazing Shovel", @@ -46,6 +50,8 @@ "block.create.drill": "Mechanical Drill", "block.create.harvester": "Mechanical Harvester", "block.create.water_wheel": "Water Wheel", + "block.create.belt_support": "Belt Support", + "block.create.mechanical_press": "Mechanical Press", "block.create.sticky_mechanical_piston": "Sticky Mechanical Piston", "block.create.mechanical_piston": "Mechanical Piston", @@ -63,6 +69,7 @@ "block.create.belt_funnel": "Belt Funnel", "block.create.linked_extractor": "Linked Extractor", "block.create.pulse_repeater": "Pulse Repeater", + "block.create.flexpeater": "FlexPeater", "block.create.entity_detector": "Belt Observer", "block.create.andesite_bricks": "Andesite Bricks", diff --git a/src/main/resources/assets/create/models/block/belt_support.json b/src/main/resources/assets/create/models/block/belt_support.json new file mode 100644 index 000000000..5b9d7e2a5 --- /dev/null +++ b/src/main/resources/assets/create/models/block/belt_support.json @@ -0,0 +1,36 @@ +{ + "__comment": "Model generated using MrCrayfish's Model Creator (https://mrcrayfish.com/tools?id=mc)", + "parent": "block/block", + "textures": { + "brass_casing_side": "create:block/brass_casing_side", + "brass_casing": "create:block/brass_casing", + "belt_support_side": "create:block/brass_casing_side", + "particle": "create:block/brass_casing_side" + }, + "elements": [ + { + "name": "Cube", + "from": [ 0, 0, 0 ], + "to": [ 16, 16, 16 ], + "faces": { + "north": { "texture": "#brass_casing_side", "uv": [ 0, 0, 16, 16 ] }, + "east": { "texture": "#brass_casing_side", "uv": [ 0, 0, 16, 16 ] }, + "south": { "texture": "#brass_casing_side", "uv": [ 0, 0, 16, 16 ] }, + "west": { "texture": "#brass_casing_side", "uv": [ 0, 0, 16, 16 ] }, + "down": { "texture": "#brass_casing", "uv": [ 0, 0, 16, 16 ] } + } + }, + { + "name": "Cube", + "from": [ -0.03125, 16, -0.03125 ], + "to": [ 16.03125, 27, 16.03125 ], + "faces": { + "north": { "texture": "#brass_casing_side", "uv": [ 0, 0, 16, 11 ] }, + "east": { "texture": "#belt_support_side", "uv": [ 0, 0, 16, 11 ] }, + "south": { "texture": "#brass_casing_side", "uv": [ 0, 0, 16, 11 ] }, + "west": { "texture": "#belt_support_side", "uv": [ 0, 0, 16, 11 ] }, + "up": { "texture": "#brass_casing", "uv": [ 0, 0, 16, 16 ] } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/flexpeater.json b/src/main/resources/assets/create/models/block/flexpeater.json new file mode 100644 index 000000000..ed5ceebcd --- /dev/null +++ b/src/main/resources/assets/create/models/block/flexpeater.json @@ -0,0 +1,63 @@ +{ + "__comment": "Model generated using MrCrayfish's Model Creator (https://mrcrayfish.com/tools?id=mc)", + "parent": "block/block", + "textures": { + "flexpeater_off": "create:block/flexpeater_off", + "torch": "minecraft:block/redstone_torch_off", + "smooth_stone": "minecraft:block/smooth_stone", + "particle": "create:block/flexpeater_off" + }, + "elements": [ + { + "name": "Top", + "from": [ 5, 2.1, 5 ], + "to": [ 11, 3.1, 11 ], + "faces": { + "north": { "texture": "#flexpeater_off", "uv": [ 5, 5, 11, 6 ], "rotation": 180 }, + "east": { "texture": "#flexpeater_off", "uv": [ 10, 5, 11, 11 ], "rotation": 90 }, + "south": { "texture": "#flexpeater_off", "uv": [ 5, 10, 11, 11 ] }, + "west": { "texture": "#flexpeater_off", "uv": [ 5, 11, 6, 5 ], "rotation": 90 }, + "up": { "texture": "#flexpeater_off", "uv": [ 5, 5, 11, 11 ] } + } + }, + { + "name": "circuit", + "from": [ 0, 0, 0 ], + "to": [ 16, 2, 16 ], + "faces": { + "north": { "texture": "#smooth_stone", "uv": [ 0, 0, 16, 2 ] }, + "east": { "texture": "#smooth_stone", "uv": [ 0, 0, 16, 2 ] }, + "south": { "texture": "#smooth_stone", "uv": [ 0, 0, 16, 2 ] }, + "west": { "texture": "#smooth_stone", "uv": [ 0, 0, 16, 2 ] }, + "up": { "texture": "#flexpeater_off", "uv": [ 0, 0, 16, 16 ] }, + "down": { "texture": "#smooth_stone", "uv": [ 0, 0, 16, 16 ] } + } + }, + { + "name": "Front Torch", + "from": [ 6, 2, 2 ], + "to": [ 10, 8, 4 ], + "faces": { + "north": { "texture": "#torch", "uv": [ 6, 5, 10, 11 ] }, + "south": { "texture": "#torch", "uv": [ 6, 5, 10, 11 ] } + } + }, + { + "name": "Front Torch", + "from": [ 7, 2, 1 ], + "to": [ 9, 8, 5 ], + "faces": { + "east": { "texture": "#torch", "uv": [ 6, 5, 10, 11 ] }, + "west": { "texture": "#torch", "uv": [ 6, 5, 10, 11 ] } + } + }, + { + "name": "Front Torch Top", + "from": [ 7, 6, 2 ], + "to": [ 9, 7, 4 ], + "faces": { + "up": { "texture": "#torch", "uv": [ 7, 6, 9, 8 ] } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/flexpeater_indicator.json b/src/main/resources/assets/create/models/block/flexpeater_indicator.json new file mode 100644 index 000000000..5ed46c25e --- /dev/null +++ b/src/main/resources/assets/create/models/block/flexpeater_indicator.json @@ -0,0 +1,19 @@ +{ + "textures": { + "flexpeater_off": "create:block/flexpeater_off" + }, + "elements": [ + { + "name": "Light", + "from": [ 3.96875, 1.96875, 3.96875 ], + "to": [ 12.03125, 3, 12.03125 ], + "faces": { + "north": { "texture": "#flexpeater_off", "uv": [ 4, 4, 12, 5 ], "rotation": 180 }, + "east": { "texture": "#flexpeater_off", "uv": [ 11, 4, 12, 12 ], "rotation": 90 }, + "south": { "texture": "#flexpeater_off", "uv": [ 4, 11, 12, 12 ] }, + "west": { "texture": "#flexpeater_off", "uv": [ 4, 12, 5, 4 ], "rotation": 90 }, + "up": { "texture": "#flexpeater_off", "uv": [ 4, 4, 12, 12 ] } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/flexpeater_powered.json b/src/main/resources/assets/create/models/block/flexpeater_powered.json new file mode 100644 index 000000000..c596d6b53 --- /dev/null +++ b/src/main/resources/assets/create/models/block/flexpeater_powered.json @@ -0,0 +1,7 @@ +{ + "parent": "create:block/flexpeater", + "textures": { + "flexpeater_off": "create:block/flexpeater_on", + "particle": "create:block/flexpeater_on" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/flexpeater_powered_powering.json b/src/main/resources/assets/create/models/block/flexpeater_powered_powering.json new file mode 100644 index 000000000..f9b173278 --- /dev/null +++ b/src/main/resources/assets/create/models/block/flexpeater_powered_powering.json @@ -0,0 +1,6 @@ +{ + "parent": "create:block/flexpeater_powered", + "textures": { + "torch": "minecraft:block/redstone_torch" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/flexpeater_powering.json b/src/main/resources/assets/create/models/block/flexpeater_powering.json new file mode 100644 index 000000000..6e25e1146 --- /dev/null +++ b/src/main/resources/assets/create/models/block/flexpeater_powering.json @@ -0,0 +1,6 @@ +{ + "parent": "create:block/flexpeater", + "textures": { + "torch": "minecraft:block/redstone_torch" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/mechanical_press_base.json b/src/main/resources/assets/create/models/block/mechanical_press_base.json new file mode 100644 index 000000000..52e0a616d --- /dev/null +++ b/src/main/resources/assets/create/models/block/mechanical_press_base.json @@ -0,0 +1,59 @@ +{ + "__comment": "Model generated using MrCrayfish's Model Creator (https://mrcrayfish.com/tools?id=mc)", + "textures": { + "gearbox_top": "create:block/gearbox_top", + "gearbox": "create:block/gearbox", + "mechanical_press_top": "create:block/mechanical_press_top", + "mechanical_press_bottom": "create:block/mechanical_press_bottom", + "particle": "create:block/gearbox" + }, + "elements": [ + { + "name": "Top", + "from": [ 0, 14, 0 ], + "to": [ 16, 16, 16 ], + "faces": { + "north": { "texture": "#gearbox", "uv": [ 0, 0, 16, 2 ] }, + "east": { "texture": "#gearbox", "uv": [ 0, 0, 16, 2 ] }, + "south": { "texture": "#gearbox", "uv": [ 0, 0, 16, 2 ] }, + "west": { "texture": "#gearbox", "uv": [ 0, 0, 16, 2 ] }, + "up": { "texture": "#mechanical_press_top", "uv": [ 0, 0, 16, 16 ] }, + "down": { "texture": "#gearbox", "uv": [ 0, 0, 16, 16 ] } + } + }, + { + "name": "Core", + "from": [ 2, 4, 1 ], + "to": [ 14, 14, 15 ], + "faces": { + "north": { "texture": "#gearbox", "uv": [ 2, 2, 14, 12 ] }, + "south": { "texture": "#gearbox", "uv": [ 2, 2, 14, 12 ] }, + "down": { "texture": "#mechanical_press_bottom", "uv": [ 2, 1, 14, 15 ] } + } + }, + { + "name": "Side", + "from": [ 0, 2, 0 ], + "to": [ 2, 14, 16 ], + "faces": { + "north": { "texture": "#gearbox_top", "uv": [ 14, 2, 16, 14 ] }, + "east": { "texture": "#gearbox_top", "uv": [ 0, 4, 16, 16 ] }, + "south": { "texture": "#gearbox_top", "uv": [ 0, 2, 2, 14 ] }, + "west": { "texture": "#gearbox_top", "uv": [ 0, 4, 16, 16 ] }, + "down": { "texture": "#gearbox_top", "uv": [ 0, 0, 2, 16 ] } + } + }, + { + "name": "Side", + "from": [ 14, 2, 0 ], + "to": [ 16, 14, 16 ], + "faces": { + "north": { "texture": "#gearbox_top", "uv": [ 0, 2, 2, 14 ] }, + "east": { "texture": "#gearbox_top", "uv": [ 0, 4, 16, 16 ] }, + "south": { "texture": "#gearbox_top", "uv": [ 14, 2, 16, 14 ] }, + "west": { "texture": "#gearbox_top", "uv": [ 0, 4, 16, 16 ] }, + "down": { "texture": "#gearbox_top", "uv": [ 14, 0, 16, 16 ] } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/mechanical_press_head.json b/src/main/resources/assets/create/models/block/mechanical_press_head.json new file mode 100644 index 000000000..2f38fe009 --- /dev/null +++ b/src/main/resources/assets/create/models/block/mechanical_press_head.json @@ -0,0 +1,87 @@ +{ + "__comment": "Model generated using MrCrayfish's Model Creator (https://mrcrayfish.com/tools?id=mc)", + "textures": { + "mechanical_press_head": "create:block/mechanical_press_head", + "mechanical_press_pole": "create:block/mechanical_press_pole" + }, + "elements": [ + { + "name": "Pole1Core", + "from": [ 6, 4, 6 ], + "to": [ 10, 14, 10 ], + "faces": { + "east": { "texture": "#mechanical_press_pole", "uv": [ 6, 6, 10, 16 ] }, + "west": { "texture": "#mechanical_press_pole", "uv": [ 6, 6, 10, 16 ] } + } + }, + { + "name": "Pole2Core", + "from": [ 6, 14, 6 ], + "to": [ 10, 27, 10 ], + "faces": { + "east": { "texture": "#mechanical_press_pole", "uv": [ 6, 0, 10, 13 ] }, + "west": { "texture": "#mechanical_press_pole", "uv": [ 6, 0, 10, 13 ] }, + "up": { "texture": "#mechanical_press_pole", "uv": [ 11, 1, 15, 5 ], "rotation": 180 } + } + }, + { + "name": "Pole1Side", + "from": [ 5, 4, 5 ], + "to": [ 11, 14, 6 ], + "faces": { + "north": { "texture": "#mechanical_press_pole", "uv": [ 0, 6, 6, 16 ] }, + "east": { "texture": "#mechanical_press_pole", "uv": [ 0, 6, 1, 16 ] }, + "south": { "texture": "#mechanical_press_pole", "uv": [ 0, 6, 6, 16 ] }, + "west": { "texture": "#mechanical_press_pole", "uv": [ 5, 6, 6, 16 ] } + } + }, + { + "name": "Pole1Side", + "from": [ 5, 4, 10 ], + "to": [ 11, 14, 11 ], + "faces": { + "north": { "texture": "#mechanical_press_pole", "uv": [ 0, 6, 6, 16 ] }, + "east": { "texture": "#mechanical_press_pole", "uv": [ 0, 6, 1, 16 ] }, + "south": { "texture": "#mechanical_press_pole", "uv": [ 0, 6, 6, 16 ] }, + "west": { "texture": "#mechanical_press_pole", "uv": [ 5, 6, 6, 16 ] } + } + }, + { + "name": "Pole2Side", + "from": [ 5, 14, 10 ], + "to": [ 11, 27, 11 ], + "faces": { + "north": { "texture": "#mechanical_press_pole", "uv": [ 0, 0, 6, 13 ] }, + "east": { "texture": "#mechanical_press_pole", "uv": [ 0, 0, 1, 13 ] }, + "south": { "texture": "#mechanical_press_pole", "uv": [ 0, 0, 6, 13 ] }, + "west": { "texture": "#mechanical_press_pole", "uv": [ 5, 0, 6, 13 ] }, + "up": { "texture": "#mechanical_press_pole", "uv": [ 10, 0, 16, 1 ], "rotation": 180 } + } + }, + { + "name": "Pole2Side", + "from": [ 5, 14, 5 ], + "to": [ 11, 27, 6 ], + "faces": { + "north": { "texture": "#mechanical_press_pole", "uv": [ 0, 0, 6, 13 ] }, + "east": { "texture": "#mechanical_press_pole", "uv": [ 0, 0, 1, 13 ] }, + "south": { "texture": "#mechanical_press_pole", "uv": [ 0, 0, 6, 13 ] }, + "west": { "texture": "#mechanical_press_pole", "uv": [ 5, 0, 6, 13 ] }, + "up": { "texture": "#mechanical_press_pole", "uv": [ 10, 5, 16, 6 ], "rotation": 180 } + } + }, + { + "name": "Head", + "from": [ 3, 0, 3 ], + "to": [ 13, 4, 13 ], + "faces": { + "north": { "texture": "#mechanical_press_head", "uv": [ 1, 0, 11, 4 ] }, + "east": { "texture": "#mechanical_press_head", "uv": [ 1, 0, 11, 4 ] }, + "south": { "texture": "#mechanical_press_head", "uv": [ 1, 0, 11, 4 ] }, + "west": { "texture": "#mechanical_press_head", "uv": [ 1, 0, 11, 4 ] }, + "up": { "texture": "#mechanical_press_head", "uv": [ 1, 5, 11, 15 ], "rotation": 180 }, + "down": { "texture": "#mechanical_press_head", "uv": [ 1, 5, 11, 15 ], "rotation": 180 } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/belt_support.json b/src/main/resources/assets/create/models/item/belt_support.json new file mode 100644 index 000000000..82774f10e --- /dev/null +++ b/src/main/resources/assets/create/models/item/belt_support.json @@ -0,0 +1,15 @@ +{ + "parent": "create:block/belt_support", + "display": { + "gui": { + "rotation": [ 30, 225, 0 ], + "translation": [ 0, -2.25, 0], + "scale":[ 0.45, 0.45, 0.45 ] + }, + "fixed": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, -2.75, 0], + "scale":[ 0.5, 0.5, 0.5 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/dough.json b/src/main/resources/assets/create/models/item/dough.json new file mode 100644 index 000000000..ad9f7a08c --- /dev/null +++ b/src/main/resources/assets/create/models/item/dough.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "create:item/dough" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/flexpeater.json b/src/main/resources/assets/create/models/item/flexpeater.json new file mode 100644 index 000000000..2aa1fe598 --- /dev/null +++ b/src/main/resources/assets/create/models/item/flexpeater.json @@ -0,0 +1,13 @@ +{ + "parent": "create:block/flexpeater", + "textures": { + "flexpeater_off": "create:block/flexpeater_item" + }, + "display": { + "fixed": { + "rotation": [ 270, 0, 0 ], + "translation": [ 0, 0, -3], + "scale":[ 0.5, 0.5, 0.5 ] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/flour.json b/src/main/resources/assets/create/models/item/flour.json new file mode 100644 index 000000000..eb88f7f82 --- /dev/null +++ b/src/main/resources/assets/create/models/item/flour.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "create:item/flour" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/iron_sheet.json b/src/main/resources/assets/create/models/item/iron_sheet.json new file mode 100644 index 000000000..4b66bd185 --- /dev/null +++ b/src/main/resources/assets/create/models/item/iron_sheet.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "create:item/iron_sheet" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/mechanical_press.json b/src/main/resources/assets/create/models/item/mechanical_press.json new file mode 100644 index 000000000..0a69efb81 --- /dev/null +++ b/src/main/resources/assets/create/models/item/mechanical_press.json @@ -0,0 +1,151 @@ +{ + "__comment": "Model generated using MrCrayfish's Model Creator (https://mrcrayfish.com/tools?id=mc)", + "parent": "block/block", + "textures": { + "mechanical_press_head": "create:block/mechanical_press_head", + "gearbox_top": "create:block/gearbox_top", + "mechanical_press_pole": "create:block/mechanical_press_pole", + "gearbox": "create:block/gearbox", + "mechanical_press_top": "create:block/mechanical_press_top", + "mechanical_press_bottom": "create:block/mechanical_press_bottom" + }, + "display": { + "gui": { + "rotation": [ 30, 225, 0 ], + "translation": [ 0, -2, 0], + "scale":[ 0.55, 0.55, 0.55 ] + }, + "fixed": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, -2.75, -0.0625], + "scale":[ 0.5, 0.5, 0.5 ] + } + }, + "elements": [ + { + "name": "Top", + "from": [ 0, 18, 0 ], + "to": [ 16, 20, 16 ], + "faces": { + "north": { "texture": "#gearbox", "uv": [ 0, 0, 16, 2 ] }, + "east": { "texture": "#gearbox", "uv": [ 0, 0, 16, 2 ] }, + "south": { "texture": "#gearbox", "uv": [ 0, 0, 16, 2 ] }, + "west": { "texture": "#gearbox", "uv": [ 0, 0, 16, 2 ] }, + "up": { "texture": "#mechanical_press_top", "uv": [ 0, 0, 16, 16 ], "rotation": 180 }, + "down": { "texture": "#gearbox", "uv": [ 0, 0, 16, 16 ], "rotation": 180 } + } + }, + { + "name": "Core", + "from": [ 2, 8, 1 ], + "to": [ 14, 18, 15 ], + "faces": { + "north": { "texture": "#gearbox", "uv": [ 2, 2, 14, 12 ] }, + "south": { "texture": "#gearbox", "uv": [ 2, 2, 14, 12 ] }, + "down": { "texture": "#mechanical_press_bottom", "uv": [ 2, 1, 14, 15 ], "rotation": 180 } + } + }, + { + "name": "Side", + "from": [ 14, 6, 0 ], + "to": [ 16, 18, 16 ], + "faces": { + "north": { "texture": "#gearbox_top", "uv": [ 0, 2, 2, 14 ] }, + "east": { "texture": "#gearbox_top", "uv": [ 0, 4, 16, 16 ] }, + "south": { "texture": "#gearbox_top", "uv": [ 14, 2, 16, 14 ] }, + "west": { "texture": "#gearbox_top", "uv": [ 0, 4, 16, 16 ] }, + "down": { "texture": "#gearbox_top", "uv": [ 0, 0, 2, 16 ], "rotation": 180 } + } + }, + { + "name": "Side", + "from": [ 0, 6, 0 ], + "to": [ 2, 18, 16 ], + "faces": { + "north": { "texture": "#gearbox_top", "uv": [ 14, 2, 16, 14 ] }, + "east": { "texture": "#gearbox_top", "uv": [ 0, 4, 16, 16 ] }, + "south": { "texture": "#gearbox_top", "uv": [ 0, 2, 2, 14 ] }, + "west": { "texture": "#gearbox_top", "uv": [ 0, 4, 16, 16 ] }, + "down": { "texture": "#gearbox_top", "uv": [ 14, 0, 16, 16 ], "rotation": 180 } + } + }, + { + "name": "Pole1Core", + "from": [ 6, 4, 6 ], + "to": [ 10, 14, 10 ], + "faces": { + "east": { "texture": "#mechanical_press_pole", "uv": [ 6, 6, 10, 16 ] }, + "west": { "texture": "#mechanical_press_pole", "uv": [ 6, 6, 10, 16 ] } + } + }, + { + "name": "Pole2Core", + "from": [ 6, 14, 6 ], + "to": [ 10, 27, 10 ], + "faces": { + "east": { "texture": "#mechanical_press_pole", "uv": [ 6, 0, 10, 13 ] }, + "west": { "texture": "#mechanical_press_pole", "uv": [ 6, 0, 10, 13 ] }, + "up": { "texture": "#mechanical_press_pole", "uv": [ 11, 1, 15, 5 ], "rotation": 180 } + } + }, + { + "name": "Pole1Side", + "from": [ 5, 4, 5 ], + "to": [ 11, 14, 6 ], + "faces": { + "north": { "texture": "#mechanical_press_pole", "uv": [ 0, 6, 6, 16 ] }, + "east": { "texture": "#mechanical_press_pole", "uv": [ 0, 6, 1, 16 ] }, + "south": { "texture": "#mechanical_press_pole", "uv": [ 0, 6, 6, 16 ] }, + "west": { "texture": "#mechanical_press_pole", "uv": [ 5, 6, 6, 16 ] } + } + }, + { + "name": "Pole1Side", + "from": [ 5, 4, 10 ], + "to": [ 11, 14, 11 ], + "faces": { + "north": { "texture": "#mechanical_press_pole", "uv": [ 0, 6, 6, 16 ] }, + "east": { "texture": "#mechanical_press_pole", "uv": [ 0, 6, 1, 16 ] }, + "south": { "texture": "#mechanical_press_pole", "uv": [ 0, 6, 6, 16 ] }, + "west": { "texture": "#mechanical_press_pole", "uv": [ 5, 6, 6, 16 ] } + } + }, + { + "name": "Pole2Side", + "from": [ 5, 14, 10 ], + "to": [ 11, 27, 11 ], + "faces": { + "north": { "texture": "#mechanical_press_pole", "uv": [ 0, 0, 6, 13 ] }, + "east": { "texture": "#mechanical_press_pole", "uv": [ 0, 0, 1, 13 ] }, + "south": { "texture": "#mechanical_press_pole", "uv": [ 0, 0, 6, 13 ] }, + "west": { "texture": "#mechanical_press_pole", "uv": [ 5, 0, 6, 13 ] }, + "up": { "texture": "#mechanical_press_pole", "uv": [ 10, 0, 16, 1 ], "rotation": 180 } + } + }, + { + "name": "Pole2Side", + "from": [ 5, 14, 5 ], + "to": [ 11, 27, 6 ], + "faces": { + "north": { "texture": "#mechanical_press_pole", "uv": [ 0, 0, 6, 13 ] }, + "east": { "texture": "#mechanical_press_pole", "uv": [ 0, 0, 1, 13 ] }, + "south": { "texture": "#mechanical_press_pole", "uv": [ 0, 0, 6, 13 ] }, + "west": { "texture": "#mechanical_press_pole", "uv": [ 5, 0, 6, 13 ] }, + "up": { "texture": "#mechanical_press_pole", "uv": [ 10, 5, 16, 6 ], "rotation": 180 } + } + }, + { + "name": "Head", + "from": [ 3, 0, 3 ], + "to": [ 13, 4, 13 ], + "faces": { + "north": { "texture": "#mechanical_press_head", "uv": [ 1, 0, 11, 4 ] }, + "east": { "texture": "#mechanical_press_head", "uv": [ 1, 0, 11, 4 ] }, + "south": { "texture": "#mechanical_press_head", "uv": [ 1, 0, 11, 4 ] }, + "west": { "texture": "#mechanical_press_head", "uv": [ 1, 0, 11, 4 ] }, + "up": { "texture": "#mechanical_press_head", "uv": [ 1, 5, 11, 15 ], "rotation": 180 }, + "down": { "texture": "#mechanical_press_head", "uv": [ 1, 5, 11, 15 ], "rotation": 180 } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/propeller.json b/src/main/resources/assets/create/models/item/propeller.json new file mode 100644 index 000000000..aa588a2b3 --- /dev/null +++ b/src/main/resources/assets/create/models/item/propeller.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "create:item/propeller" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/textures/block/belt.png b/src/main/resources/assets/create/textures/block/belt.png index d325e29d8251ec6544187974a382ec8ea4a6a80e..daede5a4f15fcabbde1c77bae0af741aab8ebe4b 100644 GIT binary patch delta 323 zcmV-J0lfag0)YdNBnkm@Qb$4nuFf3kks&940TxL_K~y+TeUiOygg^|06aIwI5h&78 zP|)%gy#FK6ASyZpLi`+%FYCQMa@k}GG;7bSjlJ(xRTV{%=lQBs;7Iep=bkV70O93lAbNtP9^ zG3H@-&GU1b4)tAE{SYHu06T4oKm}L_j7LhQCZG-q-N(^n7!@nPdq?r$C65*05<=>G z8C3e@tUE~WW#KEA7~u`Lb)D+@s23J(iEV(N;Y0+g8BX?qxENRc1CaKBjjK12tPnpH z;G=pINhb$@kIL4&d8`0_4-9c9 zJ`Q}Go}SL1i^V$bWHhadUISqvJ~y*VorLHA)!48&7~lwF_d(bUIZw z?6v1qTz~S(5H}?Z+btj*LD=1H7lUj`gb#-J#t9?15t<-*xSb3yhlhu&)k=2q z1cDM&22`2OMreYJMSq0?NI?F{<7Cu|id#T9g0QI; zOjiN)!W2GLR5s25u4@-0PXX%6P^in~2?QlbsI~E;-83LW^sE! zoAq}J1&3)u9)`B|0KF4_F0FP6P7DNTmR>m+kH-v=O)+^GLNQ?k%VP^B8{NMlXO`Ft z`KThO41cIHov|14QALp8H70{%&}QThR=0p+_9;kYBa08#uLZLFsG6cbR z(7@ek&j{GPiGf^9b{C&;R~ck6VlNbXA*fdn_CFo0u@~}DMUW_eu*O~}M@2!R{K4uL z5Pyy!QU0WN3&1O*c0t*qLJ6U$SVe(+>#^|!NL0HZrl_a@_Eu5RMrFu~id#T9g0QI; z7-UN#d@#f}uA&lu8}(5|P#I8VI={kl=|qD~FP67Q|jCM@2zG z`3YdNG1stJ*lFPB0>Tj_R8$nh+sl&|@-P&8q1X$FydZ3<1qRuY2p5Tsq`=}yF@EVgrF=#W`ig;X5id#T2`xGRyk!(V%EAlX8MdfP&fe6YL6($09 nHkWPz;Rs?>MWs}8d2sLt+uc{5vK+Lc00000NkvXXu0mjfzZ~J3 literal 1185 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1SD0tpLGH$#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6;>1s;*b3=DjSL74G){)!Z!phSslL`iUdT1k0gQ7S`0VrE{6US4X6f{C7? zp4neN&KE#)ggjjwLo%GtPTie%$AQOnd%56ryK4ht^akT-o|cP z-^XjyfByRruqsq!%6zF8$sTr|K|0|(z3OZj6)vAz@bOMVc$1OX*-K0G%)UG=sMxdH z*l(`=`t?!)`{Uz&WQ*}s6f*7XHFC-_cYbmE?b@r8d?qFZZ`j#r*Y>5DDU9J)<^2Uy z6)UIlJ8*^nm?NE$n!&yP$!$rkeeasYBSK~6o-AkkB{9kW68D-OmHjIjr%K11pHMR? zZ6}jP_{sCUCWc4S!<<YSQ&ASQ2d&xBiN1&UT!Foe5KlaX%VmLg?yO@>URAmqe^9n);`L$zj=4$HzMv*R!PR%v$Oho6~WAO&eEf+rmff zS=SbBvS_^HCaJh}w&Ih3ic4zC|;<3 z)AF2cmc%J-c7qtpkkw-M8+JmC`4Vrx2047c^F~S1$Jtp6`W64qX%KCw6WhA)1C@ZJM9#Fh8m04n)%&Jgex98c4Lz(>hD;?e=3^T*ndY`lH5t_0wW13p&MsO5gk!JbY(j$OT1 z0}~P7)Rpi=ANhxG!jBT?Pdf4qBI`a_0+ZtfvAC1ljYDegvg&VGWo2{1pZANQ%KRnb z5t5#D!OU9bJLW0=R5@G38nABCeCdoNaKt+7)ViwGe(DN5LY@Q^GJyQGkALdnhw|4y X+un#yaJ~gBK^Qz;{an^LB{Ts5sr?lg diff --git a/src/main/resources/assets/create/textures/block/belt_support_side.png b/src/main/resources/assets/create/textures/block/belt_support_side.png new file mode 100644 index 0000000000000000000000000000000000000000..8c456585738e5fbc52b97555e1f63cec2c1a1743 GIT binary patch literal 491 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0f0$FK~y+TZBofj z!!QsXJGRrNX-T0%Y?n$Pfw;j1apc5}8xlwUhF{COaKq=3B~{kmHa_);Q$d4yvJ@hAnI%YyE_%Z^?2mwi;*TJ z3HSS9>ybv=;Gv=7n!v*~o1@P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0eeYAK~y+TZIVe& z13?T$Yv`_|Ge8mqg6u#b!ImXUF2D|nCAZ-UoH0ZpQzu>311~r#BEYh&?{9bcySnu2 z^QHRF7OPyqQLh7zQNO>v_z--kU22-9uF85-tOxz0qO6_ON;Q+|)VWS#sx-0lRjwaz zx}jF7QHe8hWa(=dENkx>G5C+A*H8E7B))2d{XTVXkZT{hE){aN@kAr7P&j2$oElC_ zNl3sjb7g4s!}T!t6?w;5A~*up0JIWw2zHWCKbdb&kK3?fhbhu!0;3pWugETN|9<{b*WsPA6A}2X(i%^~PTGB@o0~SS~EmXC>8~12J z9})FYx|r}-EbVuIids9_Zt1^916OBnFM6nF4NNr1GI>$rvXVq3v76y|)N?j|c>Vk@ zT!1iKQIhJP9e!PZBw@gj+�HCwI=$p^!cOB2DH^_(cBez!&3JwAEf@|bzO#F%2j c#8fHu1;t|-5***2g8%>k07*qoM6N<$f*P;S3;+NC literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/block/flexpeater_item.png b/src/main/resources/assets/create/textures/block/flexpeater_item.png new file mode 100644 index 0000000000000000000000000000000000000000..c7725b0d4c0b421caac0a9956426eacb4df81bdf GIT binary patch literal 527 zcmV+q0`UEbP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGizyJUazyWI3i3tDz0i;PpK~y+TO_9$^ z0#Ovk?}%j$lp|A_iy#QWRk&~^6ygiCD|(KoAaUm+GoPS$aO1{RPtZC72?Z&2A3(}VE`M_iSdR~-@=Co{D`JVm`T%}(vZI%`$7^@y{(19>JF<3m-RVe` z8am<2XcdwT7vMBtv6yeMF}Lm5o;P3oj9d{=UOMOl2*ec;+AtU1RB&W75|1CI{FkLX zR}DJgFL0&Qcdso#f`+W_}H!oB1qhenlLKWiXZ|5(tX{@DsPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!2kdb!2!6DYwZ940i#JoK~y+TO_5Ja z0#OvjpJG`9<;Ya#A_zjkIbE2dpc5? zlD=5T80D7(3s4Q1&)qE!#b^EACzJV5Wj{{;)h$8kLnLE>K2gs=Qq7DQk`rms6$g}yb-e@8R_OXiz< Qod5s;07*qoM6N<$f?h1;A^-pY literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/block/flexpeater_on.png b/src/main/resources/assets/create/textures/block/flexpeater_on.png new file mode 100644 index 0000000000000000000000000000000000000000..2d6d50c091fe2629bced15e3c793d3a688eed207 GIT binary patch literal 529 zcmV+s0`C2ZP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!2kdb!2!6DYwZ940j5brK~y+TU6R2{ z0#Ou(N3$%U95FH%K@c*#aN$ZQe22ny4-l?u5#mOIq=-OzfLclrlyA{WS|t(+Lh4GT zMje^7?|Q~TI_TlQ|NZYd|Gj5C*<4oFb!{HKUQd8a!Ym4W{Nwxaezz}cZAYcrXU!hl zvAtMyH#%drL4Saz-mLpL4GM;WfnY%P%FpGiLg8b{_jrDm&=Nwr;kmiJNggCYtwxIi zu7Q654NWTV6=ex28Fl6~16Yh|wQ3kf@xCaQIIIrfM{PD$dbm5W#@4Sr8Cs^kzG00_ zEq$#vW-?lNWx)kF4VX?Rt1JR*;n1c%nSPs=2q-Td)ByzIitsK6ruIm%f5jh(Y-0%> z<#{ou1O6OWn)cOh2#}y5S#FQa=|Ip<*sV~QI|vCFn$CO>V8rRbLOSp!*6^p-?RGkC zemuI6WCUW{r|vqNE&#hm?nM+pvS79-FPB!6mhyo7WnKWe^i%?P~Vau0t3>0(TN*sSJ(dlkQ)9Y TDEyCU00000NkvXXu0mjf%)s1n literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/block/mechanical_press_bottom.png b/src/main/resources/assets/create/textures/block/mechanical_press_bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..662f783ea00688c7950e399bbb569188b6c1c64a GIT binary patch literal 549 zcmV+=0^0qFP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!2kdb!2!6DYwZ940lG;aHEW@o?MS^f2Mtdz=gr8R%m?+;wpvECzyU>(QF^Py9lEq__A zWSL%iTOKdC591$hT3Y*WN|UiynhC z)1S6ED0KoNP=X>!U}V73Kn`u50ZLFL30#@H@X?|FxmK*)l6^s&>vJ0`bJuB$0g+&L z`r(YgfEm$o(wYgqy@QLV1@vGa(e__3@7!hhEvR!M?*TI00000NkvXXu0mjf7Dx8C literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/block/mechanical_press_head.png b/src/main/resources/assets/create/textures/block/mechanical_press_head.png new file mode 100644 index 0000000000000000000000000000000000000000..b3a85575e422f2904d3c193a4cd55c9a8ec2844c GIT binary patch literal 462 zcmV;<0WtoGP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0b@x-K~y+TeUlBY zf_G%j6B#ai|rqehn&x6CCIW&*CD(~$N6%(^maTRH3%{i5FAC( zC+rWZ3He>usdQG}%*r`?=bRRnBtv*ulO&PNW+UtMS|*c8{~L?rSi&&W^D(Fb-pey^ z#>i-(t*h1Qe*$D8_Z!HyE>Qi&VxeS1c&n^sKrRX(L>XX^C@d<6=;wfp6p^YE3?W3E zaW@tWlmLl1n;Hs>Tohcd*Ivo!9PlB7wGt;*dXE7+AA=H*4aqhr1X@;WAwE9`i3(%1 zFilgn<#MTkoY4(bj;V0l?Y8^uHN!8dhQs0T^>-F|0}@*n)&T37)Bpeg07*qoM6N<$ Ef}^FtkN^Mx literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/block/mechanical_press_pole.png b/src/main/resources/assets/create/textures/block/mechanical_press_pole.png new file mode 100644 index 0000000000000000000000000000000000000000..41546ab74ccd920b20d07f8a3c8350d522756cb2 GIT binary patch literal 542 zcmV+(0^$9MP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0kcU&K~y+TrII~s z+fWpSUn$B*{UJmI0T&w&#fe2qLPJHSLZSb{WB-Nc4*m;WLN-qxI@S;mC4{yRb#PMT z3>^%{CT>;4trbyOma2OsyDqgtp%1(|@6o;Ia&(Ub!!W{DtA%2*2*+`tX&O464mhP! z38T>nzVAcVb$VB=Rw=gIZHi*A*CS(D78qkxFo%2Fw#nCOHGvoN{qvf7y)KA*!h49; zB_3z5QH@jyFYt44PI{6zp~)usW%~U-#^W)0k)9DV&qWx_k}Sq^S>k@fiS?gPQeCQ6yKiUZ?ei;jR zb@DFi@o&W2{0rEb16+AJjL9K}ndg|uN2JgGF)qICkxxUM&s9}b$g+$=p+Gr@dqq)_ zY&Bwda|-3Ii-$knq7s}VH*6utK9RP+zQMlqk$f79OZ219o%}gP;=30lZZ-crg)~H) z-H~zJY4pzr6z5oWymlYd0dqZMAFM-?;)X2dkW?kJ$kU)P2I^CoQyn*MJjTu9GZG)8 g$u#n5{O1^fUs8g#zA>^6(EtDd07*qoM6N<$g7YWnF8}}l literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/block/mechanical_press_top.png b/src/main/resources/assets/create/textures/block/mechanical_press_top.png new file mode 100644 index 0000000000000000000000000000000000000000..06b9ed01cecccc2d235f75067ab48b5c67098124 GIT binary patch literal 528 zcmV+r0`L8aP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!TLjsOUFS z0z}WEX;0f}Pv^HE9Ulg~0d1&ZZT~Rk#ks3$_OsKItJ~_k{vj1h%Az>0Z{6i!7>87^ zHw=Zmq{=tf4oNF6Cw4Fx)LSo|R%<01_51xl-{VH3K}c%+84X8cI1Xk>X}{l>+-@d= z6%uAUnUvJ}<_4sL&FZ$!eWgOMm(4~Z5gbKPu)40N)9H4*?eqB<2m{QO*peM^sLto} z7C%ESms3@hAx^gv2&^tZiO@tM!N*8jWfMp!E9u5i)0$=j6PU=x=f$Ed16&peOQn)% z<7l%9d;>=olTsYRFtDPVl*6q|CJ2k}R4Ro~>ICqFTtY;D89L0QK~5>67v?}HccaHD zw665@+>OUV44sOeo)rrzf63$bOd8hW;dk44ofy`glX(f`u%tWsIx;Y9 z?C1WI$jZRL%n;xc;>yp!pv29sA|RkAAz`kdV6Uz1qNnF+WaMpX>SJc+Yi{mmVFA=T z3PwX*?Yc65;-K>RG-P1)dhigO9%b zyY^+a4`e>kA%pe z(CCw_9tr({c4fCT4d3bAZ(uU3UAHE4Gn34P?QbF$2*sZ37gcDq+8(}`@yU+$oqbC%Uypk(0b>gTe~DWM4fpktj8 literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/item/dough.png b/src/main/resources/assets/create/textures/item/dough.png new file mode 100644 index 0000000000000000000000000000000000000000..8ebb4970180bcedd71fbf6fb8d36678330c6401e GIT binary patch literal 345 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBuf-vKbiP>*~g6}+C978PplVdig@iMD6aC%MV)i7gNE`Cln z{R@d=HYMg<==8;&|kIZCkb^y)|) zI{ZiS+WI+s-{sCZ{Q35hF-DoAVGrXWn>{uGf*c177?yBG8v7{gH6$IFZGQeh*F@99 z3?6(f`)mF&i8eCqU|f)KYjd^u9f28XDZL6kavc&c8N?h;p1hb~cgAgko4^6--V+R# mOB@+um3er6o;h-Wf#K!czQ=m2TXcawXYh3Ob6Mw<&;$Sjr+U`_ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/item/flour.png b/src/main/resources/assets/create/textures/item/flour.png new file mode 100644 index 0000000000000000000000000000000000000000..4656b37e5635ce9a089bcdc1c88ab6350f3954eb GIT binary patch literal 348 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sBufG}g$wN6f;;73mv#}Etu+aC%MVZR=os9k%5^ zd!mN8Xakd=eBACmZ~vcOp8oIt{;j|NZ{z*zpcqm)XCuSri^tCOKD>SXJ5S7=ri7|j zTYmD~{p&4xu&aS#HKW2=w`0o+d<}m6-EGdJAGaqVVpj?G;Yp#@2ii6?lsYh;35%J< z+Uj!P)f3Sp2TeE*Fbgh`d=fL^S#i35@>QN6l zCI>S(IXT&+vx6s?88qx>h&1#FEZM?;LqI~_B|Gb7!%Jm%f9Fy~R;4qZlP(GT-&_5E q=ELXP^ApU>3?mfyex5l3^!vV#C!Jc&dF+6mXYh3Ob6Mw<&;$VcM~OKA literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/item/iron_sheet.png b/src/main/resources/assets/create/textures/item/iron_sheet.png new file mode 100644 index 0000000000000000000000000000000000000000..788f2279805ddf18356e56a038de32cdfb14fa46 GIT binary patch literal 448 zcmV;x0YCnUP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0aZyvK~y+TrIEo- z!axv)|FQ*oQwWVgP8eEWf+rCq!3V)N=qnWa3Y@q|2uJYRY7=g9A)2TcXxO%PmbNKI zIM6@ob~ZcTKeIc?D=7@aI6O~M{6DFaMe=k&thj!lSe%Q{FrYLJBngGVq{ zfa|&#kH;_!BTXh&j^hKUd*4N~c>|?fhEh^cQp(VE9o+ZnILw*|1A?E1LwtSzz}s%H z^*ngd$2kX=Ib@$fW(>EwhElOeNNSRH@V;81aoxZt-+@ISivX%fCObJYkc-&)9PM@+ znx+v#9ZLm@NTz9G{jo;1S`o=)5ClF{RmJ5+1vRxM3QVU{dQ8k_Gr^^gNY`k!TIfIY zQNOCgkKiB(@I0B|Ww8*+B-^&JTrM%6&-ZM03W-VQu7g+iO@O1(NSq}iFb@A8V=@iL qal}3g{1vhLC5J=@d6Z7!JORHz&#l%nnWQ)X0000Md|c8j|L(bl^8$O=8i0V|@E=$11vWko7aI8G?F?de)v%sA%)-KZ zqdYQ}v#Y%pzL5^_;bPc!UpqU zFtKn${Z7l9j!yp_88fnTPXgj}wPLkDC+2a>gS!_?Rqs8CYdBwm2^A=MR`MS5ksO Ya>AOKl{a6$1BMxcr>mdKI;Vst09KWfe*gdg literal 0 HcmV?d00001 diff --git a/src/main/resources/data/create/loot_tables/blocks/flexpeater.json b/src/main/resources/data/create/loot_tables/blocks/flexpeater.json new file mode 100644 index 000000000..f197c10a5 --- /dev/null +++ b/src/main/resources/data/create/loot_tables/blocks/flexpeater.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "create:flexpeater" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/create/loot_tables/blocks/mechanical_press.json b/src/main/resources/data/create/loot_tables/blocks/mechanical_press.json new file mode 100644 index 000000000..8844f26c5 --- /dev/null +++ b/src/main/resources/data/create/loot_tables/blocks/mechanical_press.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "name": "create:mechanical_press" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/dough.json b/src/main/resources/data/create/recipes/crafting/dough.json new file mode 100644 index 000000000..c442e003b --- /dev/null +++ b/src/main/resources/data/create/recipes/crafting/dough.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "create:flour" + }, + { + "item": "minecraft:water_bucket" + } + ], + "result": { + "item": "create:dough", + "count": 1 + }, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/encased_fan.json b/src/main/resources/data/create/recipes/crafting/encased_fan.json index 407e4f33d..ae505f03e 100644 --- a/src/main/resources/data/create/recipes/crafting/encased_fan.json +++ b/src/main/resources/data/create/recipes/crafting/encased_fan.json @@ -13,7 +13,7 @@ "item": "create:andesite_alloy_cube" }, "S": { - "item": "create:shaft" + "item": "create:propeller" }, "R": { "tag": "minecraft:logs" diff --git a/src/main/resources/data/create/recipes/crafting/flexpeater.json b/src/main/resources/data/create/recipes/crafting/flexpeater.json new file mode 100644 index 000000000..1b9a63661 --- /dev/null +++ b/src/main/resources/data/create/recipes/crafting/flexpeater.json @@ -0,0 +1,31 @@ +{ + "type": "crafting_shaped", + "pattern": [ + "RCT", + "SSS" + ], + "key": { + "S": { + "item": "minecraft:stone" + }, + "C": { + "item": "minecraft:clock" + }, + "R": { + "item": "minecraft:redstone" + }, + "T": { + "item": "minecraft:redstone_torch" + } + }, + "result": { + "item": "create:flexpeater", + "count": 1 + }, + "conditions": [ + { + "type": "create:module", + "module": "logistics" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/mechanical_press.json b/src/main/resources/data/create/recipes/crafting/mechanical_press.json new file mode 100644 index 000000000..f861310aa --- /dev/null +++ b/src/main/resources/data/create/recipes/crafting/mechanical_press.json @@ -0,0 +1,35 @@ +{ + "type": "crafting_shaped", + "pattern": [ + "APA", + "BCB", + "AIA" + ], + "key": { + "B": { + "tag": "minecraft:planks" + }, + "A": { + "item": "create:andesite_alloy_cube" + }, + "P": { + "item": "create:piston_pole" + }, + "I": { + "item": "minecraft:iron_block" + }, + "C": { + "item": "create:cogwheel" + } + }, + "result": { + "item": "create:mechanical_press", + "count": 1 + }, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/propeller.json b/src/main/resources/data/create/recipes/crafting/propeller.json new file mode 100644 index 000000000..cd8364a24 --- /dev/null +++ b/src/main/resources/data/create/recipes/crafting/propeller.json @@ -0,0 +1,26 @@ +{ + "type": "crafting_shaped", + "pattern": [ + " I ", + "ISI", + " I " + ], + "key": { + "I": { + "item": "create:iron_sheet" + }, + "S": { + "item": "create:shaft" + } + }, + "result": { + "item": "create:propeller", + "count": 1 + }, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crushing/wheat.json b/src/main/resources/data/create/recipes/crushing/wheat.json new file mode 100644 index 000000000..810141b3c --- /dev/null +++ b/src/main/resources/data/create/recipes/crushing/wheat.json @@ -0,0 +1,26 @@ +{ + "type": "create:crushing", + "group": "minecraft:misc", + "ingredients": [ + { + "item": "minecraft:wheat" + } + ], + "results": [ + { + "item": "create:flour", + "count": 1 + }, + { + "item": "create:flour", + "count": 2, + "chance": 0.25 + }, + { + "item": "minecraft:wheat_seeds", + "count": 1, + "chance": 0.25 + } + ], + "processingTime": 150 +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/pressing/iron_ingot.json b/src/main/resources/data/create/recipes/pressing/iron_ingot.json new file mode 100644 index 000000000..fb403fcef --- /dev/null +++ b/src/main/resources/data/create/recipes/pressing/iron_ingot.json @@ -0,0 +1,16 @@ +{ + "type": "create:pressing", + "group": "minecraft:misc", + "ingredients": [ + { + "item": "minecraft:iron_ingot" + } + ], + "results": [ + { + "item": "create:iron_sheet", + "count": 1 + } + ], + "processingTime": 100 +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/smelting/bread.json b/src/main/resources/data/create/recipes/smelting/bread.json new file mode 100644 index 000000000..e06db8c60 --- /dev/null +++ b/src/main/resources/data/create/recipes/smelting/bread.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:smelting", + "ingredient": { + "item": "create:dough" + }, + "result": "minecraft:bread", + "experience": 0.1, + "cookingtime": 200, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/dolomite.json b/src/main/resources/data/create/recipes/smelting/dolomite.json similarity index 100% rename from src/main/resources/data/create/recipes/crafting/palettes/dolomite.json rename to src/main/resources/data/create/recipes/smelting/dolomite.json diff --git a/src/main/resources/data/create/recipes/crafting/palettes/gabbro.json b/src/main/resources/data/create/recipes/smelting/gabbro.json similarity index 100% rename from src/main/resources/data/create/recipes/crafting/palettes/gabbro.json rename to src/main/resources/data/create/recipes/smelting/gabbro.json diff --git a/src/main/resources/data/create/recipes/crafting/palettes/limestone.json b/src/main/resources/data/create/recipes/smelting/limestone.json similarity index 100% rename from src/main/resources/data/create/recipes/crafting/palettes/limestone.json rename to src/main/resources/data/create/recipes/smelting/limestone.json diff --git a/src/main/resources/data/create/recipes/splashing/flour.json b/src/main/resources/data/create/recipes/splashing/flour.json new file mode 100644 index 000000000..f9dc10a4d --- /dev/null +++ b/src/main/resources/data/create/recipes/splashing/flour.json @@ -0,0 +1,16 @@ +{ + "type": "create:splashing", + "group": "minecraft:misc", + "ingredients": [ + { + "item": "create:flour" + } + ], + "results": [ + { + "item": "create:dough", + "count": 1 + } + ], + "processingTime": 100 +} \ No newline at end of file