From 4a2335672da7420ba75f340be7bfbec7e88e05b8 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Thu, 12 Sep 2019 10:00:15 +0200 Subject: [PATCH] This? Yes. That? No. - Added config values to toggle the modules of create. - Added config options to disable unstable features in case of a crashloop. - Cleaned up the Encased Fan TileEntity - Changed in-world processing from static lists to item nbt. --- .../java/com/simibubi/create/AllBlocks.java | 48 +-- .../com/simibubi/create/AllContainers.java | 5 - .../java/com/simibubi/create/AllItems.java | 55 +++- .../com/simibubi/create/AllTileEntities.java | 4 - src/main/java/com/simibubi/create/Create.java | 6 +- .../com/simibubi/create/CreateClient.java | 3 + .../com/simibubi/create/CreateConfig.java | 208 +++++++----- .../com/simibubi/create/CreateItemGroup.java | 29 ++ src/main/java/com/simibubi/create/Events.java | 2 - .../com/simibubi/create/modules/IModule.java | 36 +++ .../create/modules/ModuleLoadedCondition.java | 54 ++++ .../contraptions/RotationPropagator.java | 11 +- .../CrushingWheelControllerBlock.java | 10 +- .../CrushingWheelControllerTileEntity.java | 10 +- .../receivers/EncasedFanParticleHandler.java | 121 +++++++ .../receivers/EncasedFanTileEntity.java | 306 ++++-------------- .../constructs/ChassisTileEntity.java | 9 +- .../MechanicalBearingTileEntity.java | 9 +- .../MechanicalPistonTileEntity.java | 10 +- .../constructs/MovingConstructHandler.java | 7 +- .../constructs/RotationConstruct.java | 8 +- .../constructs/TranslationConstruct.java | 11 + .../modules/economy/ShopShelfContainer.java | 8 +- .../modules/economy/ShopShelfTileEntity.java | 4 +- .../InWorldItemProcessingHandler.java | 52 --- .../modules/logistics/InWorldProcessing.java | 54 ++-- .../modules/logistics/block/IExtractor.java | 10 + .../schematics/ServerSchematicLoader.java | 1 - .../recipes/crafting/belt_connector.json | 8 +- .../create/recipes/crafting/belt_funnel.json | 8 +- .../recipes/crafting/blueprint_and_quill.json | 8 +- .../data/create/recipes/crafting/clutch.json | 8 +- .../create/recipes/crafting/cocoa_log.json | 8 +- .../create/recipes/crafting/cogwheel.json | 8 +- .../data/create/recipes/crafting/contact.json | 8 +- .../recipes/crafting/crushing_wheel.json | 8 +- .../data/create/recipes/crafting/drill.json | 8 +- .../recipes/crafting/empty_blueprint.json | 8 +- .../create/recipes/crafting/encased_belt.json | 8 +- .../create/recipes/crafting/encased_fan.json | 8 +- .../recipes/crafting/encased_shaft.json | 8 +- .../recipes/crafting/entity_detector.json | 8 +- .../create/recipes/crafting/extractor.json | 8 +- .../create/recipes/crafting/flexcrate.json | 8 +- .../data/create/recipes/crafting/gearbox.json | 8 +- .../create/recipes/crafting/gearshift.json | 8 +- .../create/recipes/crafting/harvester.json | 8 +- .../recipes/crafting/large_cogwheel.json | 8 +- .../recipes/crafting/linked_extractor.json | 8 +- .../recipes/crafting/mechanical_bearing.json | 8 +- .../recipes/crafting/mechanical_piston.json | 8 +- .../data/create/recipes/crafting/motor.json | 8 +- .../recipes/crafting/palettes/dolomite.json | 8 +- .../crafting/palettes/dolomite_bricks.json | 8 +- .../crafting/palettes/dolomite_slab.json | 8 +- .../crafting/palettes/dolomite_stairs.json | 8 +- .../crafting/palettes/dolomite_wall.json | 8 +- .../recipes/crafting/palettes/gabbro.json | 8 +- .../crafting/palettes/gabbro_bricks.json | 8 +- .../palettes/gabbro_bricks_stairs.json | 8 +- .../crafting/palettes/gabbro_bricks_wall.json | 8 +- .../crafting/palettes/gabbro_slab.json | 8 +- .../crafting/palettes/gabbro_stairs.json | 8 +- .../crafting/palettes/gabbro_wall.json | 8 +- .../palettes/indented_gabbro_slab.json | 8 +- .../recipes/crafting/palettes/limestone.json | 8 +- .../crafting/palettes/limestone_bricks.json | 8 +- .../palettes/limestone_bricks_slab.json | 8 +- .../palettes/limestone_bricks_stairs.json | 8 +- .../palettes/limestone_bricks_wall.json | 8 +- .../crafting/palettes/limestone_slab.json | 8 +- .../crafting/palettes/limestone_stairs.json | 8 +- .../crafting/palettes/limestone_wall.json | 8 +- .../palettes/paved_gabbro_bricks_slab.json | 8 +- .../crafting/palettes/polished_dolomite.json | 8 +- .../crafting/palettes/polished_gabbro.json | 8 +- .../crafting/palettes/polished_limestone.json | 8 +- .../palettes/polished_limestone_slab.json | 8 +- .../polished_weathered_limestone.json | 8 +- .../polished_weathered_limestone_slab.json | 8 +- .../palettes/weathered_limestone.json | 8 +- .../palettes/weathered_limestone_bricks.json | 8 +- .../weathered_limestone_bricks_slab.json | 8 +- .../weathered_limestone_bricks_stairs.json | 8 +- .../weathered_limestone_bricks_wall.json | 8 +- .../palettes/weathered_limestone_slab.json | 8 +- .../palettes/weathered_limestone_stairs.json | 8 +- .../palettes/weathered_limestone_wall.json | 8 +- .../create/recipes/crafting/piston_pole.json | 8 +- .../recipes/crafting/placement_handgun.json | 8 +- .../recipes/crafting/pulse_repeater.json | 8 +- .../recipes/crafting/redstone_bridge.json | 8 +- .../recipes/crafting/rotation_chassis.json | 8 +- .../recipes/crafting/schematic_table.json | 8 +- .../recipes/crafting/schematicannon.json | 8 +- .../data/create/recipes/crafting/shaft.json | 8 +- .../crafting/sticky_mechanical_piston.json | 8 +- .../create/recipes/crafting/stockswitch.json | 8 +- .../recipes/crafting/symmetry_wand.json | 8 +- .../recipes/crafting/translation_chassis.json | 8 +- .../recipes/crafting/tree_fertilizer.json | 8 +- .../create/recipes/crafting/turntable.json | 8 +- .../create/recipes/crafting/water_wheel.json | 8 +- .../recipes/stonecutting/andesite_bricks.json | 8 +- .../recipes/stonecutting/diorite_bricks.json | 8 +- .../recipes/stonecutting/dolomite_bricks.json | 8 +- .../recipes/stonecutting/dolomite_pillar.json | 8 +- .../recipes/stonecutting/dolomite_slab.json | 8 +- .../recipes/stonecutting/dolomite_stairs.json | 8 +- .../recipes/stonecutting/dolomite_wall.json | 8 +- .../recipes/stonecutting/gabbro_bricks.json | 8 +- .../stonecutting/gabbro_bricks_stairs.json | 8 +- .../stonecutting/gabbro_bricks_stairs2.json | 8 +- .../stonecutting/gabbro_bricks_wall.json | 8 +- .../stonecutting/gabbro_bricks_wall2.json | 8 +- .../recipes/stonecutting/gabbro_slab.json | 8 +- .../recipes/stonecutting/gabbro_stairs.json | 8 +- .../recipes/stonecutting/gabbro_wall.json | 8 +- .../recipes/stonecutting/granite_bricks.json | 8 +- .../stonecutting/indented_gabbro_slab.json | 8 +- .../stonecutting/indented_gabbro_slab2.json | 8 +- .../stonecutting/limestone_bricks.json | 8 +- .../stonecutting/limestone_bricks_slab.json | 8 +- .../stonecutting/limestone_bricks_slab2.json | 8 +- .../stonecutting/limestone_bricks_stairs.json | 8 +- .../limestone_bricks_stairs2.json | 8 +- .../stonecutting/limestone_bricks_wall.json | 8 +- .../stonecutting/limestone_bricks_wall2.json | 8 +- .../stonecutting/limestone_pillar.json | 8 +- .../recipes/stonecutting/limestone_slab.json | 8 +- .../stonecutting/limestone_stairs.json | 8 +- .../recipes/stonecutting/limestone_wall.json | 8 +- .../stonecutting/mossy_gabbro_bricks.json | 8 +- .../stonecutting/paved_gabbro_bricks.json | 8 +- .../paved_gabbro_bricks_slab.json | 8 +- .../paved_gabbro_bricks_slab2.json | 8 +- .../stonecutting/polished_dolomite.json | 8 +- .../recipes/stonecutting/polished_gabbro.json | 8 +- .../stonecutting/polished_limestone.json | 8 +- .../stonecutting/polished_limestone_slab.json | 8 +- .../polished_limestone_slab2.json | 8 +- .../polished_weathered_limestone.json | 8 +- .../polished_weathered_limestone_slab.json | 8 +- .../polished_weathered_limestone_slab2.json | 8 +- .../slightly_mossy_gabbro_bricks.json | 8 +- .../weathered_limestone_bricks.json | 8 +- .../weathered_limestone_bricks_slab.json | 8 +- .../weathered_limestone_bricks_slab2.json | 8 +- .../weathered_limestone_bricks_stairs.json | 8 +- .../weathered_limestone_bricks_stairs2.json | 8 +- .../weathered_limestone_bricks_wall.json | 8 +- .../weathered_limestone_bricks_wall2.json | 8 +- .../weathered_limestone_pillar.json | 8 +- .../weathered_limestone_slab.json | 8 +- .../weathered_limestone_stairs.json | 8 +- .../weathered_limestone_wall.json | 8 +- 156 files changed, 1517 insertions(+), 598 deletions(-) create mode 100644 src/main/java/com/simibubi/create/modules/IModule.java create mode 100644 src/main/java/com/simibubi/create/modules/ModuleLoadedCondition.java create mode 100644 src/main/java/com/simibubi/create/modules/contraptions/receivers/EncasedFanParticleHandler.java delete mode 100644 src/main/java/com/simibubi/create/modules/logistics/InWorldItemProcessingHandler.java diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index e1c907dfc..d363e89e4 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -4,6 +4,7 @@ import com.simibubi.create.foundation.block.IWithoutBlockItem; import com.simibubi.create.foundation.block.ProperStairsBlock; import com.simibubi.create.foundation.block.RenderUtilityAxisBlock; import com.simibubi.create.foundation.block.RenderUtilityBlock; +import com.simibubi.create.modules.IModule; import com.simibubi.create.modules.contraptions.generators.MotorBlock; import com.simibubi.create.modules.contraptions.generators.WaterWheelBlock; import com.simibubi.create.modules.contraptions.receivers.CrushingWheelBlock; @@ -28,7 +29,6 @@ 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.economy.ShopShelfBlock; import com.simibubi.create.modules.gardens.CocoaLogBlock; import com.simibubi.create.modules.logistics.block.BeltFunnelBlock; import com.simibubi.create.modules.logistics.block.EntityDetectorBlock; @@ -60,14 +60,14 @@ import net.minecraftforge.registries.IForgeRegistry; public enum AllBlocks { - // Schematics + __SCHEMATICS__(), SCHEMATICANNON(new SchematicannonBlock()), SCHEMATICANNON_CONNECTOR(new RenderUtilityBlock()), SCHEMATICANNON_PIPE(new RenderUtilityBlock()), CREATIVE_CRATE(new CreativeCrateBlock()), SCHEMATIC_TABLE(new SchematicTableBlock()), - // Kinetics + __CONTRAPTIONS__(), SHAFT(new ShaftBlock(Properties.from(Blocks.ANDESITE))), COGWHEEL(new CogWheelBlock(false)), LARGE_COGWHEEL(new CogWheelBlock(true)), @@ -79,17 +79,14 @@ public enum AllBlocks { BELT(new BeltBlock()), BELT_PULLEY(new RenderUtilityAxisBlock()), BELT_ANIMATION(new RenderUtilityBlock()), - MOTOR(new MotorBlock()), WATER_WHEEL(new WaterWheelBlock()), - ENCASED_FAN(new EncasedFanBlock()), ENCASED_FAN_INNER(new RenderUtilityAxisBlock()), TURNTABLE(new TurntableBlock()), SHAFT_HALF(new ShaftHalfBlock()), CRUSHING_WHEEL(new CrushingWheelBlock()), CRUSHING_WHEEL_CONTROLLER(new CrushingWheelControllerBlock()), - MECHANICAL_PISTON(new MechanicalPistonBlock(false)), STICKY_MECHANICAL_PISTON(new MechanicalPistonBlock(true)), MECHANICAL_PISTON_HEAD(new MechanicalPistonHeadBlock()), @@ -98,12 +95,10 @@ public enum AllBlocks { MECHANICAL_BEARING_TOP(new ShaftHalfBlock()), TRANSLATION_CHASSIS(new TranslationChassisBlock()), ROTATION_CHASSIS(new RotationChassisBlock()), - - // Get rid o' these DRILL(new DrillBlock()), HARVESTER(new HarvesterBlock()), - // Logistics + __LOGISTICS__(), CONTACT(new ContactBlock()), REDSTONE_BRIDGE(new RedstoneBridgeBlock()), STOCKSWITCH(new StockswitchBlock()), @@ -114,22 +109,18 @@ public enum AllBlocks { ENTITY_DETECTOR(new EntityDetectorBlock()), PULSE_REPEATER(new PulseRepeaterBlock()), - // Symmetry + __CURIOSITIES__(), SYMMETRY_PLANE(new PlaneSymmetryBlock()), SYMMETRY_CROSSPLANE(new CrossPlaneSymmetryBlock()), SYMMETRY_TRIPLEPLANE(new TriplePlaneSymmetryBlock()), - // Gardens + __GARDENS__(), COCOA_LOG(new CocoaLogBlock()), - // Economy - SHOP_SHELF(new ShopShelfBlock()), - - // Palettes + __PALETTES__(), ANDESITE_BRICKS(new Block(Properties.from(Blocks.ANDESITE))), DIORITE_BRICKS(new Block(Properties.from(Blocks.DIORITE))), GRANITE_BRICKS(new Block(Properties.from(Blocks.GRANITE))), - GABBRO(new Block(Properties.from(Blocks.GRANITE)), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), POLISHED_GABBRO(new Block(Properties.from(GABBRO.block))), GABBRO_BRICKS(new Block(Properties.from(GABBRO.block)), ComesWith.STAIRS, ComesWith.WALL), @@ -137,18 +128,15 @@ public enum AllBlocks { INDENTED_GABBRO(new Block(Properties.from(GABBRO.block)), ComesWith.SLAB), SLIGHTLY_MOSSY_GABBRO_BRICKS(new Block(Properties.from(GABBRO.block))), MOSSY_GABBRO_BRICKS(new Block(Properties.from(GABBRO.block))), - LIMESTONE(new Block(Properties.from(Blocks.SANDSTONE)), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), LIMESTONE_BRICKS(new Block(Properties.from(LIMESTONE.block)), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), POLISHED_LIMESTONE(new Block(Properties.from(LIMESTONE.block)), ComesWith.SLAB), LIMESTONE_PILLAR(new RotatedPillarBlock(Properties.from(LIMESTONE.block))), - WEATHERED_LIMESTONE(new Block(Properties.from(Blocks.ANDESITE)), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), WEATHERED_LIMESTONE_BRICKS(new Block(Properties.from(WEATHERED_LIMESTONE.block)), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), POLISHED_WEATHERED_LIMESTONE(new Block(Properties.from(WEATHERED_LIMESTONE.block)), ComesWith.SLAB), WEATHERED_LIMESTONE_PILLAR(new RotatedPillarBlock(Properties.from(WEATHERED_LIMESTONE.block))), - DOLOMITE(new Block(Properties.from(Blocks.QUARTZ_BLOCK)), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), DOLOMITE_BRICKS(new Block(Properties.from(DOLOMITE.block))), POLISHED_DOLOMITE(new Block(Properties.from(DOLOMITE.block))), @@ -160,12 +148,27 @@ public enum AllBlocks { WALL, FENCE, FENCE_GATE, SLAB, STAIRS; } + private static class CategoryTracker { + static IModule currentModule; + } + public Block block; public Block[] alsoRegistered; + public IModule module; + + private AllBlocks() { + CategoryTracker.currentModule = new IModule() { + @Override + public String getModuleName() { + return name().toLowerCase().replaceAll("__", ""); + } + }; + } private AllBlocks(Block block, ComesWith... comesWith) { this.block = block; this.block.setRegistryName(Create.ID, this.name().toLowerCase()); + this.module = CategoryTracker.currentModule; alsoRegistered = new Block[comesWith.length]; for (int i = 0; i < comesWith.length; i++) @@ -174,6 +177,9 @@ public enum AllBlocks { public static void registerBlocks(IForgeRegistry registry) { for (AllBlocks block : values()) { + if (block.get() == null) + continue; + registry.register(block.block); for (Block extra : block.alsoRegistered) registry.register(extra); @@ -182,6 +188,8 @@ public enum AllBlocks { public static void registerItemBlocks(IForgeRegistry registry) { for (AllBlocks block : values()) { + if (block.get() == null) + continue; if (block.get() instanceof IWithoutBlockItem) continue; @@ -193,7 +201,7 @@ public enum AllBlocks { private static void registerAsItem(IForgeRegistry registry, Block blockIn) { registry.register( - new BlockItem(blockIn, AllItems.standardProperties()).setRegistryName(blockIn.getRegistryName())); + new BlockItem(blockIn, AllItems.standardItemProperties()).setRegistryName(blockIn.getRegistryName())); } public Block get() { diff --git a/src/main/java/com/simibubi/create/AllContainers.java b/src/main/java/com/simibubi/create/AllContainers.java index fe69d7728..fb0153905 100644 --- a/src/main/java/com/simibubi/create/AllContainers.java +++ b/src/main/java/com/simibubi/create/AllContainers.java @@ -1,7 +1,5 @@ package com.simibubi.create; -import com.simibubi.create.modules.economy.ShopShelfContainer; -import com.simibubi.create.modules.economy.ShopShelfScreen; import com.simibubi.create.modules.logistics.block.FlexcrateContainer; import com.simibubi.create.modules.logistics.block.FlexcrateScreen; import com.simibubi.create.modules.schematics.block.SchematicTableContainer; @@ -32,8 +30,6 @@ public enum AllContainers { SCHEMATICANNON(SchematicannonContainer::new), FLEXCRATE(FlexcrateContainer::new), - SHOP_SHELF(ShopShelfContainer::new), - ; public ContainerType type; @@ -58,7 +54,6 @@ public enum AllContainers { bind(SCHEMATIC_TABLE, SchematicTableScreen::new); bind(SCHEMATICANNON, SchematicannonScreen::new); bind(FLEXCRATE, FlexcrateScreen::new); - bind(SHOP_SHELF, ShopShelfScreen::new); } @OnlyIn(Dist.CLIENT) diff --git a/src/main/java/com/simibubi/create/AllItems.java b/src/main/java/com/simibubi/create/AllItems.java index 1691d580a..a25b26aef 100644 --- a/src/main/java/com/simibubi/create/AllItems.java +++ b/src/main/java/com/simibubi/create/AllItems.java @@ -1,6 +1,7 @@ package com.simibubi.create; import com.simibubi.create.foundation.item.IItemWithColorHandler; +import com.simibubi.create.modules.IModule; import com.simibubi.create.modules.contraptions.relays.belt.BeltItem; import com.simibubi.create.modules.curiosities.ChromaticCompoundCubeItem; import com.simibubi.create.modules.curiosities.placementHandgun.BuilderGunItem; @@ -33,20 +34,21 @@ import net.minecraftforge.registries.IForgeRegistry; @EventBusSubscriber(value = Dist.CLIENT, bus = Bus.MOD) public enum AllItems { + __CURIOSITIES__(), SYMMETRY_WAND(new SymmetryWandItem( - standardProperties().setTEISR(() -> () -> renderUsing(AllItemRenderers.SYMMETRY_WAND)))), - + standardItemProperties().setTEISR(() -> () -> renderUsing(AllItemRenderers.SYMMETRY_WAND)))), PLACEMENT_HANDGUN( new BuilderGunItem(new Properties().setTEISR(() -> () -> renderUsing(AllItemRenderers.BUILDER_GUN)))), - ANDESITE_ALLOY_CUBE(new Item(standardProperties())), - BLAZE_BRASS_CUBE(new Item(standardProperties())), - CHORUS_CHROME_CUBE(new Item(standardProperties().rarity(Rarity.UNCOMMON))), - SHADOW_STEEL_CUBE(new Item(standardProperties().rarity(Rarity.UNCOMMON))), - ROSE_QUARTZ(new Item(standardProperties())), - REFINED_ROSE_QUARTZ(new Item(standardProperties())), - CHROMATIC_COMPOUND_CUBE(new ChromaticCompoundCubeItem(standardProperties().rarity(Rarity.UNCOMMON))), - REFINED_RADIANCE_CUBE(new Item(standardProperties().rarity(Rarity.RARE))), + __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())), + CHROMATIC_COMPOUND_CUBE(new ChromaticCompoundCubeItem(standardItemProperties().rarity(Rarity.UNCOMMON))), + REFINED_RADIANCE_CUBE(new Item(standardItemProperties().rarity(Rarity.RARE))), // BLAZING_PICKAXE(new BlazingToolItem(1, -2.8F, standardProperties(), PICKAXE)), // BLAZING_SHOVEL(new BlazingToolItem(1.5F, -3.0F, standardProperties(), SHOVEL)), @@ -62,30 +64,51 @@ public enum AllItems { // SHADOW_STEEL_MATTOCK(new ShadowSteelToolItem(2.5F, -1.5F, standardProperties(), SHOVEL, AXE, HOE)), // SHADOW_STEEL_SWORD(new ShadowSteelToolItem(3, -2.0F, standardProperties(), SWORD)), - TREE_FERTILIZER(new TreeFertilizerItem(standardProperties())), + __GARDENS__(), + TREE_FERTILIZER(new TreeFertilizerItem(standardItemProperties())), - EMPTY_BLUEPRINT(new Item(standardProperties().maxStackSize(1))), - BLUEPRINT_AND_QUILL(new SchematicAndQuillItem(standardProperties().maxStackSize(1))), - BLUEPRINT(new SchematicItem(standardProperties())), - BELT_CONNECTOR(new BeltItem(standardProperties())), + __SCHEMATICS__(), + 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())), ; + private static class CategoryTracker { + static IModule currentModule; + } + // Common public Item item; + public IModule module; + + private AllItems() { + CategoryTracker.currentModule = new IModule() { + @Override + public String getModuleName() { + return name().toLowerCase().replaceAll("__", ""); + } + }; + } private AllItems(Item item) { this.item = item; this.item.setRegistryName(Create.ID, this.name().toLowerCase()); + this.module = CategoryTracker.currentModule; } - public static Properties standardProperties() { + public static Properties standardItemProperties() { return new Properties().group(Create.creativeTab); } public static void registerItems(IForgeRegistry iForgeRegistry) { for (AllItems item : values()) { + if (item.get() == null) + continue; iForgeRegistry.register(item.get()); } } diff --git a/src/main/java/com/simibubi/create/AllTileEntities.java b/src/main/java/com/simibubi/create/AllTileEntities.java index 430627398..84f1828b3 100644 --- a/src/main/java/com/simibubi/create/AllTileEntities.java +++ b/src/main/java/com/simibubi/create/AllTileEntities.java @@ -27,7 +27,6 @@ import com.simibubi.create.modules.contraptions.relays.ShaftTileEntity; import com.simibubi.create.modules.contraptions.relays.SplitShaftTileEntityRenderer; import com.simibubi.create.modules.contraptions.relays.belt.BeltTileEntity; import com.simibubi.create.modules.contraptions.relays.belt.BeltTileEntityRenderer; -import com.simibubi.create.modules.economy.ShopShelfTileEntity; import com.simibubi.create.modules.logistics.block.BeltFunnelTileEntity; import com.simibubi.create.modules.logistics.block.EntityDetectorTileEntity; import com.simibubi.create.modules.logistics.block.EntityDetectorTileEntityRenderer; @@ -90,9 +89,6 @@ public enum AllTileEntities { BELT_FUNNEL(BeltFunnelTileEntity::new, AllBlocks.BELT_FUNNEL), ENTITY_DETECTOR(EntityDetectorTileEntity::new, AllBlocks.ENTITY_DETECTOR), - // Economy - SHOP_SHELF(ShopShelfTileEntity::new, AllBlocks.SHOP_SHELF), - ; private Supplier supplier; diff --git a/src/main/java/com/simibubi/create/Create.java b/src/main/java/com/simibubi/create/Create.java index bee4ee78c..aabfb8089 100644 --- a/src/main/java/com/simibubi/create/Create.java +++ b/src/main/java/com/simibubi/create/Create.java @@ -3,15 +3,16 @@ package com.simibubi.create; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import com.simibubi.create.modules.ModuleLoadedCondition; import com.simibubi.create.modules.contraptions.receivers.constructs.MovingConstructHandler; import com.simibubi.create.modules.logistics.FrequencyHandler; -import com.simibubi.create.modules.logistics.InWorldItemProcessingHandler; import com.simibubi.create.modules.schematics.ServerSchematicLoader; import net.minecraft.block.Block; import net.minecraft.item.Item; import net.minecraft.item.ItemGroup; import net.minecraft.item.crafting.IRecipeSerializer; +import net.minecraftforge.common.crafting.CraftingHelper; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.ModLoadingContext; @@ -33,7 +34,6 @@ public class Create { public static ItemGroup creativeTab = new CreateItemGroup(); public static ServerSchematicLoader schematicReceiver; public static FrequencyHandler frequencyHandler; - public static InWorldItemProcessingHandler itemProcessingHandler; public static MovingConstructHandler constructHandler; public static ModConfig config; @@ -46,9 +46,9 @@ public class Create { @SubscribeEvent public static void init(final FMLCommonSetupEvent event) { schematicReceiver = new ServerSchematicLoader(); - itemProcessingHandler = new InWorldItemProcessingHandler(); frequencyHandler = new FrequencyHandler(); constructHandler = new MovingConstructHandler(); + CraftingHelper.register(new ModuleLoadedCondition.Serializer()); AllPackets.registerPackets(); } diff --git a/src/main/java/com/simibubi/create/CreateClient.java b/src/main/java/com/simibubi/create/CreateClient.java index 0281389f6..db1de6bb6 100644 --- a/src/main/java/com/simibubi/create/CreateClient.java +++ b/src/main/java/com/simibubi/create/CreateClient.java @@ -1,5 +1,6 @@ package com.simibubi.create; +import com.simibubi.create.modules.contraptions.receivers.EncasedFanParticleHandler; import com.simibubi.create.modules.schematics.ClientSchematicLoader; import com.simibubi.create.modules.schematics.client.SchematicAndQuillHandler; import com.simibubi.create.modules.schematics.client.SchematicHandler; @@ -18,6 +19,7 @@ public class CreateClient { public static SchematicHandler schematicHandler; public static SchematicHologram schematicHologram; public static SchematicAndQuillHandler schematicAndQuillHandler; + public static EncasedFanParticleHandler fanParticles; public static ModConfig config; @@ -27,6 +29,7 @@ public class CreateClient { schematicHandler = new SchematicHandler(); schematicHologram = new SchematicHologram(); schematicAndQuillHandler = new SchematicAndQuillHandler(); + fanParticles = new EncasedFanParticleHandler(); AllKeys.register(); AllContainers.registerScreenFactories(); diff --git a/src/main/java/com/simibubi/create/CreateConfig.java b/src/main/java/com/simibubi/create/CreateConfig.java index 6c724a593..cee1e49f8 100644 --- a/src/main/java/com/simibubi/create/CreateConfig.java +++ b/src/main/java/com/simibubi/create/CreateConfig.java @@ -6,6 +6,7 @@ import java.nio.file.Paths; import org.apache.commons.lang3.tuple.Pair; import net.minecraftforge.common.ForgeConfigSpec; +import net.minecraftforge.common.ForgeConfigSpec.BooleanValue; import net.minecraftforge.common.ForgeConfigSpec.Builder; import net.minecraftforge.common.ForgeConfigSpec.ConfigValue; import net.minecraftforge.common.ForgeConfigSpec.DoubleValue; @@ -23,171 +24,236 @@ public class CreateConfig { parameters = specPair.getLeft(); } + // Modules + public BooleanValue enableSchematics; + public BooleanValue enableCuriosities; + public BooleanValue enableContraptions; + public BooleanValue enablePalettes; + public BooleanValue enableLogistics; + public BooleanValue enableGardens; + + // Damage Control + public BooleanValue freezeRotationPropagator; + public BooleanValue freezeCrushing; + public BooleanValue freezeInWorldProcessing; + public BooleanValue freezeRotationConstructs; + public BooleanValue freezePistonConstructs; + public BooleanValue freezeExtractors; + // Schematics public IntValue maxSchematics, maxTotalSchematicSize, maxSchematicPacketSize, schematicIdleTimeout; public IntValue schematicannonDelay, schematicannonSkips; public DoubleValue schematicannonGunpowderWorth, schematicannonFuelUsage; public ConfigValue schematicPath; - + // Curiosities public IntValue maxSymmetryWandRange; - + // Contraptions public IntValue maxBeltLength, crushingDamage, maxMotorSpeed, maxRotationSpeed; - public IntValue fanMaxPushDistance, fanMaxPullDistance, fanBlockCheckRate, fanRotationArgmax; + public IntValue fanMaxPushDistance, fanMaxPullDistance, fanBlockCheckRate, fanRotationArgmax, inWorldProcessingTime; public IntValue maxChassisForTranslation, maxChassisForRotation, maxChassisRange, maxPistonPoles; - + // Logistics public IntValue extractorDelay, extractorAmount, linkRange; - + // Gardens public DoubleValue cocoaLogGrowthSpeed; CreateConfig(final ForgeConfigSpec.Builder builder) { - - // Schematics - initSchematics(builder); + initGeneral(builder); initContraptions(builder); initCuriosities(builder); initLogistics(builder); initGardens(builder); } + private void initGeneral(Builder builder) { + builder.comment( + "Configure which Modules should be accessible. This only affects Creative Menus and Recipes - any blocks and items already present will not stop working or disappear.") + .push("modules"); + String basePath = "create.config.modules."; + String name = ""; + + name = "enableSchematics"; + enableSchematics = builder.translation(basePath + name).define(name, true); + + name = "enableContraptions"; + enableContraptions = builder.translation(basePath + name).define(name, true); + + name = "enableCuriosities"; + enableCuriosities = builder.translation(basePath + name).define(name, true); + + name = "enableGardens"; + enableGardens = builder.translation(basePath + name).define(name, true); + + name = "enableLogistics"; + enableLogistics = builder.translation(basePath + name).define(name, true); + + name = "enablePalettes"; + enablePalettes = builder.translation(basePath + name).define(name, true); + + builder.pop(); + builder.comment("In case of repeated crashing, you can inhibit related game mechanics for Troubleshooting.") + .push("damageControl"); + basePath = "create.config.damageControl."; + + name = "freezeCrushing"; + freezeCrushing = builder.comment("", "In case Crushing Wheels crushed your server.") + .translation(basePath + name).define(name, false); + + name = "freezeExtractors"; + freezeExtractors = builder.comment("", "In case Extractors pulled the plug.").translation(basePath + name) + .define(name, false); + + name = "freezeInWorldProcessing"; + freezeInWorldProcessing = builder.comment("", "In case Encased Fans tried smelting your hardware.") + .translation(basePath + name).define(name, false); + + name = "freezeRotationPropagator"; + freezeRotationPropagator = builder + .comment("", "Pauses rotation logic altogether - Use if crash mentions RotationPropagators.") + .translation(basePath + name).define(name, false); + + name = "freezeRotationConstructs"; + freezeRotationConstructs = builder.comment("", "In case Mechanical Bearings turned against you.") + .translation(basePath + name).define(name, false); + + name = "freezePistonConstructs"; + freezePistonConstructs = builder.comment("", "In case Mechanical Pistons pushed it too far.") + .translation(basePath + name).define(name, false); + + builder.pop(); + } + private void initGardens(Builder builder) { builder.comment("The Gardens Module").push("gardens"); - String basePath = "create.config.gardens"; + String basePath = "create.config.gardens."; String name = ""; - + name = "cocoaLogGrowthSpeed"; - cocoaLogGrowthSpeed = builder - .comment("", "% of random Ticks causing a Cocoa log to grow.") + cocoaLogGrowthSpeed = builder.comment("", "% of random Ticks causing a Cocoa log to grow.") .translation(basePath + name).defineInRange(name, 0D, 20D, 100D); - + builder.pop(); } private void initLogistics(Builder builder) { builder.comment("The Logistics Module").push("logistics"); - String basePath = "create.config.logistics"; + String basePath = "create.config.logistics."; String name = ""; - + name = "extractorDelay"; extractorDelay = builder .comment("", "The amount of game ticks an Extractor waits after pulling an item successfully.") .translation(basePath + name).defineInRange(name, 20, 1, Integer.MAX_VALUE); - + name = "extractorAmount"; extractorAmount = builder .comment("", "The amount of items an extractor pulls at a time without an applied filter.") .translation(basePath + name).defineInRange(name, 16, 1, 64); - + name = "linkRange"; - linkRange = builder - .comment("", "Maximum possible range in blocks of redstone link connections.") + linkRange = builder.comment("", "Maximum possible range in blocks of redstone link connections.") .translation(basePath + name).defineInRange(name, 128, 4, Integer.MAX_VALUE); - + builder.pop(); } private void initContraptions(Builder builder) { builder.comment("The Contraptions Module").push("contraptions"); - String basePath = "create.config.contraptions"; + String basePath = "create.config.contraptions."; String name = ""; - + name = "maxBeltLength"; - maxBeltLength = builder - .comment("", "Maximum length in blocks of mechanical belts.") + maxBeltLength = builder.comment("", "Maximum length in blocks of mechanical belts.") .translation(basePath + name).defineInRange(name, 20, 5, Integer.MAX_VALUE); - + name = "crushingDamage"; - crushingDamage = builder - .comment("", "Damage dealt by active Crushing Wheels.") - .translation(basePath + name).defineInRange(name, 4, 0, Integer.MAX_VALUE); - + crushingDamage = builder.comment("", "Damage dealt by active Crushing Wheels.").translation(basePath + name) + .defineInRange(name, 4, 0, Integer.MAX_VALUE); + { builder.comment("Encased Fan").push("encasedFan"); basePath = "create.config.contraptions.encasedFan"; - + name = "fanBlockCheckRate"; fanBlockCheckRate = builder .comment("", "Game ticks between Fans checking for anything blocking their air flow.") .translation(basePath + name).defineInRange(name, 100, 20, Integer.MAX_VALUE); - + name = "fanMaxPushDistance"; - fanMaxPushDistance = builder - .comment("", "Maximum distance in blocks Fans can push entities.") + fanMaxPushDistance = builder.comment("", "Maximum distance in blocks Fans can push entities.") .translation(basePath + name).defineInRange(name, 20, 1, Integer.MAX_VALUE); - + name = "fanMaxPullDistance"; - fanMaxPullDistance = builder - .comment("", "Maximum distance in blocks from where Fans can pull entities.") + fanMaxPullDistance = builder.comment("", "Maximum distance in blocks from where Fans can pull entities.") .translation(basePath + name).defineInRange(name, 5, 1, Integer.MAX_VALUE); - + name = "fanRotationArgmax"; - fanRotationArgmax = builder - .comment("", "Rotation speed at which the maximum stats of fans are reached.") + fanRotationArgmax = builder.comment("", "Rotation speed at which the maximum stats of fans are reached.") .translation(basePath + name).defineInRange(name, 8192, 64, Integer.MAX_VALUE); - - + + name = "inWorldProcessingTime"; + inWorldProcessingTime = builder + .comment("", "Game ticks required for a Fan-based processing recipe to take effect.") + .translation(basePath + name).defineInRange(name, 150, 0, Integer.MAX_VALUE); + builder.pop(); } - + { builder.comment("Mechanical Pistons and Bearings").push("constructs"); - basePath = "create.config.contraptions.constructs"; - + basePath = "create.config.contraptions.constructs."; + name = "maxChassisRange"; - maxChassisRange = builder - .comment("", "Maximum value of a chassis attachment range.") + maxChassisRange = builder.comment("", "Maximum value of a chassis attachment range.") .translation(basePath + name).defineInRange(name, 16, 1, Integer.MAX_VALUE); - + name = "maxChassisForRotation"; maxChassisForRotation = builder .comment("", "Maximum amount of chassis blocks movable by a Mechanical Bearing.") .translation(basePath + name).defineInRange(name, 16, 1, Integer.MAX_VALUE); - + name = "maxChassisForTranslation"; maxChassisForTranslation = builder .comment("", "Maximum amount of chassis blocks movable by a Mechanical Piston.") .translation(basePath + name).defineInRange(name, 16, 1, Integer.MAX_VALUE); - + name = "maxPistonPoles"; - maxPistonPoles = builder - .comment("", "Maximum amount of extension poles behind a Mechanical Piston.") + maxPistonPoles = builder.comment("", "Maximum amount of extension poles behind a Mechanical Piston.") .translation(basePath + name).defineInRange(name, 64, 1, Integer.MAX_VALUE); - + builder.pop(); } - + name = "maxMotorSpeed"; - maxMotorSpeed = builder - .comment("", "Maximum allowed speed of a configurable motor.") + maxMotorSpeed = builder.comment("", "Maximum allowed speed of a configurable motor.") .translation(basePath + name).defineInRange(name, 4096, 64, Integer.MAX_VALUE); - + name = "maxRotationSpeed"; - maxRotationSpeed = builder - .comment("", "Maximum allowed rotation speed for any Kinetic Tile.") + maxRotationSpeed = builder.comment("", "Maximum allowed rotation speed for any Kinetic Tile.") .translation(basePath + name).defineInRange(name, 16384, 64, Integer.MAX_VALUE); - + builder.pop(); } - + private void initCuriosities(Builder builder) { builder.comment("The Curiosities Module").push("curiosities"); - String basePath = "create.config.curiosities"; + String basePath = "create.config.curiosities."; String name = ""; - + name = "maxSymmetryWandRange"; maxSymmetryWandRange = builder .comment("", "The Maximum Distance to an active mirror for the symmetry wand to trigger.") .translation(basePath + name).defineInRange(name, 50, 10, Integer.MAX_VALUE); - + builder.pop(); } public void initSchematics(final ForgeConfigSpec.Builder builder) { builder.comment("The Schematics Module").push("schematics"); - String basePath = "create.config.schematics"; + String basePath = "create.config.schematics."; String name = ""; name = "maxSchematics"; @@ -219,23 +285,21 @@ public class CreateConfig { basePath = "create.config.schematics.schematicannon"; name = "schematicannonDelay"; - schematicannonDelay = builder.comment("", - "Amount of game ticks between shots of the cannon. Higher => Slower") + schematicannonDelay = builder + .comment("", "Amount of game ticks between shots of the cannon. Higher => Slower") .translation(basePath + name).defineInRange(name, 10, 1, Integer.MAX_VALUE); name = "schematicannonSkips"; - schematicannonSkips = builder.comment("", - "Amount of block positions per tick scanned by a running cannon. Higher => Faster") + schematicannonSkips = builder + .comment("", "Amount of block positions per tick scanned by a running cannon. Higher => Faster") .translation(basePath + name).defineInRange(name, 10, 1, Integer.MAX_VALUE); name = "schematicannonGunpowderWorth"; - schematicannonGunpowderWorth = builder.comment("", - "% of Schematicannon's Fuel filled by 1 Gunpowder.") + schematicannonGunpowderWorth = builder.comment("", "% of Schematicannon's Fuel filled by 1 Gunpowder.") .translation(basePath + name).defineInRange(name, 20D, 0D, 100D); name = "schematicannonFuelUsage"; - schematicannonFuelUsage = builder.comment("", - "% of Schematicannon's Fuel used for each fired block.") + schematicannonFuelUsage = builder.comment("", "% of Schematicannon's Fuel used for each fired block.") .translation(basePath + name).defineInRange(name, 0.05D, 0D, 100D); builder.pop(); } diff --git a/src/main/java/com/simibubi/create/CreateItemGroup.java b/src/main/java/com/simibubi/create/CreateItemGroup.java index 381e5ff6c..4fdd1e99c 100644 --- a/src/main/java/com/simibubi/create/CreateItemGroup.java +++ b/src/main/java/com/simibubi/create/CreateItemGroup.java @@ -1,7 +1,11 @@ package com.simibubi.create; +import com.simibubi.create.foundation.block.IWithoutBlockItem; + +import net.minecraft.block.Block; import net.minecraft.item.ItemGroup; import net.minecraft.item.ItemStack; +import net.minecraft.util.NonNullList; public final class CreateItemGroup extends ItemGroup { @@ -13,4 +17,29 @@ public final class CreateItemGroup extends ItemGroup { public ItemStack createIcon() { return new ItemStack(AllItems.SYMMETRY_WAND.get()); } + + @Override + public void fill(NonNullList items) { + for (AllItems item : AllItems.values()) { + if (item.get() == null) + continue; + if (!item.module.isEnabled()) + continue; + + item.get().fillItemGroup(this, items); + } + + for (AllBlocks block : AllBlocks.values()) { + if (block.get() == null) + continue; + if (!block.module.isEnabled()) + continue; + if (block.get() instanceof IWithoutBlockItem) + continue; + + block.get().asItem().fillItemGroup(this, items); + for (Block alsoRegistered : block.alsoRegistered) + alsoRegistered.asItem().fillItemGroup(this, items); + } + } } diff --git a/src/main/java/com/simibubi/create/Events.java b/src/main/java/com/simibubi/create/Events.java index 324cb5170..b45da129d 100644 --- a/src/main/java/com/simibubi/create/Events.java +++ b/src/main/java/com/simibubi/create/Events.java @@ -27,7 +27,6 @@ public class Events { @SubscribeEvent public static void onLoadWorld(WorldEvent.Load event) { IWorld world = event.getWorld(); - Create.itemProcessingHandler.onLoadWorld(world); Create.frequencyHandler.onLoadWorld(world); Create.constructHandler.onLoadWorld(world); } @@ -35,7 +34,6 @@ public class Events { @SubscribeEvent public static void onUnloadWorld(WorldEvent.Unload event) { IWorld world = event.getWorld(); - Create.itemProcessingHandler.onUnloadWorld(world); Create.frequencyHandler.onUnloadWorld(world); Create.constructHandler.onUnloadWorld(world); } diff --git a/src/main/java/com/simibubi/create/modules/IModule.java b/src/main/java/com/simibubi/create/modules/IModule.java new file mode 100644 index 000000000..53baa417a --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/IModule.java @@ -0,0 +1,36 @@ +package com.simibubi.create.modules; + +import com.simibubi.create.CreateConfig; + +public interface IModule { + + public static boolean isActive(String module) { + if (module.equals("materials")) + return true; + + CreateConfig conf = CreateConfig.parameters; + switch (module) { + case "contraptions": + return conf.enableContraptions.get(); + case "palettes": + return conf.enablePalettes.get(); + case "curiosities": + return conf.enableCuriosities.get(); + case "logistics": + return conf.enableLogistics.get(); + case "schematics": + return conf.enableSchematics.get(); + case "gardens": + return conf.enableGardens.get(); + default: + return false; + } + } + + public default boolean isEnabled() { + return isActive(getModuleName()); + } + + public String getModuleName(); + +} diff --git a/src/main/java/com/simibubi/create/modules/ModuleLoadedCondition.java b/src/main/java/com/simibubi/create/modules/ModuleLoadedCondition.java new file mode 100644 index 000000000..aa7016d98 --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/ModuleLoadedCondition.java @@ -0,0 +1,54 @@ +package com.simibubi.create.modules; + +import com.google.gson.JsonObject; +import com.simibubi.create.Create; + +import net.minecraft.util.JSONUtils; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.common.crafting.conditions.ICondition; +import net.minecraftforge.common.crafting.conditions.IConditionSerializer; + +public class ModuleLoadedCondition implements ICondition { + + private static final ResourceLocation NAME = new ResourceLocation(Create.ID, "module"); + protected String module; + + public ModuleLoadedCondition(String module) { + this.module = module; + } + + @Override + public ResourceLocation getID() { + return NAME; + } + + @Override + public boolean test() { + return IModule.isActive(module); + } + + @Override + public String toString() { + return "module_loaded(\"" + module + "\")"; + } + + public static class Serializer implements IConditionSerializer { + public static final Serializer INSTANCE = new Serializer(); + + @Override + public void write(JsonObject json, ModuleLoadedCondition value) { + json.addProperty("module", value.module); + } + + @Override + public ModuleLoadedCondition read(JsonObject json) { + return new ModuleLoadedCondition(JSONUtils.getString(json, "module")); + } + + @Override + public ResourceLocation getID() { + return NAME; + } + } + +} diff --git a/src/main/java/com/simibubi/create/modules/contraptions/RotationPropagator.java b/src/main/java/com/simibubi/create/modules/contraptions/RotationPropagator.java index 50b6f2798..f635e2330 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/RotationPropagator.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/RotationPropagator.java @@ -6,6 +6,7 @@ import java.util.LinkedList; import java.util.List; import com.simibubi.create.AllBlocks; +import com.simibubi.create.CreateConfig; import com.simibubi.create.modules.contraptions.base.IRotate; import com.simibubi.create.modules.contraptions.base.KineticTileEntity; import com.simibubi.create.modules.contraptions.relays.EncasedBeltBlock; @@ -133,9 +134,9 @@ public class RotationPropagator { * @param pos */ public static void handleAdded(World worldIn, BlockPos pos, KineticTileEntity addedTE) { - if (worldIn.isRemote) + if (worldIn.isRemote || isFrozen()) return; - if (!worldIn.isAreaLoaded(pos, 1)) + if (!worldIn.isBlockPresent(pos)) return; if (addedTE.getSpeed() != 0) { @@ -205,7 +206,7 @@ public class RotationPropagator { * @param removedTE */ public static void handleRemoved(World worldIn, BlockPos pos, KineticTileEntity removedTE) { - if (worldIn.isRemote) + if (worldIn.isRemote || isFrozen()) return; if (removedTE == null) return; @@ -323,5 +324,9 @@ public class RotationPropagator { return neighbours; } + + public static boolean isFrozen() { + return CreateConfig.parameters.freezeRotationPropagator.get(); + } } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/CrushingWheelControllerBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/CrushingWheelControllerBlock.java index 4efea5a8f..6e5c72d47 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/receivers/CrushingWheelControllerBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/CrushingWheelControllerBlock.java @@ -51,7 +51,7 @@ public class CrushingWheelControllerBlock extends Block implements IWithoutBlock } public void onEntityCollision(BlockState state, World worldIn, BlockPos pos, Entity entityIn) { - if (!state.get(VALID)) + if (!state.get(VALID) || CrushingWheelControllerTileEntity.isFrozen()) return; CrushingWheelControllerTileEntity te = (CrushingWheelControllerTileEntity) worldIn.getTileEntity(pos); if (te == null) @@ -63,13 +63,15 @@ public class CrushingWheelControllerBlock extends Block implements IWithoutBlock @Override public void onLanded(IBlockReader worldIn, Entity entityIn) { super.onLanded(worldIn, entityIn); + if (CrushingWheelControllerTileEntity.isFrozen()) + return; CrushingWheelControllerTileEntity te = (CrushingWheelControllerTileEntity) worldIn .getTileEntity(entityIn.getPosition().down()); if (te == null) return; if (te.isOccupied()) return; - + te.startCrushing(entityIn); } @@ -93,7 +95,7 @@ public class CrushingWheelControllerBlock extends Block implements IWithoutBlock } public void updateSpeed(BlockState state, World world, BlockPos pos) { - if (!state.get(VALID)) + if (!state.get(VALID) || CrushingWheelControllerTileEntity.isFrozen()) return; CrushingWheelControllerTileEntity te = (CrushingWheelControllerTileEntity) world.getTileEntity(pos); if (te == null) @@ -123,7 +125,7 @@ public class CrushingWheelControllerBlock extends Block implements IWithoutBlock if (entity != null) { if (new AxisAlignedBB(pos).contains(entity.getPositionVec())) return VoxelShapes.empty(); - + CrushingWheelControllerTileEntity te = (CrushingWheelControllerTileEntity) worldIn.getTileEntity(pos); if (te == null) return VoxelShapes.fullCube(); diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/CrushingWheelControllerTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/CrushingWheelControllerTileEntity.java index e93346877..1652efcd8 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/receivers/CrushingWheelControllerTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/CrushingWheelControllerTileEntity.java @@ -92,7 +92,7 @@ public class CrushingWheelControllerTileEntity extends SyncedTileEntity implemen @Override public void tick() { - if (!isOccupied()) + if (!isOccupied() || isFrozen()) return; float speed = crushingspeed / 2.5f; @@ -204,7 +204,7 @@ public class CrushingWheelControllerTileEntity extends SyncedTileEntity implemen @Override public CompoundNBT write(CompoundNBT compound) { - if (hasEntity()) + if (hasEntity() && !isFrozen()) compound.put("Entity", NBTUtil.writeUniqueId(entityUUID)); contents.write(compound); compound.putFloat("Speed", crushingspeed); @@ -216,7 +216,7 @@ public class CrushingWheelControllerTileEntity extends SyncedTileEntity implemen public void read(CompoundNBT compound) { super.read(compound); - if (compound.contains("Entity")) { + if (compound.contains("Entity") && !isFrozen()) { entityUUID = NBTUtil.readUniqueId(compound.getCompound("Entity")); List search = world.getEntitiesInAABBexcluding(null, new AxisAlignedBB(getPos()), @@ -258,5 +258,9 @@ public class CrushingWheelControllerTileEntity extends SyncedTileEntity implemen public boolean hasEntity() { return processingEntity != null; } + + public static boolean isFrozen() { + return CreateConfig.parameters.freezeCrushing.get(); + } } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/EncasedFanParticleHandler.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/EncasedFanParticleHandler.java new file mode 100644 index 000000000..cf04c912d --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/EncasedFanParticleHandler.java @@ -0,0 +1,121 @@ +package com.simibubi.create.modules.contraptions.receivers; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.particles.BlockParticleData; +import net.minecraft.particles.IParticleData; +import net.minecraft.particles.ParticleTypes; +import net.minecraft.particles.RedstoneParticleData; +import net.minecraft.util.Direction; +import net.minecraft.util.math.Vec3i; + +public class EncasedFanParticleHandler { + + public final Map> effects = new HashMap<>(); + + public EncasedFanParticleHandler() { + initEffects(); + } + + private void initEffects() { + List standardFX = new ArrayList<>(2); + standardFX.add(new FanEffect(ParticleTypes.BUBBLE_POP, 1 / 4f, 1 / 4f, 1 / 3f, 1)); + standardFX.add(new FanEffect(new RedstoneParticleData(1, 1, 1, 1), 1 / 2f, 1 / 32f, 1/16f, 512f)); + effects.put(Blocks.AIR, standardFX); + + List waterFX = new ArrayList<>(2); + waterFX.add(new FanEffect(new BlockParticleData(ParticleTypes.BLOCK, Blocks.WATER.getDefaultState()), 1 / 4f, + 1 / 2f, 1 / 4f, 1)); + waterFX.add(new FanEffect(ParticleTypes.SPLASH, 1 / 4f, 1 / 2f, 0.5f, 1)); + effects.put(Blocks.WATER, waterFX); + + List fireFX = new ArrayList<>(2); + fireFX.add(new FanEffect(ParticleTypes.LARGE_SMOKE, 1 / 4f, 1 / 8f, 0.125f, .5f)); + fireFX.add(new FanEffect(ParticleTypes.FLAME, 1 / 4f, 1 / 8f, 1 / 32f, 1 / 256f)); + effects.put(Blocks.FIRE, fireFX); + + List lavaFX = new ArrayList<>(3); + lavaFX.add(new FanEffect(new BlockParticleData(ParticleTypes.BLOCK, Blocks.LAVA.getDefaultState()), 1 / 4f, + 1 / 2f, 1 / 4f, 1)); + lavaFX.add(new FanEffect(ParticleTypes.LAVA, 1 / 2f, 1 / 32f, 0, .25f)); + lavaFX.add(new FanEffect(ParticleTypes.FLAME, 1 / 4f, 1 / 32f, 1 / 32f, 1 / 256f)); + effects.put(Blocks.LAVA, lavaFX); + } + + public void makeParticles(EncasedFanTileEntity te) { + Direction direction = te.getAirFlow(); + Vec3i directionVec = direction.getDirectionVec(); + + boolean hasFx = false; + BlockState frontBlock = te.frontBlock; + if (frontBlock != null) { + if (effects.containsKey(frontBlock.getBlock())) { + hasFx = true; + for (FanEffect fx : effects.get(frontBlock.getBlock())) + fx.render(directionVec, true, te); + } + } + + if (!hasFx) + for (FanEffect fx : effects.get(Blocks.AIR)) + fx.render(directionVec, true, te); + + for (FanEffect fx : effects.get(Blocks.AIR)) + fx.render(directionVec, false, te); + } + + protected static class FanEffect { + private IParticleData particle; + private float density; + private float chance; + private float spread; + private float speed; + private Random r; + + public FanEffect(IParticleData particle, float density, float chance, float spread, float speed) { + r = new Random(); + this.particle = particle; + this.density = density; + this.chance = chance; + this.spread = spread; + this.speed = speed; + } + + public void render(Vec3i directionVec, boolean front, EncasedFanTileEntity te) { + render(directionVec, front ? .5f : -te.pullDistance, front ? te.pushDistance : -.5f, te); + } + + private void render(Vec3i directionVec, float start, float end, EncasedFanTileEntity te) { + float x = directionVec.getX(); + float y = directionVec.getY(); + float z = directionVec.getZ(); + float speed = this.speed * Math.abs(te.getSpeed()) / 512f; + + for (float offset = start; offset < end; offset += density) { + if (r.nextFloat() > chance) + continue; + float xs = rollOffset() * spread; + float ys = rollOffset() * spread; + float zs = rollOffset() * spread; + float xs2 = rollOffset() * spread; + float ys2 = rollOffset() * spread; + float zs2 = rollOffset() * spread; + te.getWorld().addParticle(particle, te.getPos().getX() + .5f + x * offset + xs2, + te.getPos().getY() + .5f + y * offset + ys2, te.getPos().getZ() + .5f + z * offset + zs2, + x * speed + xs, y * speed + ys, z * speed + zs); + } + } + + private float rollOffset() { + return (r.nextFloat() - .5f) * 2; + } + } + +} diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/EncasedFanTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/EncasedFanTileEntity.java index ce721e9ed..2820bd73c 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/receivers/EncasedFanTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/EncasedFanTileEntity.java @@ -5,17 +5,11 @@ import static net.minecraft.state.properties.BlockStateProperties.AXIS; import static net.minecraft.util.Direction.AxisDirection.NEGATIVE; import static net.minecraft.util.Direction.AxisDirection.POSITIVE; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; import java.util.List; -import java.util.Map; -import java.util.Random; -import java.util.UUID; import com.simibubi.create.AllBlocks; import com.simibubi.create.AllTileEntities; -import com.simibubi.create.Create; +import com.simibubi.create.CreateClient; import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.modules.contraptions.base.KineticTileEntity; import com.simibubi.create.modules.logistics.InWorldProcessing; @@ -27,16 +21,12 @@ import net.minecraft.block.Blocks; import net.minecraft.entity.Entity; import net.minecraft.entity.item.ItemEntity; import net.minecraft.nbt.CompoundNBT; -import net.minecraft.nbt.INBT; -import net.minecraft.nbt.ListNBT; -import net.minecraft.nbt.NBTUtil; -import net.minecraft.particles.BlockParticleData; -import net.minecraft.particles.IParticleData; import net.minecraft.particles.ParticleTypes; -import net.minecraft.particles.RedstoneParticleData; import net.minecraft.tileentity.ITickableTileEntity; import net.minecraft.util.DamageSource; import net.minecraft.util.Direction; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.SoundEvents; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; @@ -45,101 +35,20 @@ import net.minecraft.util.math.Vec3i; public class EncasedFanTileEntity extends KineticTileEntity implements ITickableTileEntity { - public static final Map> effects = new HashMap<>(); private static DamageSource damageSourceFire = new DamageSource("create.fan_fire").setDifficultyScaled() .setFireDamage(); private static DamageSource damageSourceLava = new DamageSource("create.fan_lava").setDifficultyScaled() .setFireDamage(); + private static EncasedFanParticleHandler particleHandler; protected float pushDistance; protected float pullDistance; protected AxisAlignedBB frontBB; protected AxisAlignedBB backBB; - + protected int blockCheckCooldown; - protected BlockState frontBlock; - - protected boolean findLoadedItems; protected boolean findFrontBlock; - public List items; - - public class ProcessedItem { - private UUID loadedUUID; - private int loadedTime; - private ItemEntity entity; - - public ProcessedItem(UUID uuid, int timeLeft) { - loadedUUID = uuid; - loadedTime = timeLeft; - } - - public ProcessedItem(ItemEntity item) { - entity = item; - } - - public void tick() { - if (world.rand.nextInt(4) == 0) { - Type processingType = getProcessingType(); - if (processingType == Type.BLASTING) - world.addParticle(ParticleTypes.LARGE_SMOKE, entity.posX, entity.posY + .25f, entity.posZ, 0, 1/16f, 0); - if (processingType == Type.SMOKING) - world.addParticle(ParticleTypes.CLOUD, entity.posX, entity.posY + .25f, entity.posZ, 0, 1/16f, 0); - } - - if (world.isRemote) - return; - - Create.itemProcessingHandler.getProcessing(entity).process(entity); - } - - } - - protected static class FanEffect { - private IParticleData particle; - private float density; - private float chance; - private float spread; - private float speed; - private Random r; - - public FanEffect(IParticleData particle, float density, float chance, float spread, float speed) { - r = new Random(); - this.particle = particle; - this.density = density; - this.chance = chance; - this.spread = spread; - this.speed = speed; - } - - public void render(Vec3i directionVec, boolean front, EncasedFanTileEntity te) { - render(directionVec, front ? .5f : -te.pullDistance, front ? te.pushDistance : -.5f, te); - } - - private void render(Vec3i directionVec, float start, float end, EncasedFanTileEntity te) { - float x = directionVec.getX(); - float y = directionVec.getY(); - float z = directionVec.getZ(); - float speed = this.speed * Math.abs(te.speed) / 512f; - - for (float offset = start; offset < end; offset += density) { - if (r.nextFloat() > chance) - continue; - float xs = rollOffset() * spread; - float ys = rollOffset() * spread; - float zs = rollOffset() * spread; - float xs2 = rollOffset() * spread; - float ys2 = rollOffset() * spread; - float zs2 = rollOffset() * spread; - te.world.addParticle(particle, te.pos.getX() + .5f + x * offset + xs2, - te.pos.getY() + .5f + y * offset + ys2, te.pos.getZ() + .5f + z * offset + zs2, x * speed + xs, - y * speed + ys, z * speed + zs); - } - } - - private float rollOffset() { - return (r.nextFloat() - .5f) * 2; - } - } + protected BlockState frontBlock; public EncasedFanTileEntity() { super(AllTileEntities.ENCASED_FAN.type); @@ -147,36 +56,7 @@ public class EncasedFanTileEntity extends KineticTileEntity implements ITickable findFrontBlock = true; frontBB = new AxisAlignedBB(0, 0, 0, 0, 0, 0); backBB = new AxisAlignedBB(0, 0, 0, 0, 0, 0); - items = new ArrayList<>(); -// if (effects.isEmpty()) - initEffects(); - } - - private static void initEffects() { - effects.clear(); - - List standardFX = new ArrayList<>(2); - standardFX.add(new FanEffect(ParticleTypes.BUBBLE_POP, 1 / 4f, 1 / 4f, 1 / 3f, 1)); - standardFX.add(new FanEffect(new RedstoneParticleData(1, 1, 1, 1), 1 / 2f, 1 / 32f, 1/16f, 512f)); - effects.put(Blocks.AIR, standardFX); - - List waterFX = new ArrayList<>(2); - waterFX.add(new FanEffect(new BlockParticleData(ParticleTypes.BLOCK, Blocks.WATER.getDefaultState()), 1 / 4f, - 1 / 2f, 1 / 4f, 1)); - waterFX.add(new FanEffect(ParticleTypes.SPLASH, 1 / 4f, 1 / 2f, 0.5f, 1)); - effects.put(Blocks.WATER, waterFX); - - List fireFX = new ArrayList<>(2); - fireFX.add(new FanEffect(ParticleTypes.LARGE_SMOKE, 1 / 4f, 1 / 8f, 0.125f, .5f)); - fireFX.add(new FanEffect(ParticleTypes.FLAME, 1 / 4f, 1 / 8f, 1 / 32f, 1 / 256f)); - effects.put(Blocks.FIRE, fireFX); - - List lavaFX = new ArrayList<>(3); - lavaFX.add(new FanEffect(new BlockParticleData(ParticleTypes.BLOCK, Blocks.LAVA.getDefaultState()), 1 / 4f, - 1 / 2f, 1 / 4f, 1)); - lavaFX.add(new FanEffect(ParticleTypes.LAVA, 1 / 2f, 1 / 32f, 0, .25f)); - lavaFX.add(new FanEffect(ParticleTypes.FLAME, 1 / 4f, 1 / 32f, 1 / 32f, 1 / 256f)); - effects.put(Blocks.LAVA, lavaFX); + particleHandler = CreateClient.fanParticles; } @Override @@ -195,32 +75,14 @@ public class EncasedFanTileEntity extends KineticTileEntity implements ITickable @Override public void read(CompoundNBT compound) { super.read(compound); - pushDistance = compound.getFloat("PushDistance"); pullDistance = compound.getFloat("PullDistance"); - - ListNBT itemsNBT = compound.getList("Items", 10); - items.clear(); - for (INBT iNBT : itemsNBT) { - CompoundNBT itemNBT = (CompoundNBT) iNBT; - items.add(new ProcessedItem(NBTUtil.readUniqueId(itemNBT.getCompound("UUID")), itemNBT.getInt("TimeLeft"))); - } - findLoadedItems = true; } @Override public CompoundNBT write(CompoundNBT compound) { compound.putFloat("PushDistance", pushDistance); compound.putFloat("PullDistance", pullDistance); - - ListNBT itemsNBT = new ListNBT(); - for (ProcessedItem item : items) { - CompoundNBT itemNBT = new CompoundNBT(); - itemNBT.put("UUID", NBTUtil.writeUniqueId(item.entity.getUniqueID())); - itemNBT.putInt("TimeLeft", Create.itemProcessingHandler.getProcessing(item.entity).timeRemaining); - itemsNBT.add(itemNBT); - } - compound.put("Items", itemsNBT); return super.write(compound); } @@ -307,16 +169,7 @@ public class EncasedFanTileEntity extends KineticTileEntity implements ITickable List frontEntities = world.getEntitiesWithinAABBExcludingEntity(null, frontBB); for (Entity entity : frontEntities) { moveEntity(entity, true); - if (!(entity instanceof ItemEntity)) { - if (frontBlock != null && frontBlock.getBlock() == Blocks.FIRE) { - entity.setFire(2); - entity.attackEntityFrom(damageSourceFire, 4); - } - if (frontBlock != null && frontBlock.getBlock() == Blocks.LAVA) { - entity.setFire(10); - entity.attackEntityFrom(damageSourceLava, 8); - } - } + processEntity(entity); } for (Entity entity : world.getEntitiesWithinAABBExcludingEntity(null, backBB)) { @@ -333,79 +186,46 @@ public class EncasedFanTileEntity extends KineticTileEntity implements ITickable updateReachAndForce(); } - updateProcessedItems(frontEntities); - if (world.isRemote) { - makeParticles(); + particleHandler.makeParticles(this); return; } - discoverEntitiesAfterLoad(frontEntities); } - public void updateProcessedItems(List frontEntities) { - ArrayList prevItems = new ArrayList<>(items); - Iterator itemIter = prevItems.iterator(); - - if (canProcess()) { - while (itemIter.hasNext()) { - Iterator entityIter = frontEntities.iterator(); - ProcessedItem item = itemIter.next(); - - while (entityIter.hasNext()) { - Entity e = entityIter.next(); - if (!(e instanceof ItemEntity)) { - entityIter.remove(); - continue; - } - - if (item.entity == e && e.isAlive()) { - item.tick(); - entityIter.remove(); - itemIter.remove(); - continue; - } - } + public void processEntity(Entity entity) { + if (InWorldProcessing.isFrozen()) + return; + + if (entity instanceof ItemEntity) { + if (world.rand.nextInt(4) == 0) { + Type processingType = getProcessingType(); + if (processingType == Type.BLASTING) + world.addParticle(ParticleTypes.LARGE_SMOKE, entity.posX, entity.posY + .25f, entity.posZ, 0, + 1 / 16f, 0); + if (processingType == Type.SMOKING) + world.addParticle(ParticleTypes.CLOUD, entity.posX, entity.posY + .25f, entity.posZ, 0, 1 / 16f, 0); } - // Add remaining - for (Entity entity : frontEntities) { - if (entity instanceof ItemEntity && canProcess((ItemEntity) entity)) { - items.add(new ProcessedItem((ItemEntity) entity)); - if (!world.isRemote) - Create.itemProcessingHandler.startProcessing((ItemEntity) entity, - new InWorldProcessing(getProcessingType(), 100)); - } + + if (world.isRemote) + return; + + if (canProcess((ItemEntity) entity)) + InWorldProcessing.process((ItemEntity) entity, getProcessingType()); + + } else { + if (getProcessingType() == Type.SMOKING) { + entity.setFire(2); + entity.attackEntityFrom(damageSourceFire, 4); } - } - - for (ProcessedItem lostItem : prevItems) { - items.remove(lostItem); - if (!world.isRemote && lostItem.entity != null) - Create.itemProcessingHandler.stopProcessing(lostItem.entity); - } - } - - public void discoverEntitiesAfterLoad(List frontEntities) { - if (findLoadedItems) { - findLoadedItems = false; - Iterator iterator = items.iterator(); - while (iterator.hasNext()) { - ProcessedItem item = iterator.next(); - if (!canProcess()) - iterator.remove(); - - for (Entity entity : frontEntities) { - if (!(entity instanceof ItemEntity)) - continue; - if (entity.getUniqueID().equals(item.loadedUUID)) { - item.entity = (ItemEntity) entity; - if (!world.isRemote && canProcess((ItemEntity) entity)) - Create.itemProcessingHandler.startProcessing((ItemEntity) entity, - new InWorldProcessing(getProcessingType(), item.loadedTime)); - } - } - if (item.entity == null) - iterator.remove(); + if (getProcessingType() == Type.BLASTING) { + entity.setFire(10); + entity.attackEntityFrom(damageSourceLava, 8); + } + if (getProcessingType() == Type.SPLASHING) { + entity.setFire(0); + world.playSound(null, entity.getPosition(), SoundEvents.ENTITY_GENERIC_EXTINGUISH_FIRE, + SoundCategory.NEUTRAL, 0.7F, 1.6F + (world.rand.nextFloat() - world.rand.nextFloat()) * 0.4F); } } } @@ -415,10 +235,13 @@ public class EncasedFanTileEntity extends KineticTileEntity implements ITickable } protected boolean canProcess(ItemEntity entity) { - return canProcess() && new InWorldProcessing(getProcessingType(), 0).canProcess(entity); + return canProcess() && InWorldProcessing.canProcess(entity, getProcessingType()); } protected InWorldProcessing.Type getProcessingType() { + if (frontBlock == null) + return null; + Block block = frontBlock.getBlock(); if (block == Blocks.FIRE) @@ -439,37 +262,20 @@ public class EncasedFanTileEntity extends KineticTileEntity implements ITickable Vec3d center = VecHelper.getCenterOf(pos); Vec3i flow = getAirFlow().getDirectionVec(); - float modifier = entity.isSneaking() ? 4096f : 512f; - float s = (float) (speed * 1 / modifier + + float sneakModifier = entity.isSneaking() ? 4096f : 512f; + float acceleration = (float) (speed * 1 / sneakModifier / (entity.getPositionVec().distanceTo(center) / (push ? pushDistance : pullDistance))); - Vec3d motion = entity.getMotion(); - float maxSpeedModifier = 5; - double xIn = MathHelper.clamp(flow.getX() * s - motion.x, -maxSpeedModifier, maxSpeedModifier); - double yIn = MathHelper.clamp(flow.getY() * s - motion.y, -maxSpeedModifier, maxSpeedModifier); - double zIn = MathHelper.clamp(flow.getZ() * s - motion.z, -maxSpeedModifier, maxSpeedModifier); - entity.setMotion(motion.add(new Vec3d(xIn, yIn, zIn).mul(flow.getX(), flow.getY(), flow.getZ()).scale(1 / 8f))); + Vec3d previousMotion = entity.getMotion(); + float maxAcceleration = 5; + + double xIn = MathHelper.clamp(flow.getX() * acceleration - previousMotion.x, -maxAcceleration, maxAcceleration); + double yIn = MathHelper.clamp(flow.getY() * acceleration - previousMotion.y, -maxAcceleration, maxAcceleration); + double zIn = MathHelper.clamp(flow.getZ() * acceleration - previousMotion.z, -maxAcceleration, maxAcceleration); + + entity.setMotion( + previousMotion.add(new Vec3d(xIn, yIn, zIn).mul(flow.getX(), flow.getY(), flow.getZ()).scale(1 / 8f))); entity.fallDistance = 0; } - protected void makeParticles() { - Direction direction = getAirFlow(); - Vec3i directionVec = direction.getDirectionVec(); - - boolean hasFx = false; - if (frontBlock != null) { - if (effects.containsKey(frontBlock.getBlock())) { - hasFx = true; - for (FanEffect fx : effects.get(frontBlock.getBlock())) - fx.render(directionVec, true, this); - } - } - - if (!hasFx) - for (FanEffect fx : effects.get(Blocks.AIR)) - fx.render(directionVec, true, this); - - for (FanEffect fx : effects.get(Blocks.AIR)) - fx.render(directionVec, false, this); - } - } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/ChassisTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/ChassisTileEntity.java index e33f0aafa..dfa3d0707 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/ChassisTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/ChassisTileEntity.java @@ -1,7 +1,10 @@ package com.simibubi.create.modules.contraptions.receivers.constructs; +import static com.simibubi.create.CreateConfig.parameters; + import com.simibubi.create.AllPackets; import com.simibubi.create.AllTileEntities; +import com.simibubi.create.CreateConfig; import com.simibubi.create.foundation.block.SyncedTileEntity; import net.minecraft.nbt.CompoundNBT; @@ -10,15 +13,13 @@ import net.minecraft.util.math.MathHelper; public class ChassisTileEntity extends SyncedTileEntity implements ITickableTileEntity { - public static final int MAX_RANGE = 16; private int range; - public int newRange; public int lastModified; public ChassisTileEntity() { super(AllTileEntities.CHASSIS.type); - newRange = range = MAX_RANGE / 2; + newRange = range = CreateConfig.parameters.maxChassisRange.get() / 2; } @Override @@ -45,7 +46,7 @@ public class ChassisTileEntity extends SyncedTileEntity implements ITickableTile } public void setRangeLazily(int range) { - this.newRange = MathHelper.clamp(range, 1, MAX_RANGE); + this.newRange = MathHelper.clamp(range, 1, parameters.maxChassisRange.get()); if (newRange == this.range) return; this.lastModified = 0; diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalBearingTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalBearingTileEntity.java index 4dabe49cf..448de6407 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalBearingTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalBearingTileEntity.java @@ -35,7 +35,7 @@ public class MechanicalBearingTileEntity extends KineticTileEntity implements IT public CompoundNBT write(CompoundNBT tag) { tag.putBoolean("Running", running); tag.putFloat("Angle", angle); - if (running) + if (running && !RotationConstruct.isFrozen()) tag.put("Construct", movingConstruct.writeNBT()); return super.write(tag); @@ -45,13 +45,15 @@ public class MechanicalBearingTileEntity extends KineticTileEntity implements IT public void read(CompoundNBT tag) { running = tag.getBoolean("Running"); angle = tag.getFloat("Angle"); - if (running) + if (running && !RotationConstruct.isFrozen()) movingConstruct = RotationConstruct.fromNBT(tag.getCompound("Construct")); super.read(tag); } public float getInterpolatedAngle(float partialTicks) { + if (RotationConstruct.isFrozen()) + return 0; return MathHelper.lerp(partialTicks, angle, angle + getAngularSpeed()); } @@ -111,6 +113,9 @@ public class MechanicalBearingTileEntity extends KineticTileEntity implements IT @Override public void tick() { + if (running && RotationConstruct.isFrozen()) + disassembleConstruct(); + if (!world.isRemote && assembleNextTick) { assembleNextTick = false; if (running) { diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalPistonTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalPistonTileEntity.java index 6e5985157..36e5e0bbc 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalPistonTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalPistonTileEntity.java @@ -52,7 +52,7 @@ public class MechanicalPistonTileEntity extends KineticTileEntity implements ITi public CompoundNBT write(CompoundNBT tag) { tag.putBoolean("Running", running); tag.putFloat("Offset", offset); - if (running) + if (running && !TranslationConstruct.isFrozen()) tag.put("Construct", movingConstruct.writeNBT()); return super.write(tag); @@ -62,13 +62,16 @@ public class MechanicalPistonTileEntity extends KineticTileEntity implements ITi public void read(CompoundNBT tag) { running = tag.getBoolean("Running"); offset = tag.getFloat("Offset"); - if (running) + if (running && !TranslationConstruct.isFrozen()) movingConstruct = TranslationConstruct.fromNBT(tag.getCompound("Construct")); super.read(tag); } protected void onBlockVisited(float newOffset) { + if (TranslationConstruct.isFrozen()) + return; + Direction direction = getBlockState().get(BlockStateProperties.FACING); for (BlockInfo block : movingConstruct.actors) { @@ -205,6 +208,9 @@ public class MechanicalPistonTileEntity extends KineticTileEntity implements ITi } private boolean hasBlockCollisions(float newOffset) { + if (TranslationConstruct.isFrozen()) + return true; + Direction movementDirection = getBlockState().get(BlockStateProperties.FACING); BlockPos relativePos = BlockPos.ZERO.offset(movementDirection, getModulatedOffset(newOffset)); diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MovingConstructHandler.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MovingConstructHandler.java index 24bf47314..5f92019dc 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MovingConstructHandler.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MovingConstructHandler.java @@ -46,6 +46,9 @@ public class MovingConstructHandler { public static void moveEntities(MechanicalPistonTileEntity te, float movementSpeed, Direction movementDirection, float newOffset) { + if (TranslationConstruct.isFrozen()) + return; + World world = te.getWorld(); Vec3d movementVec = new Vec3d(te.getBlockState().get(BlockStateProperties.FACING).getDirectionVec()); TranslationConstruct construct = te.movingConstruct; @@ -132,8 +135,6 @@ public class MovingConstructHandler { } } - if (entity instanceof PlayerEntity && !world.isRemote) - return; if (!allowedMovement.equals(movement)) { if (allowedMovement.y != movement.y) { @@ -141,6 +142,8 @@ public class MovingConstructHandler { entity.fallDistance = 0; entity.onGround = true; } + if (entity instanceof PlayerEntity && !world.isRemote) + return; entity.setMotion(allowedMovement.subtract(movement.subtract(motion))); entity.velocityChanged = true; } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/RotationConstruct.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/RotationConstruct.java index c56174bad..df7fde93f 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/RotationConstruct.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/RotationConstruct.java @@ -41,7 +41,9 @@ public class RotationConstruct { } protected boolean collectAttached(World world, BlockPos pos, Direction direction) { - + if (isFrozen()) + return false; + // Find chassis List chassis = collectChassis(world, pos, direction); if (chassis == null) @@ -188,4 +190,8 @@ public class RotationConstruct { || AllBlocks.ROTATION_CHASSIS.typeOf(world.getBlockState(pos)); } + public static boolean isFrozen() { + return CreateConfig.parameters.freezeRotationConstructs.get(); + } + } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/TranslationConstruct.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/TranslationConstruct.java index 77588c5f0..fe998a56b 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/TranslationConstruct.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/TranslationConstruct.java @@ -16,6 +16,7 @@ import java.util.Set; import java.util.function.Function; import com.simibubi.create.AllBlocks; +import com.simibubi.create.CreateConfig; import net.minecraft.block.BlockState; import net.minecraft.block.FallingBlock; @@ -77,6 +78,9 @@ public class TranslationConstruct { } public static TranslationConstruct getAttachedForPushing(World world, BlockPos pos, Direction direction) { + if (isFrozen()) + return null; + TranslationConstruct construct = new TranslationConstruct(); if (!construct.collectExtensions(world, pos, direction)) @@ -89,6 +93,9 @@ public class TranslationConstruct { } public static TranslationConstruct getAttachedForPulling(World world, BlockPos pos, Direction direction) { + if (isFrozen()) + return null; + TranslationConstruct construct = new TranslationConstruct(); if (!construct.collectExtensions(world, pos, direction)) @@ -444,4 +451,8 @@ public class TranslationConstruct { return construct; } + + public static boolean isFrozen() { + return CreateConfig.parameters.freezePistonConstructs.get(); + } } diff --git a/src/main/java/com/simibubi/create/modules/economy/ShopShelfContainer.java b/src/main/java/com/simibubi/create/modules/economy/ShopShelfContainer.java index 26d5c9915..e85d49bf6 100644 --- a/src/main/java/com/simibubi/create/modules/economy/ShopShelfContainer.java +++ b/src/main/java/com/simibubi/create/modules/economy/ShopShelfContainer.java @@ -1,7 +1,5 @@ package com.simibubi.create.modules.economy; -import com.simibubi.create.AllContainers; - import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerInventory; import net.minecraft.inventory.container.Container; @@ -10,11 +8,13 @@ import net.minecraft.network.PacketBuffer; public class ShopShelfContainer extends Container { public ShopShelfContainer(int id, PlayerInventory inv, ShopShelfTileEntity te) { - super(AllContainers.SHOP_SHELF.type, id); +// super(AllContainers.SHOP_SHELF.type, id); + super(null, id); } public ShopShelfContainer(int id, PlayerInventory inv, PacketBuffer extraData) { - super(AllContainers.SHOP_SHELF.type, id); +// super(AllContainers.SHOP_SHELF.type, id); + super(null, id); } @Override diff --git a/src/main/java/com/simibubi/create/modules/economy/ShopShelfTileEntity.java b/src/main/java/com/simibubi/create/modules/economy/ShopShelfTileEntity.java index 54e2a70c7..e93e94a33 100644 --- a/src/main/java/com/simibubi/create/modules/economy/ShopShelfTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/economy/ShopShelfTileEntity.java @@ -2,7 +2,6 @@ package com.simibubi.create.modules.economy; import java.util.UUID; -import com.simibubi.create.AllTileEntities; import com.simibubi.create.foundation.block.SyncedTileEntity; import net.minecraft.entity.player.PlayerEntity; @@ -20,7 +19,8 @@ public class ShopShelfTileEntity extends SyncedTileEntity implements INamedConta private UUID owner; public ShopShelfTileEntity() { - super(AllTileEntities.SHOP_SHELF.type); + super(null); +// super(AllTileEntities.SHOP_SHELF.type); } @Override diff --git a/src/main/java/com/simibubi/create/modules/logistics/InWorldItemProcessingHandler.java b/src/main/java/com/simibubi/create/modules/logistics/InWorldItemProcessingHandler.java deleted file mode 100644 index 665794dfd..000000000 --- a/src/main/java/com/simibubi/create/modules/logistics/InWorldItemProcessingHandler.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.simibubi.create.modules.logistics; - -import java.util.HashMap; -import java.util.Map; - -import com.simibubi.create.Create; - -import net.minecraft.entity.item.ItemEntity; -import net.minecraft.world.IWorld; - -public class InWorldItemProcessingHandler { - - private Map> items = new HashMap<>(); - - public void onLoadWorld(IWorld world) { - items.put(world, new HashMap<>()); - Create.logger.info("Prepared Item Processing space for " + world.getDimension().getType().getRegistryName()); - } - - public void onUnloadWorld(IWorld world) { - items.remove(world); - Create.logger.info("Removed Item Processing space for " + world.getDimension().getType().getRegistryName()); - } - - public void startProcessing(ItemEntity entity, InWorldProcessing processing) { - Map itemsInWorld = items.get(entity.world); - if (itemsInWorld.containsKey(entity) && processing.type == itemsInWorld.get(entity).type) { - itemsInWorld.get(entity).processorCount++; - } else { - itemsInWorld.put(entity, processing); - } - } - - public void stopProcessing(ItemEntity entity) { - Map itemsInWorld = items.get(entity.world); - if (!itemsInWorld.containsKey(entity)) - return; - InWorldProcessing processing = itemsInWorld.get(entity); - processing.processorCount--; - - if (processing.processorCount == 0) - itemsInWorld.remove(entity); - } - - public InWorldProcessing getProcessing(ItemEntity entity) { - Map itemsInWorld = items.get(entity.world); - if (!itemsInWorld.containsKey(entity)) - return null; - return itemsInWorld.get(entity); - } - -} diff --git a/src/main/java/com/simibubi/create/modules/logistics/InWorldProcessing.java b/src/main/java/com/simibubi/create/modules/logistics/InWorldProcessing.java index a52b53619..3c8c5e5ac 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/InWorldProcessing.java +++ b/src/main/java/com/simibubi/create/modules/logistics/InWorldProcessing.java @@ -3,6 +3,7 @@ package com.simibubi.create.modules.logistics; import java.util.List; import java.util.Optional; +import com.simibubi.create.CreateConfig; import com.simibubi.create.foundation.utility.ItemHelper; import net.minecraft.entity.item.ItemEntity; @@ -13,6 +14,7 @@ import net.minecraft.item.crafting.FurnaceRecipe; import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.IRecipeType; import net.minecraft.item.crafting.SmokingRecipe; +import net.minecraft.nbt.CompoundNBT; import net.minecraft.tileentity.BlastFurnaceTileEntity; import net.minecraft.tileentity.FurnaceTileEntity; import net.minecraft.tileentity.SmokerTileEntity; @@ -24,19 +26,13 @@ public class InWorldProcessing { SMOKING, BLASTING, SPLASHING } - public Type type; - public int processorCount; - public int timeRemaining; - - public InWorldProcessing(Type type, int time) { - this.timeRemaining = time; - this.type = type; - processorCount = 1; - } - - public boolean canProcess(ItemEntity entity) { + public static boolean canProcess(ItemEntity entity, Type type) { World world = entity.world; + if (entity.getPersistantData().contains("CreateData") + && entity.getPersistantData().getCompound("CreateData").contains("Processing")) + return true; + if (type == Type.BLASTING) { return true; } @@ -56,13 +52,10 @@ public class InWorldProcessing { return false; } - public void process(ItemEntity entity) { - timeRemaining--; - if (timeRemaining != 0) { - return; - } - + public static void process(ItemEntity entity, Type type) { World world = entity.world; + if (decrementProcessingTime(entity, type) != 0) + return; if (type == Type.SPLASHING) { return; @@ -109,7 +102,28 @@ public class InWorldProcessing { } - public void applyRecipeOn(ItemEntity entity, IRecipe recipe) { + private static int decrementProcessingTime(ItemEntity entity, Type type) { + CompoundNBT nbt = entity.getPersistantData(); + + if (!nbt.contains("CreateData")) + nbt.put("CreateData", new CompoundNBT()); + CompoundNBT createData = nbt.getCompound("CreateData"); + + if (!createData.contains("Processing")) + createData.put("Processing", new CompoundNBT()); + CompoundNBT processing = createData.getCompound("Processing"); + + if (!processing.contains("Type") || Type.valueOf(processing.getString("Type")) != type) { + processing.putString("Type", type.name()); + processing.putInt("Time", CreateConfig.parameters.inWorldProcessingTime.get() + 1); + } + + int value = processing.getInt("Time") - 1; + processing.putInt("Time", value); + return value; + } + + public static void applyRecipeOn(ItemEntity entity, IRecipe recipe) { ItemStack out = recipe.getRecipeOutput().copy(); List stacks = ItemHelper.multipliedOutput(entity.getItem(), out); if (stacks.isEmpty()) @@ -118,5 +132,9 @@ public class InWorldProcessing { for (ItemStack additional : stacks) entity.world.addEntity(new ItemEntity(entity.world, entity.posX, entity.posY, entity.posZ, additional)); } + + public static boolean isFrozen() { + return CreateConfig.parameters.freezeInWorldProcessing.get(); + } } diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/IExtractor.java b/src/main/java/com/simibubi/create/modules/logistics/block/IExtractor.java index 4ca89407f..8e15d3ef6 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/block/IExtractor.java +++ b/src/main/java/com/simibubi/create/modules/logistics/block/IExtractor.java @@ -26,6 +26,9 @@ public interface IExtractor extends ITickableTileEntity, IInventoryManipulator { @Override default void tick() { + if (isFrozen()) + return; + State state = getState(); if (state == State.LOCKED) @@ -79,6 +82,9 @@ public interface IExtractor extends ITickableTileEntity, IInventoryManipulator { } public default void neighborChanged() { + if (isFrozen()) + return; + boolean hasSpace = hasSpaceForExtracting(); boolean hasInventory = getInventory().isPresent(); ItemStack toExtract = ItemStack.EMPTY; @@ -141,5 +147,9 @@ public interface IExtractor extends ITickableTileEntity, IInventoryManipulator { return extracting; } + + public static boolean isFrozen() { + return CreateConfig.parameters.freezeExtractors.get(); + } } diff --git a/src/main/java/com/simibubi/create/modules/schematics/ServerSchematicLoader.java b/src/main/java/com/simibubi/create/modules/schematics/ServerSchematicLoader.java index 07f2cf8a8..e9227fb01 100644 --- a/src/main/java/com/simibubi/create/modules/schematics/ServerSchematicLoader.java +++ b/src/main/java/com/simibubi/create/modules/schematics/ServerSchematicLoader.java @@ -50,7 +50,6 @@ public class ServerSchematicLoader { public ServerSchematicLoader() { activeUploads = new HashMap<>(); - FilesHelper.createFolderIfMissing(getSchematicPath()); } public String getSchematicPath() { diff --git a/src/main/resources/data/create/recipes/crafting/belt_connector.json b/src/main/resources/data/create/recipes/crafting/belt_connector.json index 815c06973..d3b268ab2 100644 --- a/src/main/resources/data/create/recipes/crafting/belt_connector.json +++ b/src/main/resources/data/create/recipes/crafting/belt_connector.json @@ -12,5 +12,11 @@ "result": { "item": "create:belt_connector", "count": 1 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/belt_funnel.json b/src/main/resources/data/create/recipes/crafting/belt_funnel.json index dcb592936..830b3da8b 100644 --- a/src/main/resources/data/create/recipes/crafting/belt_funnel.json +++ b/src/main/resources/data/create/recipes/crafting/belt_funnel.json @@ -19,5 +19,11 @@ "result": { "item": "create:belt_funnel", "count": 1 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "logistics" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/blueprint_and_quill.json b/src/main/resources/data/create/recipes/crafting/blueprint_and_quill.json index 5235a5dbd..b73a2c69e 100644 --- a/src/main/resources/data/create/recipes/crafting/blueprint_and_quill.json +++ b/src/main/resources/data/create/recipes/crafting/blueprint_and_quill.json @@ -11,5 +11,11 @@ "result": { "item": "create:blueprint_and_quill", "count": 1 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "schematics" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/clutch.json b/src/main/resources/data/create/recipes/crafting/clutch.json index 616627079..fe2b2e4a9 100644 --- a/src/main/resources/data/create/recipes/crafting/clutch.json +++ b/src/main/resources/data/create/recipes/crafting/clutch.json @@ -22,5 +22,11 @@ "result": { "item": "create:clutch", "count": 1 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/cocoa_log.json b/src/main/resources/data/create/recipes/crafting/cocoa_log.json index 725753091..76938b837 100644 --- a/src/main/resources/data/create/recipes/crafting/cocoa_log.json +++ b/src/main/resources/data/create/recipes/crafting/cocoa_log.json @@ -11,5 +11,11 @@ "result": { "item": "create:cocoa_log", "count": 1 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "gardens" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/cogwheel.json b/src/main/resources/data/create/recipes/crafting/cogwheel.json index 6df9420be..29dd1b237 100644 --- a/src/main/resources/data/create/recipes/crafting/cogwheel.json +++ b/src/main/resources/data/create/recipes/crafting/cogwheel.json @@ -16,5 +16,11 @@ "result": { "item": "create:cogwheel", "count": 1 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/contact.json b/src/main/resources/data/create/recipes/crafting/contact.json index b7be7b530..0b40c1e29 100644 --- a/src/main/resources/data/create/recipes/crafting/contact.json +++ b/src/main/resources/data/create/recipes/crafting/contact.json @@ -22,5 +22,11 @@ "result": { "item": "create:contact", "count": 2 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "logistics" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/crushing_wheel.json b/src/main/resources/data/create/recipes/crafting/crushing_wheel.json index 7de46d527..7ec42eb08 100644 --- a/src/main/resources/data/create/recipes/crafting/crushing_wheel.json +++ b/src/main/resources/data/create/recipes/crafting/crushing_wheel.json @@ -19,5 +19,11 @@ "result": { "item": "create:crushing_wheel", "count": 1 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/drill.json b/src/main/resources/data/create/recipes/crafting/drill.json index 05fff8ab4..f46cea6b4 100644 --- a/src/main/resources/data/create/recipes/crafting/drill.json +++ b/src/main/resources/data/create/recipes/crafting/drill.json @@ -22,5 +22,11 @@ "result": { "item": "create:drill", "count": 1 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/empty_blueprint.json b/src/main/resources/data/create/recipes/crafting/empty_blueprint.json index ccfdcbdea..7eda78565 100644 --- a/src/main/resources/data/create/recipes/crafting/empty_blueprint.json +++ b/src/main/resources/data/create/recipes/crafting/empty_blueprint.json @@ -11,5 +11,11 @@ "result": { "item": "create:empty_blueprint", "count": 1 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "schematics" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/encased_belt.json b/src/main/resources/data/create/recipes/crafting/encased_belt.json index c5d0a151c..74aa1900b 100644 --- a/src/main/resources/data/create/recipes/crafting/encased_belt.json +++ b/src/main/resources/data/create/recipes/crafting/encased_belt.json @@ -19,5 +19,11 @@ "result": { "item": "create:encased_belt", "count": 2 - } + }, + "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 252c814eb..407e4f33d 100644 --- a/src/main/resources/data/create/recipes/crafting/encased_fan.json +++ b/src/main/resources/data/create/recipes/crafting/encased_fan.json @@ -22,5 +22,11 @@ "result": { "item": "create:encased_fan", "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_shaft.json b/src/main/resources/data/create/recipes/crafting/encased_shaft.json index 81a0cbdf7..6bd03183f 100644 --- a/src/main/resources/data/create/recipes/crafting/encased_shaft.json +++ b/src/main/resources/data/create/recipes/crafting/encased_shaft.json @@ -19,5 +19,11 @@ "result": { "item": "create:encased_shaft", "count": 2 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/entity_detector.json b/src/main/resources/data/create/recipes/crafting/entity_detector.json index 02a3bfe80..5c5184a6d 100644 --- a/src/main/resources/data/create/recipes/crafting/entity_detector.json +++ b/src/main/resources/data/create/recipes/crafting/entity_detector.json @@ -19,5 +19,11 @@ "result": { "item": "create:entity_detector", "count": 1 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "logistics" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/extractor.json b/src/main/resources/data/create/recipes/crafting/extractor.json index 9018fa2d6..50766a887 100644 --- a/src/main/resources/data/create/recipes/crafting/extractor.json +++ b/src/main/resources/data/create/recipes/crafting/extractor.json @@ -25,5 +25,11 @@ "result": { "item": "create:extractor", "count": 1 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "logistics" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/flexcrate.json b/src/main/resources/data/create/recipes/crafting/flexcrate.json index 71258c888..a88bb7faf 100644 --- a/src/main/resources/data/create/recipes/crafting/flexcrate.json +++ b/src/main/resources/data/create/recipes/crafting/flexcrate.json @@ -19,5 +19,11 @@ "result": { "item": "create:flexcrate", "count": 1 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "logistics" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/gearbox.json b/src/main/resources/data/create/recipes/crafting/gearbox.json index fb5cf9966..a3c481235 100644 --- a/src/main/resources/data/create/recipes/crafting/gearbox.json +++ b/src/main/resources/data/create/recipes/crafting/gearbox.json @@ -19,5 +19,11 @@ "result": { "item": "create:gearbox", "count": 2 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/gearshift.json b/src/main/resources/data/create/recipes/crafting/gearshift.json index 83549f077..16e6c600a 100644 --- a/src/main/resources/data/create/recipes/crafting/gearshift.json +++ b/src/main/resources/data/create/recipes/crafting/gearshift.json @@ -22,5 +22,11 @@ "result": { "item": "create:gearshift", "count": 1 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/harvester.json b/src/main/resources/data/create/recipes/crafting/harvester.json index 5eeb2d0a6..223866399 100644 --- a/src/main/resources/data/create/recipes/crafting/harvester.json +++ b/src/main/resources/data/create/recipes/crafting/harvester.json @@ -19,5 +19,11 @@ "result": { "item": "create:harvester", "count": 1 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/large_cogwheel.json b/src/main/resources/data/create/recipes/crafting/large_cogwheel.json index bb2ee24e9..3a940c9ac 100644 --- a/src/main/resources/data/create/recipes/crafting/large_cogwheel.json +++ b/src/main/resources/data/create/recipes/crafting/large_cogwheel.json @@ -19,5 +19,11 @@ "result": { "item": "create:large_cogwheel", "count": 1 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/linked_extractor.json b/src/main/resources/data/create/recipes/crafting/linked_extractor.json index f87471657..2d24ea0aa 100644 --- a/src/main/resources/data/create/recipes/crafting/linked_extractor.json +++ b/src/main/resources/data/create/recipes/crafting/linked_extractor.json @@ -11,5 +11,11 @@ "result": { "item": "create:linked_extractor", "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_bearing.json b/src/main/resources/data/create/recipes/crafting/mechanical_bearing.json index 455b68cb7..fca8c1441 100644 --- a/src/main/resources/data/create/recipes/crafting/mechanical_bearing.json +++ b/src/main/resources/data/create/recipes/crafting/mechanical_bearing.json @@ -22,5 +22,11 @@ "result": { "item": "create:mechanical_bearing", "count": 1 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/mechanical_piston.json b/src/main/resources/data/create/recipes/crafting/mechanical_piston.json index c4074c65a..9b26427c8 100644 --- a/src/main/resources/data/create/recipes/crafting/mechanical_piston.json +++ b/src/main/resources/data/create/recipes/crafting/mechanical_piston.json @@ -22,5 +22,11 @@ "result": { "item": "create:mechanical_piston", "count": 1 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/motor.json b/src/main/resources/data/create/recipes/crafting/motor.json index f0493a81d..60dd5b2d8 100644 --- a/src/main/resources/data/create/recipes/crafting/motor.json +++ b/src/main/resources/data/create/recipes/crafting/motor.json @@ -25,5 +25,11 @@ "result": { "item": "create:motor", "count": 1 - } + }, + "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/crafting/palettes/dolomite.json index 69293fd2d..9fd75e943 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/dolomite.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/dolomite.json @@ -5,5 +5,11 @@ }, "result": "create:dolomite", "experience": 0.1, - "cookingtime": 200 + "cookingtime": 200, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/dolomite_bricks.json b/src/main/resources/data/create/recipes/crafting/palettes/dolomite_bricks.json index 1f6baef99..d59e95b22 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/dolomite_bricks.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/dolomite_bricks.json @@ -12,5 +12,11 @@ "result": { "item": "create:dolomite_bricks", "count": 4 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/dolomite_slab.json b/src/main/resources/data/create/recipes/crafting/palettes/dolomite_slab.json index 6b77d81c9..efd5c8f93 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/dolomite_slab.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/dolomite_slab.json @@ -11,5 +11,11 @@ "result": { "item": "create:dolomite_slab", "count": 6 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/dolomite_stairs.json b/src/main/resources/data/create/recipes/crafting/palettes/dolomite_stairs.json index 9c5b51384..8de7753b7 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/dolomite_stairs.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/dolomite_stairs.json @@ -13,5 +13,11 @@ "result": { "item": "create:dolomite_stairs", "count": 8 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/dolomite_wall.json b/src/main/resources/data/create/recipes/crafting/palettes/dolomite_wall.json index 19d68a1be..604b66f73 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/dolomite_wall.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/dolomite_wall.json @@ -12,5 +12,11 @@ "result": { "item": "create:dolomite_wall", "count": 12 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/gabbro.json b/src/main/resources/data/create/recipes/crafting/palettes/gabbro.json index ce234c181..c77a51a2c 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/gabbro.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/gabbro.json @@ -5,5 +5,11 @@ }, "result": "create:gabbro", "experience": 0.1, - "cookingtime": 200 + "cookingtime": 200, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/gabbro_bricks.json b/src/main/resources/data/create/recipes/crafting/palettes/gabbro_bricks.json index 60a32f678..7d3dd8ef7 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/gabbro_bricks.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/gabbro_bricks.json @@ -12,5 +12,11 @@ "result": { "item": "create:gabbro_bricks", "count": 4 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/gabbro_bricks_stairs.json b/src/main/resources/data/create/recipes/crafting/palettes/gabbro_bricks_stairs.json index ba9d49513..7cd9b93f2 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/gabbro_bricks_stairs.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/gabbro_bricks_stairs.json @@ -13,5 +13,11 @@ "result": { "item": "create:gabbro_bricks_stairs", "count": 8 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/gabbro_bricks_wall.json b/src/main/resources/data/create/recipes/crafting/palettes/gabbro_bricks_wall.json index 3c6704c89..78eb249e4 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/gabbro_bricks_wall.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/gabbro_bricks_wall.json @@ -12,5 +12,11 @@ "result": { "item": "create:gabbro_bricks_wall", "count": 12 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/gabbro_slab.json b/src/main/resources/data/create/recipes/crafting/palettes/gabbro_slab.json index bfc5f8f63..a4ab5da74 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/gabbro_slab.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/gabbro_slab.json @@ -11,5 +11,11 @@ "result": { "item": "create:gabbro_slab", "count": 6 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/gabbro_stairs.json b/src/main/resources/data/create/recipes/crafting/palettes/gabbro_stairs.json index 81289a85f..3f8d9593a 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/gabbro_stairs.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/gabbro_stairs.json @@ -13,5 +13,11 @@ "result": { "item": "create:gabbro_stairs", "count": 8 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/gabbro_wall.json b/src/main/resources/data/create/recipes/crafting/palettes/gabbro_wall.json index 0bd336a9e..cec9db652 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/gabbro_wall.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/gabbro_wall.json @@ -12,5 +12,11 @@ "result": { "item": "create:gabbro_wall", "count": 12 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/indented_gabbro_slab.json b/src/main/resources/data/create/recipes/crafting/palettes/indented_gabbro_slab.json index d0122bcb6..c7fb6a998 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/indented_gabbro_slab.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/indented_gabbro_slab.json @@ -11,5 +11,11 @@ "result": { "item": "create:indented_gabbro_slab", "count": 6 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/limestone.json b/src/main/resources/data/create/recipes/crafting/palettes/limestone.json index 3b8d96767..315e75da0 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/limestone.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/limestone.json @@ -5,5 +5,11 @@ }, "result": "create:limestone", "experience": 0.1, - "cookingtime": 200 + "cookingtime": 200, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/limestone_bricks.json b/src/main/resources/data/create/recipes/crafting/palettes/limestone_bricks.json index f9081bc89..eae0a8f21 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/limestone_bricks.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/limestone_bricks.json @@ -12,5 +12,11 @@ "result": { "item": "create:limestone_bricks", "count": 4 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/limestone_bricks_slab.json b/src/main/resources/data/create/recipes/crafting/palettes/limestone_bricks_slab.json index fe91d2bd1..2916e13e5 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/limestone_bricks_slab.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/limestone_bricks_slab.json @@ -11,5 +11,11 @@ "result": { "item": "create:limestone_bricks_slab", "count": 6 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/limestone_bricks_stairs.json b/src/main/resources/data/create/recipes/crafting/palettes/limestone_bricks_stairs.json index 30dfc330c..8b318aaad 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/limestone_bricks_stairs.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/limestone_bricks_stairs.json @@ -13,5 +13,11 @@ "result": { "item": "create:limestone_bricks_stairs", "count": 8 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/limestone_bricks_wall.json b/src/main/resources/data/create/recipes/crafting/palettes/limestone_bricks_wall.json index fc505274f..089e27eb4 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/limestone_bricks_wall.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/limestone_bricks_wall.json @@ -12,5 +12,11 @@ "result": { "item": "create:limestone_bricks_wall", "count": 12 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/limestone_slab.json b/src/main/resources/data/create/recipes/crafting/palettes/limestone_slab.json index 18c746461..4a985153d 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/limestone_slab.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/limestone_slab.json @@ -11,5 +11,11 @@ "result": { "item": "create:limestone_slab", "count": 6 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/limestone_stairs.json b/src/main/resources/data/create/recipes/crafting/palettes/limestone_stairs.json index e34ef28c2..401d064ac 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/limestone_stairs.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/limestone_stairs.json @@ -13,5 +13,11 @@ "result": { "item": "create:limestone_stairs", "count": 8 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/limestone_wall.json b/src/main/resources/data/create/recipes/crafting/palettes/limestone_wall.json index 4e38cd2e2..8b35a34ff 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/limestone_wall.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/limestone_wall.json @@ -12,5 +12,11 @@ "result": { "item": "create:limestone_wall", "count": 12 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/paved_gabbro_bricks_slab.json b/src/main/resources/data/create/recipes/crafting/palettes/paved_gabbro_bricks_slab.json index e5f24e407..7ed214620 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/paved_gabbro_bricks_slab.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/paved_gabbro_bricks_slab.json @@ -11,5 +11,11 @@ "result": { "item": "create:paved_gabbro_bricks_slab", "count": 6 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/polished_dolomite.json b/src/main/resources/data/create/recipes/crafting/palettes/polished_dolomite.json index 9c86b7cfc..98327a766 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/polished_dolomite.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/polished_dolomite.json @@ -12,5 +12,11 @@ "result": { "item": "create:polished_dolomite", "count": 4 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/polished_gabbro.json b/src/main/resources/data/create/recipes/crafting/palettes/polished_gabbro.json index f7e796fb9..e6d4300df 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/polished_gabbro.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/polished_gabbro.json @@ -12,5 +12,11 @@ "result": { "item": "create:polished_gabbro", "count": 4 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/polished_limestone.json b/src/main/resources/data/create/recipes/crafting/palettes/polished_limestone.json index 9add521e5..50153c753 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/polished_limestone.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/polished_limestone.json @@ -12,5 +12,11 @@ "result": { "item": "create:polished_limestone", "count": 4 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/polished_limestone_slab.json b/src/main/resources/data/create/recipes/crafting/palettes/polished_limestone_slab.json index 48a2eaca8..4cde0244d 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/polished_limestone_slab.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/polished_limestone_slab.json @@ -11,5 +11,11 @@ "result": { "item": "create:polished_limestone_slab", "count": 6 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/polished_weathered_limestone.json b/src/main/resources/data/create/recipes/crafting/palettes/polished_weathered_limestone.json index 620e79f66..60952d009 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/polished_weathered_limestone.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/polished_weathered_limestone.json @@ -12,5 +12,11 @@ "result": { "item": "create:polished_weathered_limestone", "count": 4 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/polished_weathered_limestone_slab.json b/src/main/resources/data/create/recipes/crafting/palettes/polished_weathered_limestone_slab.json index 05bf108eb..5f25daaa6 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/polished_weathered_limestone_slab.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/polished_weathered_limestone_slab.json @@ -11,5 +11,11 @@ "result": { "item": "create:polished_weathered_limestone_slab", "count": 6 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone.json b/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone.json index a92e9916f..b2a2c7112 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone.json @@ -16,5 +16,11 @@ "result": { "item": "create:weathered_limestone", "count": 8 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone_bricks.json b/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone_bricks.json index ccea8c165..f942efbea 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone_bricks.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone_bricks.json @@ -12,5 +12,11 @@ "result": { "item": "create:weathered_limestone_bricks", "count": 4 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone_bricks_slab.json b/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone_bricks_slab.json index 05cdc2293..1496ba41d 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone_bricks_slab.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone_bricks_slab.json @@ -11,5 +11,11 @@ "result": { "item": "create:weathered_limestone_bricks_slab", "count": 6 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone_bricks_stairs.json b/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone_bricks_stairs.json index 72ffb693d..ad69f31e9 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone_bricks_stairs.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone_bricks_stairs.json @@ -13,5 +13,11 @@ "result": { "item": "create:weathered_limestone_bricks_stairs", "count": 8 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone_bricks_wall.json b/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone_bricks_wall.json index fb4dfaa79..45e99caef 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone_bricks_wall.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone_bricks_wall.json @@ -12,5 +12,11 @@ "result": { "item": "create:weathered_limestone_bricks_wall", "count": 12 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone_slab.json b/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone_slab.json index 1471da269..99017c4c3 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone_slab.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone_slab.json @@ -11,5 +11,11 @@ "result": { "item": "create:weathered_limestone_slab", "count": 6 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone_stairs.json b/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone_stairs.json index 76ba120a5..542d036ec 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone_stairs.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone_stairs.json @@ -13,5 +13,11 @@ "result": { "item": "create:weathered_limestone_stairs", "count": 8 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone_wall.json b/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone_wall.json index 994a499d8..86be2dc18 100644 --- a/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone_wall.json +++ b/src/main/resources/data/create/recipes/crafting/palettes/weathered_limestone_wall.json @@ -12,5 +12,11 @@ "result": { "item": "create:weathered_limestone_wall", "count": 12 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/piston_pole.json b/src/main/resources/data/create/recipes/crafting/piston_pole.json index 751afe484..78594312e 100644 --- a/src/main/resources/data/create/recipes/crafting/piston_pole.json +++ b/src/main/resources/data/create/recipes/crafting/piston_pole.json @@ -16,5 +16,11 @@ "result": { "item": "create:piston_pole", "count": 8 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/placement_handgun.json b/src/main/resources/data/create/recipes/crafting/placement_handgun.json index 033589349..53a532d75 100644 --- a/src/main/resources/data/create/recipes/crafting/placement_handgun.json +++ b/src/main/resources/data/create/recipes/crafting/placement_handgun.json @@ -19,5 +19,11 @@ "result": { "item": "create:placement_handgun", "count": 1 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "curiosities" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/pulse_repeater.json b/src/main/resources/data/create/recipes/crafting/pulse_repeater.json index 0b6d9874e..0fc6a3a62 100644 --- a/src/main/resources/data/create/recipes/crafting/pulse_repeater.json +++ b/src/main/resources/data/create/recipes/crafting/pulse_repeater.json @@ -18,5 +18,11 @@ "result": { "item": "create:pulse_repeater", "count": 1 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "logistics" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/redstone_bridge.json b/src/main/resources/data/create/recipes/crafting/redstone_bridge.json index b9b90e150..351155d30 100644 --- a/src/main/resources/data/create/recipes/crafting/redstone_bridge.json +++ b/src/main/resources/data/create/recipes/crafting/redstone_bridge.json @@ -18,5 +18,11 @@ "result": { "item": "create:redstone_bridge", "count": 2 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "logistics" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/rotation_chassis.json b/src/main/resources/data/create/recipes/crafting/rotation_chassis.json index 45fd17cfb..31370e08f 100644 --- a/src/main/resources/data/create/recipes/crafting/rotation_chassis.json +++ b/src/main/resources/data/create/recipes/crafting/rotation_chassis.json @@ -19,5 +19,11 @@ "result": { "item": "create:rotation_chassis", "count": 4 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/schematic_table.json b/src/main/resources/data/create/recipes/crafting/schematic_table.json index b239d0cee..19ff98b57 100644 --- a/src/main/resources/data/create/recipes/crafting/schematic_table.json +++ b/src/main/resources/data/create/recipes/crafting/schematic_table.json @@ -16,5 +16,11 @@ "result": { "item": "create:schematic_table", "count": 1 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "schematics" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/schematicannon.json b/src/main/resources/data/create/recipes/crafting/schematicannon.json index bb2a9b902..9fffacf1c 100644 --- a/src/main/resources/data/create/recipes/crafting/schematicannon.json +++ b/src/main/resources/data/create/recipes/crafting/schematicannon.json @@ -25,5 +25,11 @@ "result": { "item": "create:schematicannon", "count": 1 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "schematics" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/shaft.json b/src/main/resources/data/create/recipes/crafting/shaft.json index d77d72f73..58d5e20ed 100644 --- a/src/main/resources/data/create/recipes/crafting/shaft.json +++ b/src/main/resources/data/create/recipes/crafting/shaft.json @@ -13,5 +13,11 @@ "result": { "item": "create:shaft", "count": 16 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/sticky_mechanical_piston.json b/src/main/resources/data/create/recipes/crafting/sticky_mechanical_piston.json index 0fddfe2e6..b3e7da35f 100644 --- a/src/main/resources/data/create/recipes/crafting/sticky_mechanical_piston.json +++ b/src/main/resources/data/create/recipes/crafting/sticky_mechanical_piston.json @@ -15,5 +15,11 @@ "result": { "item": "create:sticky_mechanical_piston", "count": 1 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/stockswitch.json b/src/main/resources/data/create/recipes/crafting/stockswitch.json index 76c612688..d336248d0 100644 --- a/src/main/resources/data/create/recipes/crafting/stockswitch.json +++ b/src/main/resources/data/create/recipes/crafting/stockswitch.json @@ -22,5 +22,11 @@ "result": { "item": "create:stockswitch", "count": 1 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "logistics" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/symmetry_wand.json b/src/main/resources/data/create/recipes/crafting/symmetry_wand.json index 897683829..643e5e996 100644 --- a/src/main/resources/data/create/recipes/crafting/symmetry_wand.json +++ b/src/main/resources/data/create/recipes/crafting/symmetry_wand.json @@ -25,5 +25,11 @@ "result": { "item": "create:symmetry_wand", "count": 1 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "curiosities" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/translation_chassis.json b/src/main/resources/data/create/recipes/crafting/translation_chassis.json index 1ca2c29fc..f96951106 100644 --- a/src/main/resources/data/create/recipes/crafting/translation_chassis.json +++ b/src/main/resources/data/create/recipes/crafting/translation_chassis.json @@ -19,5 +19,11 @@ "result": { "item": "create:translation_chassis", "count": 4 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/tree_fertilizer.json b/src/main/resources/data/create/recipes/crafting/tree_fertilizer.json index 9c0b26eb0..2292bf0dc 100644 --- a/src/main/resources/data/create/recipes/crafting/tree_fertilizer.json +++ b/src/main/resources/data/create/recipes/crafting/tree_fertilizer.json @@ -17,5 +17,11 @@ "result": { "item": "create:tree_fertilizer", "count": 2 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "gardens" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/turntable.json b/src/main/resources/data/create/recipes/crafting/turntable.json index ad6294cd5..d205d439e 100644 --- a/src/main/resources/data/create/recipes/crafting/turntable.json +++ b/src/main/resources/data/create/recipes/crafting/turntable.json @@ -15,5 +15,11 @@ "result": { "item": "create:turntable", "count": 1 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/crafting/water_wheel.json b/src/main/resources/data/create/recipes/crafting/water_wheel.json index a9e343df2..8385d0780 100644 --- a/src/main/resources/data/create/recipes/crafting/water_wheel.json +++ b/src/main/resources/data/create/recipes/crafting/water_wheel.json @@ -16,5 +16,11 @@ "result": { "item": "create:water_wheel", "count": 1 - } + }, + "conditions": [ + { + "type": "create:module", + "module": "contraptions" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/andesite_bricks.json b/src/main/resources/data/create/recipes/stonecutting/andesite_bricks.json index f379c7df2..80db9ff61 100644 --- a/src/main/resources/data/create/recipes/stonecutting/andesite_bricks.json +++ b/src/main/resources/data/create/recipes/stonecutting/andesite_bricks.json @@ -4,5 +4,11 @@ "item": "minecraft:andesite" }, "result": "create:andesite_bricks", - "count": 1 + "count": 1, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/diorite_bricks.json b/src/main/resources/data/create/recipes/stonecutting/diorite_bricks.json index d7d98e4bd..4b20ea157 100644 --- a/src/main/resources/data/create/recipes/stonecutting/diorite_bricks.json +++ b/src/main/resources/data/create/recipes/stonecutting/diorite_bricks.json @@ -4,5 +4,11 @@ "item": "minecraft:diorite" }, "result": "create:diorite_bricks", - "count": 1 + "count": 1, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/dolomite_bricks.json b/src/main/resources/data/create/recipes/stonecutting/dolomite_bricks.json index 27293be51..6e47e2efe 100644 --- a/src/main/resources/data/create/recipes/stonecutting/dolomite_bricks.json +++ b/src/main/resources/data/create/recipes/stonecutting/dolomite_bricks.json @@ -4,5 +4,11 @@ "item": "create:dolomite" }, "result": "create:dolomite_bricks", - "count": 1 + "count": 1, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/dolomite_pillar.json b/src/main/resources/data/create/recipes/stonecutting/dolomite_pillar.json index 9dd46828a..010a70762 100644 --- a/src/main/resources/data/create/recipes/stonecutting/dolomite_pillar.json +++ b/src/main/resources/data/create/recipes/stonecutting/dolomite_pillar.json @@ -4,5 +4,11 @@ "item": "create:dolomite" }, "result": "create:dolomite_pillar", - "count": 1 + "count": 1, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/dolomite_slab.json b/src/main/resources/data/create/recipes/stonecutting/dolomite_slab.json index a7e7cffff..859c2ec62 100644 --- a/src/main/resources/data/create/recipes/stonecutting/dolomite_slab.json +++ b/src/main/resources/data/create/recipes/stonecutting/dolomite_slab.json @@ -4,5 +4,11 @@ "item": "create:dolomite" }, "result": "create:dolomite_slab", - "count": 2 + "count": 2, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/dolomite_stairs.json b/src/main/resources/data/create/recipes/stonecutting/dolomite_stairs.json index 06a377fc5..af4fa9314 100644 --- a/src/main/resources/data/create/recipes/stonecutting/dolomite_stairs.json +++ b/src/main/resources/data/create/recipes/stonecutting/dolomite_stairs.json @@ -4,5 +4,11 @@ "item": "create:dolomite" }, "result": "create:dolomite_stairs", - "count": 1 + "count": 1, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/dolomite_wall.json b/src/main/resources/data/create/recipes/stonecutting/dolomite_wall.json index 90e9e7d03..e9682fb2f 100644 --- a/src/main/resources/data/create/recipes/stonecutting/dolomite_wall.json +++ b/src/main/resources/data/create/recipes/stonecutting/dolomite_wall.json @@ -4,5 +4,11 @@ "item": "create:dolomite" }, "result": "create:dolomite_wall", - "count": 2 + "count": 2, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/gabbro_bricks.json b/src/main/resources/data/create/recipes/stonecutting/gabbro_bricks.json index db7afd4fd..f39781127 100644 --- a/src/main/resources/data/create/recipes/stonecutting/gabbro_bricks.json +++ b/src/main/resources/data/create/recipes/stonecutting/gabbro_bricks.json @@ -4,5 +4,11 @@ "item": "create:gabbro" }, "result": "create:gabbro_bricks", - "count": 1 + "count": 1, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/gabbro_bricks_stairs.json b/src/main/resources/data/create/recipes/stonecutting/gabbro_bricks_stairs.json index b2d4d0fe7..8c4ad039b 100644 --- a/src/main/resources/data/create/recipes/stonecutting/gabbro_bricks_stairs.json +++ b/src/main/resources/data/create/recipes/stonecutting/gabbro_bricks_stairs.json @@ -4,5 +4,11 @@ "item": "create:gabbro" }, "result": "create:gabbro_bricks_stairs", - "count": 1 + "count": 1, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/gabbro_bricks_stairs2.json b/src/main/resources/data/create/recipes/stonecutting/gabbro_bricks_stairs2.json index c333f57d2..48ef4d277 100644 --- a/src/main/resources/data/create/recipes/stonecutting/gabbro_bricks_stairs2.json +++ b/src/main/resources/data/create/recipes/stonecutting/gabbro_bricks_stairs2.json @@ -4,5 +4,11 @@ "item": "create:gabbro_bricks" }, "result": "create:gabbro_bricks_stairs", - "count": 1 + "count": 1, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/gabbro_bricks_wall.json b/src/main/resources/data/create/recipes/stonecutting/gabbro_bricks_wall.json index d6ceb6742..7fda8161a 100644 --- a/src/main/resources/data/create/recipes/stonecutting/gabbro_bricks_wall.json +++ b/src/main/resources/data/create/recipes/stonecutting/gabbro_bricks_wall.json @@ -4,5 +4,11 @@ "item": "create:gabbro" }, "result": "create:gabbro_bricks_wall", - "count": 2 + "count": 2, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/gabbro_bricks_wall2.json b/src/main/resources/data/create/recipes/stonecutting/gabbro_bricks_wall2.json index faa20c23d..61541d0ea 100644 --- a/src/main/resources/data/create/recipes/stonecutting/gabbro_bricks_wall2.json +++ b/src/main/resources/data/create/recipes/stonecutting/gabbro_bricks_wall2.json @@ -4,5 +4,11 @@ "item": "create:gabbro_bricks" }, "result": "create:gabbro_bricks_wall", - "count": 2 + "count": 2, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/gabbro_slab.json b/src/main/resources/data/create/recipes/stonecutting/gabbro_slab.json index d4c0906fa..8ca870eac 100644 --- a/src/main/resources/data/create/recipes/stonecutting/gabbro_slab.json +++ b/src/main/resources/data/create/recipes/stonecutting/gabbro_slab.json @@ -4,5 +4,11 @@ "item": "create:gabbro" }, "result": "create:gabbro_slab", - "count": 2 + "count": 2, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/gabbro_stairs.json b/src/main/resources/data/create/recipes/stonecutting/gabbro_stairs.json index 377c5c53a..7889077be 100644 --- a/src/main/resources/data/create/recipes/stonecutting/gabbro_stairs.json +++ b/src/main/resources/data/create/recipes/stonecutting/gabbro_stairs.json @@ -4,5 +4,11 @@ "item": "create:gabbro" }, "result": "create:gabbro_stairs", - "count": 1 + "count": 1, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/gabbro_wall.json b/src/main/resources/data/create/recipes/stonecutting/gabbro_wall.json index be9520329..1be824d02 100644 --- a/src/main/resources/data/create/recipes/stonecutting/gabbro_wall.json +++ b/src/main/resources/data/create/recipes/stonecutting/gabbro_wall.json @@ -4,5 +4,11 @@ "item": "create:gabbro" }, "result": "create:gabbro_wall", - "count": 2 + "count": 2, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/granite_bricks.json b/src/main/resources/data/create/recipes/stonecutting/granite_bricks.json index 737c1061e..904852a85 100644 --- a/src/main/resources/data/create/recipes/stonecutting/granite_bricks.json +++ b/src/main/resources/data/create/recipes/stonecutting/granite_bricks.json @@ -4,5 +4,11 @@ "item": "minecraft:granite" }, "result": "create:granite_bricks", - "count": 1 + "count": 1, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/indented_gabbro_slab.json b/src/main/resources/data/create/recipes/stonecutting/indented_gabbro_slab.json index 88c24028f..a36e2d6a4 100644 --- a/src/main/resources/data/create/recipes/stonecutting/indented_gabbro_slab.json +++ b/src/main/resources/data/create/recipes/stonecutting/indented_gabbro_slab.json @@ -4,5 +4,11 @@ "item": "create:gabbro" }, "result": "create:indented_gabbro_slab", - "count": 2 + "count": 2, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/indented_gabbro_slab2.json b/src/main/resources/data/create/recipes/stonecutting/indented_gabbro_slab2.json index 9349e2cf8..0797c51bd 100644 --- a/src/main/resources/data/create/recipes/stonecutting/indented_gabbro_slab2.json +++ b/src/main/resources/data/create/recipes/stonecutting/indented_gabbro_slab2.json @@ -4,5 +4,11 @@ "item": "create:polished_gabbro" }, "result": "create:indented_gabbro_slab", - "count": 2 + "count": 2, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/limestone_bricks.json b/src/main/resources/data/create/recipes/stonecutting/limestone_bricks.json index abb1d975c..1913aa650 100644 --- a/src/main/resources/data/create/recipes/stonecutting/limestone_bricks.json +++ b/src/main/resources/data/create/recipes/stonecutting/limestone_bricks.json @@ -4,5 +4,11 @@ "item": "create:limestone" }, "result": "create:limestone_bricks", - "count": 1 + "count": 1, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/limestone_bricks_slab.json b/src/main/resources/data/create/recipes/stonecutting/limestone_bricks_slab.json index cc8a36be9..d76181836 100644 --- a/src/main/resources/data/create/recipes/stonecutting/limestone_bricks_slab.json +++ b/src/main/resources/data/create/recipes/stonecutting/limestone_bricks_slab.json @@ -4,5 +4,11 @@ "item": "create:limestone" }, "result": "create:limestone_bricks_slab", - "count": 2 + "count": 2, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/limestone_bricks_slab2.json b/src/main/resources/data/create/recipes/stonecutting/limestone_bricks_slab2.json index 52e335b87..a84ede1f5 100644 --- a/src/main/resources/data/create/recipes/stonecutting/limestone_bricks_slab2.json +++ b/src/main/resources/data/create/recipes/stonecutting/limestone_bricks_slab2.json @@ -4,5 +4,11 @@ "item": "create:limestone_bricks" }, "result": "create:limestone_bricks_slab", - "count": 2 + "count": 2, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/limestone_bricks_stairs.json b/src/main/resources/data/create/recipes/stonecutting/limestone_bricks_stairs.json index 43ff891ec..ade4592a5 100644 --- a/src/main/resources/data/create/recipes/stonecutting/limestone_bricks_stairs.json +++ b/src/main/resources/data/create/recipes/stonecutting/limestone_bricks_stairs.json @@ -4,5 +4,11 @@ "item": "create:limestone" }, "result": "create:limestone_bricks_stairs", - "count": 1 + "count": 1, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/limestone_bricks_stairs2.json b/src/main/resources/data/create/recipes/stonecutting/limestone_bricks_stairs2.json index 2329b41d0..50f1248dc 100644 --- a/src/main/resources/data/create/recipes/stonecutting/limestone_bricks_stairs2.json +++ b/src/main/resources/data/create/recipes/stonecutting/limestone_bricks_stairs2.json @@ -4,5 +4,11 @@ "item": "create:limestone_bricks" }, "result": "create:limestone_bricks_stairs", - "count": 1 + "count": 1, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/limestone_bricks_wall.json b/src/main/resources/data/create/recipes/stonecutting/limestone_bricks_wall.json index 580114710..dd3f33c45 100644 --- a/src/main/resources/data/create/recipes/stonecutting/limestone_bricks_wall.json +++ b/src/main/resources/data/create/recipes/stonecutting/limestone_bricks_wall.json @@ -4,5 +4,11 @@ "item": "create:limestone" }, "result": "create:limestone_bricks_wall", - "count": 2 + "count": 2, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/limestone_bricks_wall2.json b/src/main/resources/data/create/recipes/stonecutting/limestone_bricks_wall2.json index 20f0a3a74..9b74119b4 100644 --- a/src/main/resources/data/create/recipes/stonecutting/limestone_bricks_wall2.json +++ b/src/main/resources/data/create/recipes/stonecutting/limestone_bricks_wall2.json @@ -4,5 +4,11 @@ "item": "create:limestone_bricks" }, "result": "create:limestone_bricks_wall", - "count": 2 + "count": 2, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/limestone_pillar.json b/src/main/resources/data/create/recipes/stonecutting/limestone_pillar.json index b1bb3e877..cffee967a 100644 --- a/src/main/resources/data/create/recipes/stonecutting/limestone_pillar.json +++ b/src/main/resources/data/create/recipes/stonecutting/limestone_pillar.json @@ -4,5 +4,11 @@ "item": "create:limestone" }, "result": "create:limestone_pillar", - "count": 1 + "count": 1, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/limestone_slab.json b/src/main/resources/data/create/recipes/stonecutting/limestone_slab.json index 0939dfe83..82af126ab 100644 --- a/src/main/resources/data/create/recipes/stonecutting/limestone_slab.json +++ b/src/main/resources/data/create/recipes/stonecutting/limestone_slab.json @@ -4,5 +4,11 @@ "item": "create:limestone" }, "result": "create:limestone_slab", - "count": 2 + "count": 2, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/limestone_stairs.json b/src/main/resources/data/create/recipes/stonecutting/limestone_stairs.json index 539b2ab0a..8ea3649bd 100644 --- a/src/main/resources/data/create/recipes/stonecutting/limestone_stairs.json +++ b/src/main/resources/data/create/recipes/stonecutting/limestone_stairs.json @@ -4,5 +4,11 @@ "item": "create:limestone" }, "result": "create:limestone_stairs", - "count": 1 + "count": 1, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/limestone_wall.json b/src/main/resources/data/create/recipes/stonecutting/limestone_wall.json index a8f315854..671c46050 100644 --- a/src/main/resources/data/create/recipes/stonecutting/limestone_wall.json +++ b/src/main/resources/data/create/recipes/stonecutting/limestone_wall.json @@ -4,5 +4,11 @@ "item": "create:limestone" }, "result": "create:limestone_wall", - "count": 2 + "count": 2, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/mossy_gabbro_bricks.json b/src/main/resources/data/create/recipes/stonecutting/mossy_gabbro_bricks.json index 252b3561d..b84391746 100644 --- a/src/main/resources/data/create/recipes/stonecutting/mossy_gabbro_bricks.json +++ b/src/main/resources/data/create/recipes/stonecutting/mossy_gabbro_bricks.json @@ -4,5 +4,11 @@ "item": "create:gabbro" }, "result": "create:mossy_gabbro_bricks", - "count": 1 + "count": 1, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/paved_gabbro_bricks.json b/src/main/resources/data/create/recipes/stonecutting/paved_gabbro_bricks.json index a08e43841..821efed4c 100644 --- a/src/main/resources/data/create/recipes/stonecutting/paved_gabbro_bricks.json +++ b/src/main/resources/data/create/recipes/stonecutting/paved_gabbro_bricks.json @@ -4,5 +4,11 @@ "item": "create:gabbro" }, "result": "create:paved_gabbro_bricks", - "count": 1 + "count": 1, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/paved_gabbro_bricks_slab.json b/src/main/resources/data/create/recipes/stonecutting/paved_gabbro_bricks_slab.json index 0d3d2fbbb..6f1d828c7 100644 --- a/src/main/resources/data/create/recipes/stonecutting/paved_gabbro_bricks_slab.json +++ b/src/main/resources/data/create/recipes/stonecutting/paved_gabbro_bricks_slab.json @@ -4,5 +4,11 @@ "item": "create:gabbro" }, "result": "create:paved_gabbro_bricks_slab", - "count": 2 + "count": 2, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/paved_gabbro_bricks_slab2.json b/src/main/resources/data/create/recipes/stonecutting/paved_gabbro_bricks_slab2.json index 5e34b24d1..ffe253c18 100644 --- a/src/main/resources/data/create/recipes/stonecutting/paved_gabbro_bricks_slab2.json +++ b/src/main/resources/data/create/recipes/stonecutting/paved_gabbro_bricks_slab2.json @@ -4,5 +4,11 @@ "item": "create:paved_gabbro_bricks" }, "result": "create:paved_gabbro_bricks_slab", - "count": 2 + "count": 2, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/polished_dolomite.json b/src/main/resources/data/create/recipes/stonecutting/polished_dolomite.json index 833af3e91..2bb0d6d76 100644 --- a/src/main/resources/data/create/recipes/stonecutting/polished_dolomite.json +++ b/src/main/resources/data/create/recipes/stonecutting/polished_dolomite.json @@ -4,5 +4,11 @@ "item": "create:dolomite" }, "result": "create:polished_dolomite", - "count": 1 + "count": 1, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/polished_gabbro.json b/src/main/resources/data/create/recipes/stonecutting/polished_gabbro.json index 54edb803f..0211c1875 100644 --- a/src/main/resources/data/create/recipes/stonecutting/polished_gabbro.json +++ b/src/main/resources/data/create/recipes/stonecutting/polished_gabbro.json @@ -4,5 +4,11 @@ "item": "create:gabbro" }, "result": "create:polished_gabbro", - "count": 1 + "count": 1, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/polished_limestone.json b/src/main/resources/data/create/recipes/stonecutting/polished_limestone.json index e5ac1e17a..450e18058 100644 --- a/src/main/resources/data/create/recipes/stonecutting/polished_limestone.json +++ b/src/main/resources/data/create/recipes/stonecutting/polished_limestone.json @@ -4,5 +4,11 @@ "item": "create:limestone" }, "result": "create:polished_limestone", - "count": 1 + "count": 1, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/polished_limestone_slab.json b/src/main/resources/data/create/recipes/stonecutting/polished_limestone_slab.json index 1f7529ad7..cbd0fe2b8 100644 --- a/src/main/resources/data/create/recipes/stonecutting/polished_limestone_slab.json +++ b/src/main/resources/data/create/recipes/stonecutting/polished_limestone_slab.json @@ -4,5 +4,11 @@ "item": "create:limestone" }, "result": "create:polished_limestone_slab", - "count": 2 + "count": 2, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/polished_limestone_slab2.json b/src/main/resources/data/create/recipes/stonecutting/polished_limestone_slab2.json index d5b582806..5b750f5f7 100644 --- a/src/main/resources/data/create/recipes/stonecutting/polished_limestone_slab2.json +++ b/src/main/resources/data/create/recipes/stonecutting/polished_limestone_slab2.json @@ -4,5 +4,11 @@ "item": "create:polished_limestone" }, "result": "create:polished_limestone_slab", - "count": 2 + "count": 2, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/polished_weathered_limestone.json b/src/main/resources/data/create/recipes/stonecutting/polished_weathered_limestone.json index ec13bc0d2..35531cd6e 100644 --- a/src/main/resources/data/create/recipes/stonecutting/polished_weathered_limestone.json +++ b/src/main/resources/data/create/recipes/stonecutting/polished_weathered_limestone.json @@ -4,5 +4,11 @@ "item": "create:weathered_limestone" }, "result": "create:polished_weathered_limestone", - "count": 1 + "count": 1, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/polished_weathered_limestone_slab.json b/src/main/resources/data/create/recipes/stonecutting/polished_weathered_limestone_slab.json index 70fd6ad0c..087f822cf 100644 --- a/src/main/resources/data/create/recipes/stonecutting/polished_weathered_limestone_slab.json +++ b/src/main/resources/data/create/recipes/stonecutting/polished_weathered_limestone_slab.json @@ -4,5 +4,11 @@ "item": "create:weathered_limestone" }, "result": "create:polished_weathered_limestone_slab", - "count": 2 + "count": 2, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/polished_weathered_limestone_slab2.json b/src/main/resources/data/create/recipes/stonecutting/polished_weathered_limestone_slab2.json index 07418cd84..194f51144 100644 --- a/src/main/resources/data/create/recipes/stonecutting/polished_weathered_limestone_slab2.json +++ b/src/main/resources/data/create/recipes/stonecutting/polished_weathered_limestone_slab2.json @@ -4,5 +4,11 @@ "item": "create:polished_weathered_limestone" }, "result": "create:polished_weathered_limestone_slab", - "count": 2 + "count": 2, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/slightly_mossy_gabbro_bricks.json b/src/main/resources/data/create/recipes/stonecutting/slightly_mossy_gabbro_bricks.json index 2a9b1dea7..aa830b64d 100644 --- a/src/main/resources/data/create/recipes/stonecutting/slightly_mossy_gabbro_bricks.json +++ b/src/main/resources/data/create/recipes/stonecutting/slightly_mossy_gabbro_bricks.json @@ -4,5 +4,11 @@ "item": "create:gabbro" }, "result": "create:slightly_mossy_gabbro_bricks", - "count": 1 + "count": 1, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_bricks.json b/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_bricks.json index ab6c5c16e..df67f15df 100644 --- a/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_bricks.json +++ b/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_bricks.json @@ -4,5 +4,11 @@ "item": "create:weathered_limestone" }, "result": "create:weathered_limestone_bricks", - "count": 1 + "count": 1, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_bricks_slab.json b/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_bricks_slab.json index 1e25db8ce..54a1c4e88 100644 --- a/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_bricks_slab.json +++ b/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_bricks_slab.json @@ -4,5 +4,11 @@ "item": "create:weathered_limestone" }, "result": "create:weathered_limestone_bricks_slab", - "count": 2 + "count": 2, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_bricks_slab2.json b/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_bricks_slab2.json index 2019ce0bf..eae5eb282 100644 --- a/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_bricks_slab2.json +++ b/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_bricks_slab2.json @@ -4,5 +4,11 @@ "item": "create:weathered_limestone_bricks" }, "result": "create:weathered_limestone_bricks_slab", - "count": 2 + "count": 2, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_bricks_stairs.json b/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_bricks_stairs.json index 030f1de39..b6a780756 100644 --- a/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_bricks_stairs.json +++ b/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_bricks_stairs.json @@ -4,5 +4,11 @@ "item": "create:weathered_limestone" }, "result": "create:weathered_limestone_bricks_stairs", - "count": 1 + "count": 1, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_bricks_stairs2.json b/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_bricks_stairs2.json index a3f51b00e..6025a2f10 100644 --- a/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_bricks_stairs2.json +++ b/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_bricks_stairs2.json @@ -4,5 +4,11 @@ "item": "create:weathered_limestone_bricks" }, "result": "create:weathered_limestone_bricks_stairs", - "count": 1 + "count": 1, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_bricks_wall.json b/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_bricks_wall.json index f04c6673c..1fbe5083e 100644 --- a/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_bricks_wall.json +++ b/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_bricks_wall.json @@ -4,5 +4,11 @@ "item": "create:weathered_limestone" }, "result": "create:weathered_limestone_bricks_wall", - "count": 2 + "count": 2, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_bricks_wall2.json b/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_bricks_wall2.json index b8d923438..35922fbf7 100644 --- a/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_bricks_wall2.json +++ b/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_bricks_wall2.json @@ -4,5 +4,11 @@ "item": "create:weathered_limestone_bricks" }, "result": "create:weathered_limestone_bricks_wall", - "count": 2 + "count": 2, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_pillar.json b/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_pillar.json index 175624491..87c3ca090 100644 --- a/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_pillar.json +++ b/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_pillar.json @@ -4,5 +4,11 @@ "item": "create:weathered_limestone" }, "result": "create:weathered_limestone_pillar", - "count": 1 + "count": 1, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_slab.json b/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_slab.json index 6c84af7eb..549e00256 100644 --- a/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_slab.json +++ b/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_slab.json @@ -4,5 +4,11 @@ "item": "create:weathered_limestone" }, "result": "create:weathered_limestone_slab", - "count": 2 + "count": 2, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_stairs.json b/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_stairs.json index ca8db51c6..69fe7a0fb 100644 --- a/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_stairs.json +++ b/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_stairs.json @@ -4,5 +4,11 @@ "item": "create:weathered_limestone" }, "result": "create:weathered_limestone_stairs", - "count": 1 + "count": 1, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file diff --git a/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_wall.json b/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_wall.json index 4115bc9bd..9014d9ca1 100644 --- a/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_wall.json +++ b/src/main/resources/data/create/recipes/stonecutting/weathered_limestone_wall.json @@ -4,5 +4,11 @@ "item": "create:weathered_limestone" }, "result": "create:weathered_limestone_wall", - "count": 2 + "count": 2, + "conditions": [ + { + "type": "create:module", + "module": "palettes" + } + ] } \ No newline at end of file