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.
This commit is contained in:
simibubi 2019-09-12 10:00:15 +02:00
parent 6fb5da3d6a
commit 4a2335672d
156 changed files with 1517 additions and 598 deletions

View file

@ -4,6 +4,7 @@ import com.simibubi.create.foundation.block.IWithoutBlockItem;
import com.simibubi.create.foundation.block.ProperStairsBlock; import com.simibubi.create.foundation.block.ProperStairsBlock;
import com.simibubi.create.foundation.block.RenderUtilityAxisBlock; import com.simibubi.create.foundation.block.RenderUtilityAxisBlock;
import com.simibubi.create.foundation.block.RenderUtilityBlock; 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.MotorBlock;
import com.simibubi.create.modules.contraptions.generators.WaterWheelBlock; import com.simibubi.create.modules.contraptions.generators.WaterWheelBlock;
import com.simibubi.create.modules.contraptions.receivers.CrushingWheelBlock; 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.ShaftBlock;
import com.simibubi.create.modules.contraptions.relays.ShaftHalfBlock; import com.simibubi.create.modules.contraptions.relays.ShaftHalfBlock;
import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock; import com.simibubi.create.modules.contraptions.relays.belt.BeltBlock;
import com.simibubi.create.modules.economy.ShopShelfBlock;
import com.simibubi.create.modules.gardens.CocoaLogBlock; import com.simibubi.create.modules.gardens.CocoaLogBlock;
import com.simibubi.create.modules.logistics.block.BeltFunnelBlock; import com.simibubi.create.modules.logistics.block.BeltFunnelBlock;
import com.simibubi.create.modules.logistics.block.EntityDetectorBlock; import com.simibubi.create.modules.logistics.block.EntityDetectorBlock;
@ -60,14 +60,14 @@ import net.minecraftforge.registries.IForgeRegistry;
public enum AllBlocks { public enum AllBlocks {
// Schematics __SCHEMATICS__(),
SCHEMATICANNON(new SchematicannonBlock()), SCHEMATICANNON(new SchematicannonBlock()),
SCHEMATICANNON_CONNECTOR(new RenderUtilityBlock()), SCHEMATICANNON_CONNECTOR(new RenderUtilityBlock()),
SCHEMATICANNON_PIPE(new RenderUtilityBlock()), SCHEMATICANNON_PIPE(new RenderUtilityBlock()),
CREATIVE_CRATE(new CreativeCrateBlock()), CREATIVE_CRATE(new CreativeCrateBlock()),
SCHEMATIC_TABLE(new SchematicTableBlock()), SCHEMATIC_TABLE(new SchematicTableBlock()),
// Kinetics __CONTRAPTIONS__(),
SHAFT(new ShaftBlock(Properties.from(Blocks.ANDESITE))), SHAFT(new ShaftBlock(Properties.from(Blocks.ANDESITE))),
COGWHEEL(new CogWheelBlock(false)), COGWHEEL(new CogWheelBlock(false)),
LARGE_COGWHEEL(new CogWheelBlock(true)), LARGE_COGWHEEL(new CogWheelBlock(true)),
@ -79,17 +79,14 @@ public enum AllBlocks {
BELT(new BeltBlock()), BELT(new BeltBlock()),
BELT_PULLEY(new RenderUtilityAxisBlock()), BELT_PULLEY(new RenderUtilityAxisBlock()),
BELT_ANIMATION(new RenderUtilityBlock()), BELT_ANIMATION(new RenderUtilityBlock()),
MOTOR(new MotorBlock()), MOTOR(new MotorBlock()),
WATER_WHEEL(new WaterWheelBlock()), WATER_WHEEL(new WaterWheelBlock()),
ENCASED_FAN(new EncasedFanBlock()), ENCASED_FAN(new EncasedFanBlock()),
ENCASED_FAN_INNER(new RenderUtilityAxisBlock()), ENCASED_FAN_INNER(new RenderUtilityAxisBlock()),
TURNTABLE(new TurntableBlock()), TURNTABLE(new TurntableBlock()),
SHAFT_HALF(new ShaftHalfBlock()), SHAFT_HALF(new ShaftHalfBlock()),
CRUSHING_WHEEL(new CrushingWheelBlock()), CRUSHING_WHEEL(new CrushingWheelBlock()),
CRUSHING_WHEEL_CONTROLLER(new CrushingWheelControllerBlock()), CRUSHING_WHEEL_CONTROLLER(new CrushingWheelControllerBlock()),
MECHANICAL_PISTON(new MechanicalPistonBlock(false)), MECHANICAL_PISTON(new MechanicalPistonBlock(false)),
STICKY_MECHANICAL_PISTON(new MechanicalPistonBlock(true)), STICKY_MECHANICAL_PISTON(new MechanicalPistonBlock(true)),
MECHANICAL_PISTON_HEAD(new MechanicalPistonHeadBlock()), MECHANICAL_PISTON_HEAD(new MechanicalPistonHeadBlock()),
@ -98,12 +95,10 @@ public enum AllBlocks {
MECHANICAL_BEARING_TOP(new ShaftHalfBlock()), MECHANICAL_BEARING_TOP(new ShaftHalfBlock()),
TRANSLATION_CHASSIS(new TranslationChassisBlock()), TRANSLATION_CHASSIS(new TranslationChassisBlock()),
ROTATION_CHASSIS(new RotationChassisBlock()), ROTATION_CHASSIS(new RotationChassisBlock()),
// Get rid o' these
DRILL(new DrillBlock()), DRILL(new DrillBlock()),
HARVESTER(new HarvesterBlock()), HARVESTER(new HarvesterBlock()),
// Logistics __LOGISTICS__(),
CONTACT(new ContactBlock()), CONTACT(new ContactBlock()),
REDSTONE_BRIDGE(new RedstoneBridgeBlock()), REDSTONE_BRIDGE(new RedstoneBridgeBlock()),
STOCKSWITCH(new StockswitchBlock()), STOCKSWITCH(new StockswitchBlock()),
@ -114,22 +109,18 @@ public enum AllBlocks {
ENTITY_DETECTOR(new EntityDetectorBlock()), ENTITY_DETECTOR(new EntityDetectorBlock()),
PULSE_REPEATER(new PulseRepeaterBlock()), PULSE_REPEATER(new PulseRepeaterBlock()),
// Symmetry __CURIOSITIES__(),
SYMMETRY_PLANE(new PlaneSymmetryBlock()), SYMMETRY_PLANE(new PlaneSymmetryBlock()),
SYMMETRY_CROSSPLANE(new CrossPlaneSymmetryBlock()), SYMMETRY_CROSSPLANE(new CrossPlaneSymmetryBlock()),
SYMMETRY_TRIPLEPLANE(new TriplePlaneSymmetryBlock()), SYMMETRY_TRIPLEPLANE(new TriplePlaneSymmetryBlock()),
// Gardens __GARDENS__(),
COCOA_LOG(new CocoaLogBlock()), COCOA_LOG(new CocoaLogBlock()),
// Economy __PALETTES__(),
SHOP_SHELF(new ShopShelfBlock()),
// Palettes
ANDESITE_BRICKS(new Block(Properties.from(Blocks.ANDESITE))), ANDESITE_BRICKS(new Block(Properties.from(Blocks.ANDESITE))),
DIORITE_BRICKS(new Block(Properties.from(Blocks.DIORITE))), DIORITE_BRICKS(new Block(Properties.from(Blocks.DIORITE))),
GRANITE_BRICKS(new Block(Properties.from(Blocks.GRANITE))), GRANITE_BRICKS(new Block(Properties.from(Blocks.GRANITE))),
GABBRO(new Block(Properties.from(Blocks.GRANITE)), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), GABBRO(new Block(Properties.from(Blocks.GRANITE)), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL),
POLISHED_GABBRO(new Block(Properties.from(GABBRO.block))), POLISHED_GABBRO(new Block(Properties.from(GABBRO.block))),
GABBRO_BRICKS(new Block(Properties.from(GABBRO.block)), ComesWith.STAIRS, ComesWith.WALL), 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), INDENTED_GABBRO(new Block(Properties.from(GABBRO.block)), ComesWith.SLAB),
SLIGHTLY_MOSSY_GABBRO_BRICKS(new Block(Properties.from(GABBRO.block))), SLIGHTLY_MOSSY_GABBRO_BRICKS(new Block(Properties.from(GABBRO.block))),
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(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), LIMESTONE_BRICKS(new Block(Properties.from(LIMESTONE.block)), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL),
POLISHED_LIMESTONE(new Block(Properties.from(LIMESTONE.block)), ComesWith.SLAB), POLISHED_LIMESTONE(new Block(Properties.from(LIMESTONE.block)), ComesWith.SLAB),
LIMESTONE_PILLAR(new RotatedPillarBlock(Properties.from(LIMESTONE.block))), LIMESTONE_PILLAR(new RotatedPillarBlock(Properties.from(LIMESTONE.block))),
WEATHERED_LIMESTONE(new Block(Properties.from(Blocks.ANDESITE)), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL), 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, WEATHERED_LIMESTONE_BRICKS(new Block(Properties.from(WEATHERED_LIMESTONE.block)), ComesWith.STAIRS, ComesWith.SLAB,
ComesWith.WALL), ComesWith.WALL),
POLISHED_WEATHERED_LIMESTONE(new Block(Properties.from(WEATHERED_LIMESTONE.block)), ComesWith.SLAB), POLISHED_WEATHERED_LIMESTONE(new Block(Properties.from(WEATHERED_LIMESTONE.block)), ComesWith.SLAB),
WEATHERED_LIMESTONE_PILLAR(new RotatedPillarBlock(Properties.from(WEATHERED_LIMESTONE.block))), 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(new Block(Properties.from(Blocks.QUARTZ_BLOCK)), ComesWith.STAIRS, ComesWith.SLAB, ComesWith.WALL),
DOLOMITE_BRICKS(new Block(Properties.from(DOLOMITE.block))), DOLOMITE_BRICKS(new Block(Properties.from(DOLOMITE.block))),
POLISHED_DOLOMITE(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; WALL, FENCE, FENCE_GATE, SLAB, STAIRS;
} }
private static class CategoryTracker {
static IModule currentModule;
}
public Block block; public Block block;
public Block[] alsoRegistered; 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) { private AllBlocks(Block block, ComesWith... comesWith) {
this.block = block; this.block = block;
this.block.setRegistryName(Create.ID, this.name().toLowerCase()); this.block.setRegistryName(Create.ID, this.name().toLowerCase());
this.module = CategoryTracker.currentModule;
alsoRegistered = new Block[comesWith.length]; alsoRegistered = new Block[comesWith.length];
for (int i = 0; i < comesWith.length; i++) for (int i = 0; i < comesWith.length; i++)
@ -174,6 +177,9 @@ public enum AllBlocks {
public static void registerBlocks(IForgeRegistry<Block> registry) { public static void registerBlocks(IForgeRegistry<Block> registry) {
for (AllBlocks block : values()) { for (AllBlocks block : values()) {
if (block.get() == null)
continue;
registry.register(block.block); registry.register(block.block);
for (Block extra : block.alsoRegistered) for (Block extra : block.alsoRegistered)
registry.register(extra); registry.register(extra);
@ -182,6 +188,8 @@ public enum AllBlocks {
public static void registerItemBlocks(IForgeRegistry<Item> registry) { public static void registerItemBlocks(IForgeRegistry<Item> registry) {
for (AllBlocks block : values()) { for (AllBlocks block : values()) {
if (block.get() == null)
continue;
if (block.get() instanceof IWithoutBlockItem) if (block.get() instanceof IWithoutBlockItem)
continue; continue;
@ -193,7 +201,7 @@ public enum AllBlocks {
private static void registerAsItem(IForgeRegistry<Item> registry, Block blockIn) { private static void registerAsItem(IForgeRegistry<Item> registry, Block blockIn) {
registry.register( registry.register(
new BlockItem(blockIn, AllItems.standardProperties()).setRegistryName(blockIn.getRegistryName())); new BlockItem(blockIn, AllItems.standardItemProperties()).setRegistryName(blockIn.getRegistryName()));
} }
public Block get() { public Block get() {

View file

@ -1,7 +1,5 @@
package com.simibubi.create; 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.FlexcrateContainer;
import com.simibubi.create.modules.logistics.block.FlexcrateScreen; import com.simibubi.create.modules.logistics.block.FlexcrateScreen;
import com.simibubi.create.modules.schematics.block.SchematicTableContainer; import com.simibubi.create.modules.schematics.block.SchematicTableContainer;
@ -32,8 +30,6 @@ public enum AllContainers {
SCHEMATICANNON(SchematicannonContainer::new), SCHEMATICANNON(SchematicannonContainer::new),
FLEXCRATE(FlexcrateContainer::new), FLEXCRATE(FlexcrateContainer::new),
SHOP_SHELF(ShopShelfContainer::new),
; ;
public ContainerType<? extends Container> type; public ContainerType<? extends Container> type;
@ -58,7 +54,6 @@ public enum AllContainers {
bind(SCHEMATIC_TABLE, SchematicTableScreen::new); bind(SCHEMATIC_TABLE, SchematicTableScreen::new);
bind(SCHEMATICANNON, SchematicannonScreen::new); bind(SCHEMATICANNON, SchematicannonScreen::new);
bind(FLEXCRATE, FlexcrateScreen::new); bind(FLEXCRATE, FlexcrateScreen::new);
bind(SHOP_SHELF, ShopShelfScreen::new);
} }
@OnlyIn(Dist.CLIENT) @OnlyIn(Dist.CLIENT)

View file

@ -1,6 +1,7 @@
package com.simibubi.create; package com.simibubi.create;
import com.simibubi.create.foundation.item.IItemWithColorHandler; 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.contraptions.relays.belt.BeltItem;
import com.simibubi.create.modules.curiosities.ChromaticCompoundCubeItem; import com.simibubi.create.modules.curiosities.ChromaticCompoundCubeItem;
import com.simibubi.create.modules.curiosities.placementHandgun.BuilderGunItem; import com.simibubi.create.modules.curiosities.placementHandgun.BuilderGunItem;
@ -33,20 +34,21 @@ import net.minecraftforge.registries.IForgeRegistry;
@EventBusSubscriber(value = Dist.CLIENT, bus = Bus.MOD) @EventBusSubscriber(value = Dist.CLIENT, bus = Bus.MOD)
public enum AllItems { public enum AllItems {
__CURIOSITIES__(),
SYMMETRY_WAND(new SymmetryWandItem( SYMMETRY_WAND(new SymmetryWandItem(
standardProperties().setTEISR(() -> () -> renderUsing(AllItemRenderers.SYMMETRY_WAND)))), standardItemProperties().setTEISR(() -> () -> renderUsing(AllItemRenderers.SYMMETRY_WAND)))),
PLACEMENT_HANDGUN( PLACEMENT_HANDGUN(
new BuilderGunItem(new Properties().setTEISR(() -> () -> renderUsing(AllItemRenderers.BUILDER_GUN)))), new BuilderGunItem(new Properties().setTEISR(() -> () -> renderUsing(AllItemRenderers.BUILDER_GUN)))),
ANDESITE_ALLOY_CUBE(new Item(standardProperties())), __MATERIALS__(),
BLAZE_BRASS_CUBE(new Item(standardProperties())), ANDESITE_ALLOY_CUBE(new Item(standardItemProperties())),
CHORUS_CHROME_CUBE(new Item(standardProperties().rarity(Rarity.UNCOMMON))), BLAZE_BRASS_CUBE(new Item(standardItemProperties())),
SHADOW_STEEL_CUBE(new Item(standardProperties().rarity(Rarity.UNCOMMON))), CHORUS_CHROME_CUBE(new Item(standardItemProperties().rarity(Rarity.UNCOMMON))),
ROSE_QUARTZ(new Item(standardProperties())), SHADOW_STEEL_CUBE(new Item(standardItemProperties().rarity(Rarity.UNCOMMON))),
REFINED_ROSE_QUARTZ(new Item(standardProperties())), ROSE_QUARTZ(new Item(standardItemProperties())),
CHROMATIC_COMPOUND_CUBE(new ChromaticCompoundCubeItem(standardProperties().rarity(Rarity.UNCOMMON))), REFINED_ROSE_QUARTZ(new Item(standardItemProperties())),
REFINED_RADIANCE_CUBE(new Item(standardProperties().rarity(Rarity.RARE))), 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_PICKAXE(new BlazingToolItem(1, -2.8F, standardProperties(), PICKAXE)),
// BLAZING_SHOVEL(new BlazingToolItem(1.5F, -3.0F, standardProperties(), SHOVEL)), // 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_MATTOCK(new ShadowSteelToolItem(2.5F, -1.5F, standardProperties(), SHOVEL, AXE, HOE)),
// SHADOW_STEEL_SWORD(new ShadowSteelToolItem(3, -2.0F, standardProperties(), SWORD)), // 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))), __SCHEMATICS__(),
BLUEPRINT_AND_QUILL(new SchematicAndQuillItem(standardProperties().maxStackSize(1))), EMPTY_BLUEPRINT(new Item(standardItemProperties().maxStackSize(1))),
BLUEPRINT(new SchematicItem(standardProperties())), BLUEPRINT_AND_QUILL(new SchematicAndQuillItem(standardItemProperties().maxStackSize(1))),
BELT_CONNECTOR(new BeltItem(standardProperties())), BLUEPRINT(new SchematicItem(standardItemProperties())),
__CONTRAPTIONS__(),
BELT_CONNECTOR(new BeltItem(standardItemProperties())),
; ;
private static class CategoryTracker {
static IModule currentModule;
}
// Common // Common
public Item item; public Item item;
public IModule module;
private AllItems() {
CategoryTracker.currentModule = new IModule() {
@Override
public String getModuleName() {
return name().toLowerCase().replaceAll("__", "");
}
};
}
private AllItems(Item item) { private AllItems(Item item) {
this.item = item; this.item = item;
this.item.setRegistryName(Create.ID, this.name().toLowerCase()); 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); return new Properties().group(Create.creativeTab);
} }
public static void registerItems(IForgeRegistry<Item> iForgeRegistry) { public static void registerItems(IForgeRegistry<Item> iForgeRegistry) {
for (AllItems item : values()) { for (AllItems item : values()) {
if (item.get() == null)
continue;
iForgeRegistry.register(item.get()); iForgeRegistry.register(item.get());
} }
} }

View file

@ -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.SplitShaftTileEntityRenderer;
import com.simibubi.create.modules.contraptions.relays.belt.BeltTileEntity; import com.simibubi.create.modules.contraptions.relays.belt.BeltTileEntity;
import com.simibubi.create.modules.contraptions.relays.belt.BeltTileEntityRenderer; 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.BeltFunnelTileEntity;
import com.simibubi.create.modules.logistics.block.EntityDetectorTileEntity; import com.simibubi.create.modules.logistics.block.EntityDetectorTileEntity;
import com.simibubi.create.modules.logistics.block.EntityDetectorTileEntityRenderer; import com.simibubi.create.modules.logistics.block.EntityDetectorTileEntityRenderer;
@ -90,9 +89,6 @@ public enum AllTileEntities {
BELT_FUNNEL(BeltFunnelTileEntity::new, AllBlocks.BELT_FUNNEL), BELT_FUNNEL(BeltFunnelTileEntity::new, AllBlocks.BELT_FUNNEL),
ENTITY_DETECTOR(EntityDetectorTileEntity::new, AllBlocks.ENTITY_DETECTOR), ENTITY_DETECTOR(EntityDetectorTileEntity::new, AllBlocks.ENTITY_DETECTOR),
// Economy
SHOP_SHELF(ShopShelfTileEntity::new, AllBlocks.SHOP_SHELF),
; ;
private Supplier<? extends TileEntity> supplier; private Supplier<? extends TileEntity> supplier;

View file

@ -3,15 +3,16 @@ package com.simibubi.create;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; 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.contraptions.receivers.constructs.MovingConstructHandler;
import com.simibubi.create.modules.logistics.FrequencyHandler; import com.simibubi.create.modules.logistics.FrequencyHandler;
import com.simibubi.create.modules.logistics.InWorldItemProcessingHandler;
import com.simibubi.create.modules.schematics.ServerSchematicLoader; import com.simibubi.create.modules.schematics.ServerSchematicLoader;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup; import net.minecraft.item.ItemGroup;
import net.minecraft.item.crafting.IRecipeSerializer; import net.minecraft.item.crafting.IRecipeSerializer;
import net.minecraftforge.common.crafting.CraftingHelper;
import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.ModLoadingContext; import net.minecraftforge.fml.ModLoadingContext;
@ -33,7 +34,6 @@ public class Create {
public static ItemGroup creativeTab = new CreateItemGroup(); public static ItemGroup creativeTab = new CreateItemGroup();
public static ServerSchematicLoader schematicReceiver; public static ServerSchematicLoader schematicReceiver;
public static FrequencyHandler frequencyHandler; public static FrequencyHandler frequencyHandler;
public static InWorldItemProcessingHandler itemProcessingHandler;
public static MovingConstructHandler constructHandler; public static MovingConstructHandler constructHandler;
public static ModConfig config; public static ModConfig config;
@ -46,9 +46,9 @@ public class Create {
@SubscribeEvent @SubscribeEvent
public static void init(final FMLCommonSetupEvent event) { public static void init(final FMLCommonSetupEvent event) {
schematicReceiver = new ServerSchematicLoader(); schematicReceiver = new ServerSchematicLoader();
itemProcessingHandler = new InWorldItemProcessingHandler();
frequencyHandler = new FrequencyHandler(); frequencyHandler = new FrequencyHandler();
constructHandler = new MovingConstructHandler(); constructHandler = new MovingConstructHandler();
CraftingHelper.register(new ModuleLoadedCondition.Serializer());
AllPackets.registerPackets(); AllPackets.registerPackets();
} }

View file

@ -1,5 +1,6 @@
package com.simibubi.create; 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.ClientSchematicLoader;
import com.simibubi.create.modules.schematics.client.SchematicAndQuillHandler; import com.simibubi.create.modules.schematics.client.SchematicAndQuillHandler;
import com.simibubi.create.modules.schematics.client.SchematicHandler; import com.simibubi.create.modules.schematics.client.SchematicHandler;
@ -18,6 +19,7 @@ public class CreateClient {
public static SchematicHandler schematicHandler; public static SchematicHandler schematicHandler;
public static SchematicHologram schematicHologram; public static SchematicHologram schematicHologram;
public static SchematicAndQuillHandler schematicAndQuillHandler; public static SchematicAndQuillHandler schematicAndQuillHandler;
public static EncasedFanParticleHandler fanParticles;
public static ModConfig config; public static ModConfig config;
@ -27,6 +29,7 @@ public class CreateClient {
schematicHandler = new SchematicHandler(); schematicHandler = new SchematicHandler();
schematicHologram = new SchematicHologram(); schematicHologram = new SchematicHologram();
schematicAndQuillHandler = new SchematicAndQuillHandler(); schematicAndQuillHandler = new SchematicAndQuillHandler();
fanParticles = new EncasedFanParticleHandler();
AllKeys.register(); AllKeys.register();
AllContainers.registerScreenFactories(); AllContainers.registerScreenFactories();

View file

@ -6,6 +6,7 @@ import java.nio.file.Paths;
import org.apache.commons.lang3.tuple.Pair; import org.apache.commons.lang3.tuple.Pair;
import net.minecraftforge.common.ForgeConfigSpec; import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.common.ForgeConfigSpec.BooleanValue;
import net.minecraftforge.common.ForgeConfigSpec.Builder; import net.minecraftforge.common.ForgeConfigSpec.Builder;
import net.minecraftforge.common.ForgeConfigSpec.ConfigValue; import net.minecraftforge.common.ForgeConfigSpec.ConfigValue;
import net.minecraftforge.common.ForgeConfigSpec.DoubleValue; import net.minecraftforge.common.ForgeConfigSpec.DoubleValue;
@ -23,6 +24,22 @@ public class CreateConfig {
parameters = specPair.getLeft(); 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 // Schematics
public IntValue maxSchematics, maxTotalSchematicSize, maxSchematicPacketSize, schematicIdleTimeout; public IntValue maxSchematics, maxTotalSchematicSize, maxSchematicPacketSize, schematicIdleTimeout;
public IntValue schematicannonDelay, schematicannonSkips; public IntValue schematicannonDelay, schematicannonSkips;
@ -34,7 +51,7 @@ public class CreateConfig {
// Contraptions // Contraptions
public IntValue maxBeltLength, crushingDamage, maxMotorSpeed, maxRotationSpeed; 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; public IntValue maxChassisForTranslation, maxChassisForRotation, maxChassisRange, maxPistonPoles;
// Logistics // Logistics
@ -44,23 +61,78 @@ public class CreateConfig {
public DoubleValue cocoaLogGrowthSpeed; public DoubleValue cocoaLogGrowthSpeed;
CreateConfig(final ForgeConfigSpec.Builder builder) { CreateConfig(final ForgeConfigSpec.Builder builder) {
initGeneral(builder);
// Schematics
initSchematics(builder);
initContraptions(builder); initContraptions(builder);
initCuriosities(builder); initCuriosities(builder);
initLogistics(builder); initLogistics(builder);
initGardens(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) { private void initGardens(Builder builder) {
builder.comment("The Gardens Module").push("gardens"); builder.comment("The Gardens Module").push("gardens");
String basePath = "create.config.gardens"; String basePath = "create.config.gardens.";
String name = ""; String name = "";
name = "cocoaLogGrowthSpeed"; name = "cocoaLogGrowthSpeed";
cocoaLogGrowthSpeed = builder cocoaLogGrowthSpeed = builder.comment("", "% of random Ticks causing a Cocoa log to grow.")
.comment("", "% of random Ticks causing a Cocoa log to grow.")
.translation(basePath + name).defineInRange(name, 0D, 20D, 100D); .translation(basePath + name).defineInRange(name, 0D, 20D, 100D);
builder.pop(); builder.pop();
@ -68,7 +140,7 @@ public class CreateConfig {
private void initLogistics(Builder builder) { private void initLogistics(Builder builder) {
builder.comment("The Logistics Module").push("logistics"); builder.comment("The Logistics Module").push("logistics");
String basePath = "create.config.logistics"; String basePath = "create.config.logistics.";
String name = ""; String name = "";
name = "extractorDelay"; name = "extractorDelay";
@ -82,8 +154,7 @@ public class CreateConfig {
.translation(basePath + name).defineInRange(name, 16, 1, 64); .translation(basePath + name).defineInRange(name, 16, 1, 64);
name = "linkRange"; name = "linkRange";
linkRange = builder linkRange = builder.comment("", "Maximum possible range in blocks of redstone link connections.")
.comment("", "Maximum possible range in blocks of redstone link connections.")
.translation(basePath + name).defineInRange(name, 128, 4, Integer.MAX_VALUE); .translation(basePath + name).defineInRange(name, 128, 4, Integer.MAX_VALUE);
builder.pop(); builder.pop();
@ -91,18 +162,16 @@ public class CreateConfig {
private void initContraptions(Builder builder) { private void initContraptions(Builder builder) {
builder.comment("The Contraptions Module").push("contraptions"); builder.comment("The Contraptions Module").push("contraptions");
String basePath = "create.config.contraptions"; String basePath = "create.config.contraptions.";
String name = ""; String name = "";
name = "maxBeltLength"; name = "maxBeltLength";
maxBeltLength = builder maxBeltLength = builder.comment("", "Maximum length in blocks of mechanical belts.")
.comment("", "Maximum length in blocks of mechanical belts.")
.translation(basePath + name).defineInRange(name, 20, 5, Integer.MAX_VALUE); .translation(basePath + name).defineInRange(name, 20, 5, Integer.MAX_VALUE);
name = "crushingDamage"; name = "crushingDamage";
crushingDamage = builder crushingDamage = builder.comment("", "Damage dealt by active Crushing Wheels.").translation(basePath + name)
.comment("", "Damage dealt by active Crushing Wheels.") .defineInRange(name, 4, 0, Integer.MAX_VALUE);
.translation(basePath + name).defineInRange(name, 4, 0, Integer.MAX_VALUE);
{ {
builder.comment("Encased Fan").push("encasedFan"); builder.comment("Encased Fan").push("encasedFan");
@ -114,31 +183,31 @@ public class CreateConfig {
.translation(basePath + name).defineInRange(name, 100, 20, Integer.MAX_VALUE); .translation(basePath + name).defineInRange(name, 100, 20, Integer.MAX_VALUE);
name = "fanMaxPushDistance"; name = "fanMaxPushDistance";
fanMaxPushDistance = builder fanMaxPushDistance = builder.comment("", "Maximum distance in blocks Fans can push entities.")
.comment("", "Maximum distance in blocks Fans can push entities.")
.translation(basePath + name).defineInRange(name, 20, 1, Integer.MAX_VALUE); .translation(basePath + name).defineInRange(name, 20, 1, Integer.MAX_VALUE);
name = "fanMaxPullDistance"; name = "fanMaxPullDistance";
fanMaxPullDistance = builder fanMaxPullDistance = builder.comment("", "Maximum distance in blocks from where Fans can pull entities.")
.comment("", "Maximum distance in blocks from where Fans can pull entities.")
.translation(basePath + name).defineInRange(name, 5, 1, Integer.MAX_VALUE); .translation(basePath + name).defineInRange(name, 5, 1, Integer.MAX_VALUE);
name = "fanRotationArgmax"; name = "fanRotationArgmax";
fanRotationArgmax = builder fanRotationArgmax = builder.comment("", "Rotation speed at which the maximum stats of fans are reached.")
.comment("", "Rotation speed at which the maximum stats of fans are reached.")
.translation(basePath + name).defineInRange(name, 8192, 64, Integer.MAX_VALUE); .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.pop();
} }
{ {
builder.comment("Mechanical Pistons and Bearings").push("constructs"); builder.comment("Mechanical Pistons and Bearings").push("constructs");
basePath = "create.config.contraptions.constructs"; basePath = "create.config.contraptions.constructs.";
name = "maxChassisRange"; name = "maxChassisRange";
maxChassisRange = builder maxChassisRange = builder.comment("", "Maximum value of a chassis attachment range.")
.comment("", "Maximum value of a chassis attachment range.")
.translation(basePath + name).defineInRange(name, 16, 1, Integer.MAX_VALUE); .translation(basePath + name).defineInRange(name, 16, 1, Integer.MAX_VALUE);
name = "maxChassisForRotation"; name = "maxChassisForRotation";
@ -152,21 +221,18 @@ public class CreateConfig {
.translation(basePath + name).defineInRange(name, 16, 1, Integer.MAX_VALUE); .translation(basePath + name).defineInRange(name, 16, 1, Integer.MAX_VALUE);
name = "maxPistonPoles"; name = "maxPistonPoles";
maxPistonPoles = builder maxPistonPoles = builder.comment("", "Maximum amount of extension poles behind a Mechanical Piston.")
.comment("", "Maximum amount of extension poles behind a Mechanical Piston.")
.translation(basePath + name).defineInRange(name, 64, 1, Integer.MAX_VALUE); .translation(basePath + name).defineInRange(name, 64, 1, Integer.MAX_VALUE);
builder.pop(); builder.pop();
} }
name = "maxMotorSpeed"; name = "maxMotorSpeed";
maxMotorSpeed = builder maxMotorSpeed = builder.comment("", "Maximum allowed speed of a configurable motor.")
.comment("", "Maximum allowed speed of a configurable motor.")
.translation(basePath + name).defineInRange(name, 4096, 64, Integer.MAX_VALUE); .translation(basePath + name).defineInRange(name, 4096, 64, Integer.MAX_VALUE);
name = "maxRotationSpeed"; name = "maxRotationSpeed";
maxRotationSpeed = builder maxRotationSpeed = builder.comment("", "Maximum allowed rotation speed for any Kinetic Tile.")
.comment("", "Maximum allowed rotation speed for any Kinetic Tile.")
.translation(basePath + name).defineInRange(name, 16384, 64, Integer.MAX_VALUE); .translation(basePath + name).defineInRange(name, 16384, 64, Integer.MAX_VALUE);
builder.pop(); builder.pop();
@ -174,7 +240,7 @@ public class CreateConfig {
private void initCuriosities(Builder builder) { private void initCuriosities(Builder builder) {
builder.comment("The Curiosities Module").push("curiosities"); builder.comment("The Curiosities Module").push("curiosities");
String basePath = "create.config.curiosities"; String basePath = "create.config.curiosities.";
String name = ""; String name = "";
name = "maxSymmetryWandRange"; name = "maxSymmetryWandRange";
@ -187,7 +253,7 @@ public class CreateConfig {
public void initSchematics(final ForgeConfigSpec.Builder builder) { public void initSchematics(final ForgeConfigSpec.Builder builder) {
builder.comment("The Schematics Module").push("schematics"); builder.comment("The Schematics Module").push("schematics");
String basePath = "create.config.schematics"; String basePath = "create.config.schematics.";
String name = ""; String name = "";
name = "maxSchematics"; name = "maxSchematics";
@ -219,23 +285,21 @@ public class CreateConfig {
basePath = "create.config.schematics.schematicannon"; basePath = "create.config.schematics.schematicannon";
name = "schematicannonDelay"; name = "schematicannonDelay";
schematicannonDelay = builder.comment("", schematicannonDelay = builder
"Amount of game ticks between shots of the cannon. Higher => Slower") .comment("", "Amount of game ticks between shots of the cannon. Higher => Slower")
.translation(basePath + name).defineInRange(name, 10, 1, Integer.MAX_VALUE); .translation(basePath + name).defineInRange(name, 10, 1, Integer.MAX_VALUE);
name = "schematicannonSkips"; name = "schematicannonSkips";
schematicannonSkips = builder.comment("", schematicannonSkips = builder
"Amount of block positions per tick scanned by a running cannon. Higher => Faster") .comment("", "Amount of block positions per tick scanned by a running cannon. Higher => Faster")
.translation(basePath + name).defineInRange(name, 10, 1, Integer.MAX_VALUE); .translation(basePath + name).defineInRange(name, 10, 1, Integer.MAX_VALUE);
name = "schematicannonGunpowderWorth"; name = "schematicannonGunpowderWorth";
schematicannonGunpowderWorth = builder.comment("", schematicannonGunpowderWorth = builder.comment("", "% of Schematicannon's Fuel filled by 1 Gunpowder.")
"% of Schematicannon's Fuel filled by 1 Gunpowder.")
.translation(basePath + name).defineInRange(name, 20D, 0D, 100D); .translation(basePath + name).defineInRange(name, 20D, 0D, 100D);
name = "schematicannonFuelUsage"; name = "schematicannonFuelUsage";
schematicannonFuelUsage = builder.comment("", schematicannonFuelUsage = builder.comment("", "% of Schematicannon's Fuel used for each fired block.")
"% of Schematicannon's Fuel used for each fired block.")
.translation(basePath + name).defineInRange(name, 0.05D, 0D, 100D); .translation(basePath + name).defineInRange(name, 0.05D, 0D, 100D);
builder.pop(); builder.pop();
} }

View file

@ -1,7 +1,11 @@
package com.simibubi.create; 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.ItemGroup;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
public final class CreateItemGroup extends ItemGroup { public final class CreateItemGroup extends ItemGroup {
@ -13,4 +17,29 @@ public final class CreateItemGroup extends ItemGroup {
public ItemStack createIcon() { public ItemStack createIcon() {
return new ItemStack(AllItems.SYMMETRY_WAND.get()); return new ItemStack(AllItems.SYMMETRY_WAND.get());
} }
@Override
public void fill(NonNullList<ItemStack> 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);
}
}
} }

View file

@ -27,7 +27,6 @@ public class Events {
@SubscribeEvent @SubscribeEvent
public static void onLoadWorld(WorldEvent.Load event) { public static void onLoadWorld(WorldEvent.Load event) {
IWorld world = event.getWorld(); IWorld world = event.getWorld();
Create.itemProcessingHandler.onLoadWorld(world);
Create.frequencyHandler.onLoadWorld(world); Create.frequencyHandler.onLoadWorld(world);
Create.constructHandler.onLoadWorld(world); Create.constructHandler.onLoadWorld(world);
} }
@ -35,7 +34,6 @@ public class Events {
@SubscribeEvent @SubscribeEvent
public static void onUnloadWorld(WorldEvent.Unload event) { public static void onUnloadWorld(WorldEvent.Unload event) {
IWorld world = event.getWorld(); IWorld world = event.getWorld();
Create.itemProcessingHandler.onUnloadWorld(world);
Create.frequencyHandler.onUnloadWorld(world); Create.frequencyHandler.onUnloadWorld(world);
Create.constructHandler.onUnloadWorld(world); Create.constructHandler.onUnloadWorld(world);
} }

View file

@ -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();
}

View file

@ -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<ModuleLoadedCondition> {
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;
}
}
}

View file

@ -6,6 +6,7 @@ import java.util.LinkedList;
import java.util.List; import java.util.List;
import com.simibubi.create.AllBlocks; 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.IRotate;
import com.simibubi.create.modules.contraptions.base.KineticTileEntity; import com.simibubi.create.modules.contraptions.base.KineticTileEntity;
import com.simibubi.create.modules.contraptions.relays.EncasedBeltBlock; import com.simibubi.create.modules.contraptions.relays.EncasedBeltBlock;
@ -133,9 +134,9 @@ public class RotationPropagator {
* @param pos * @param pos
*/ */
public static void handleAdded(World worldIn, BlockPos pos, KineticTileEntity addedTE) { public static void handleAdded(World worldIn, BlockPos pos, KineticTileEntity addedTE) {
if (worldIn.isRemote) if (worldIn.isRemote || isFrozen())
return; return;
if (!worldIn.isAreaLoaded(pos, 1)) if (!worldIn.isBlockPresent(pos))
return; return;
if (addedTE.getSpeed() != 0) { if (addedTE.getSpeed() != 0) {
@ -205,7 +206,7 @@ public class RotationPropagator {
* @param removedTE * @param removedTE
*/ */
public static void handleRemoved(World worldIn, BlockPos pos, KineticTileEntity removedTE) { public static void handleRemoved(World worldIn, BlockPos pos, KineticTileEntity removedTE) {
if (worldIn.isRemote) if (worldIn.isRemote || isFrozen())
return; return;
if (removedTE == null) if (removedTE == null)
return; return;
@ -324,4 +325,8 @@ public class RotationPropagator {
return neighbours; return neighbours;
} }
public static boolean isFrozen() {
return CreateConfig.parameters.freezeRotationPropagator.get();
}
} }

View file

@ -51,7 +51,7 @@ public class CrushingWheelControllerBlock extends Block implements IWithoutBlock
} }
public void onEntityCollision(BlockState state, World worldIn, BlockPos pos, Entity entityIn) { public void onEntityCollision(BlockState state, World worldIn, BlockPos pos, Entity entityIn) {
if (!state.get(VALID)) if (!state.get(VALID) || CrushingWheelControllerTileEntity.isFrozen())
return; return;
CrushingWheelControllerTileEntity te = (CrushingWheelControllerTileEntity) worldIn.getTileEntity(pos); CrushingWheelControllerTileEntity te = (CrushingWheelControllerTileEntity) worldIn.getTileEntity(pos);
if (te == null) if (te == null)
@ -63,6 +63,8 @@ public class CrushingWheelControllerBlock extends Block implements IWithoutBlock
@Override @Override
public void onLanded(IBlockReader worldIn, Entity entityIn) { public void onLanded(IBlockReader worldIn, Entity entityIn) {
super.onLanded(worldIn, entityIn); super.onLanded(worldIn, entityIn);
if (CrushingWheelControllerTileEntity.isFrozen())
return;
CrushingWheelControllerTileEntity te = (CrushingWheelControllerTileEntity) worldIn CrushingWheelControllerTileEntity te = (CrushingWheelControllerTileEntity) worldIn
.getTileEntity(entityIn.getPosition().down()); .getTileEntity(entityIn.getPosition().down());
if (te == null) if (te == null)
@ -93,7 +95,7 @@ public class CrushingWheelControllerBlock extends Block implements IWithoutBlock
} }
public void updateSpeed(BlockState state, World world, BlockPos pos) { public void updateSpeed(BlockState state, World world, BlockPos pos) {
if (!state.get(VALID)) if (!state.get(VALID) || CrushingWheelControllerTileEntity.isFrozen())
return; return;
CrushingWheelControllerTileEntity te = (CrushingWheelControllerTileEntity) world.getTileEntity(pos); CrushingWheelControllerTileEntity te = (CrushingWheelControllerTileEntity) world.getTileEntity(pos);
if (te == null) if (te == null)

View file

@ -92,7 +92,7 @@ public class CrushingWheelControllerTileEntity extends SyncedTileEntity implemen
@Override @Override
public void tick() { public void tick() {
if (!isOccupied()) if (!isOccupied() || isFrozen())
return; return;
float speed = crushingspeed / 2.5f; float speed = crushingspeed / 2.5f;
@ -204,7 +204,7 @@ public class CrushingWheelControllerTileEntity extends SyncedTileEntity implemen
@Override @Override
public CompoundNBT write(CompoundNBT compound) { public CompoundNBT write(CompoundNBT compound) {
if (hasEntity()) if (hasEntity() && !isFrozen())
compound.put("Entity", NBTUtil.writeUniqueId(entityUUID)); compound.put("Entity", NBTUtil.writeUniqueId(entityUUID));
contents.write(compound); contents.write(compound);
compound.putFloat("Speed", crushingspeed); compound.putFloat("Speed", crushingspeed);
@ -216,7 +216,7 @@ public class CrushingWheelControllerTileEntity extends SyncedTileEntity implemen
public void read(CompoundNBT compound) { public void read(CompoundNBT compound) {
super.read(compound); super.read(compound);
if (compound.contains("Entity")) { if (compound.contains("Entity") && !isFrozen()) {
entityUUID = NBTUtil.readUniqueId(compound.getCompound("Entity")); entityUUID = NBTUtil.readUniqueId(compound.getCompound("Entity"));
List<Entity> search = world.getEntitiesInAABBexcluding(null, new AxisAlignedBB(getPos()), List<Entity> search = world.getEntitiesInAABBexcluding(null, new AxisAlignedBB(getPos()),
@ -259,4 +259,8 @@ public class CrushingWheelControllerTileEntity extends SyncedTileEntity implemen
return processingEntity != null; return processingEntity != null;
} }
public static boolean isFrozen() {
return CreateConfig.parameters.freezeCrushing.get();
}
} }

View file

@ -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<Block, List<FanEffect>> effects = new HashMap<>();
public EncasedFanParticleHandler() {
initEffects();
}
private void initEffects() {
List<FanEffect> 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<FanEffect> 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<FanEffect> 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<FanEffect> 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;
}
}
}

View file

@ -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.NEGATIVE;
import static net.minecraft.util.Direction.AxisDirection.POSITIVE; 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.List;
import java.util.Map;
import java.util.Random;
import java.util.UUID;
import com.simibubi.create.AllBlocks; import com.simibubi.create.AllBlocks;
import com.simibubi.create.AllTileEntities; 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.foundation.utility.VecHelper;
import com.simibubi.create.modules.contraptions.base.KineticTileEntity; import com.simibubi.create.modules.contraptions.base.KineticTileEntity;
import com.simibubi.create.modules.logistics.InWorldProcessing; 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.Entity;
import net.minecraft.entity.item.ItemEntity; import net.minecraft.entity.item.ItemEntity;
import net.minecraft.nbt.CompoundNBT; 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.ParticleTypes;
import net.minecraft.particles.RedstoneParticleData;
import net.minecraft.tileentity.ITickableTileEntity; import net.minecraft.tileentity.ITickableTileEntity;
import net.minecraft.util.DamageSource; import net.minecraft.util.DamageSource;
import net.minecraft.util.Direction; 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.AxisAlignedBB;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
@ -45,11 +35,11 @@ import net.minecraft.util.math.Vec3i;
public class EncasedFanTileEntity extends KineticTileEntity implements ITickableTileEntity { public class EncasedFanTileEntity extends KineticTileEntity implements ITickableTileEntity {
public static final Map<Block, List<FanEffect>> effects = new HashMap<>();
private static DamageSource damageSourceFire = new DamageSource("create.fan_fire").setDifficultyScaled() private static DamageSource damageSourceFire = new DamageSource("create.fan_fire").setDifficultyScaled()
.setFireDamage(); .setFireDamage();
private static DamageSource damageSourceLava = new DamageSource("create.fan_lava").setDifficultyScaled() private static DamageSource damageSourceLava = new DamageSource("create.fan_lava").setDifficultyScaled()
.setFireDamage(); .setFireDamage();
private static EncasedFanParticleHandler particleHandler;
protected float pushDistance; protected float pushDistance;
protected float pullDistance; protected float pullDistance;
@ -57,89 +47,8 @@ public class EncasedFanTileEntity extends KineticTileEntity implements ITickable
protected AxisAlignedBB backBB; protected AxisAlignedBB backBB;
protected int blockCheckCooldown; protected int blockCheckCooldown;
protected BlockState frontBlock;
protected boolean findLoadedItems;
protected boolean findFrontBlock; protected boolean findFrontBlock;
public List<ProcessedItem> items; protected BlockState frontBlock;
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;
}
}
public EncasedFanTileEntity() { public EncasedFanTileEntity() {
super(AllTileEntities.ENCASED_FAN.type); super(AllTileEntities.ENCASED_FAN.type);
@ -147,36 +56,7 @@ public class EncasedFanTileEntity extends KineticTileEntity implements ITickable
findFrontBlock = true; findFrontBlock = true;
frontBB = new AxisAlignedBB(0, 0, 0, 0, 0, 0); frontBB = new AxisAlignedBB(0, 0, 0, 0, 0, 0);
backBB = new AxisAlignedBB(0, 0, 0, 0, 0, 0); backBB = new AxisAlignedBB(0, 0, 0, 0, 0, 0);
items = new ArrayList<>(); particleHandler = CreateClient.fanParticles;
// if (effects.isEmpty())
initEffects();
}
private static void initEffects() {
effects.clear();
List<FanEffect> 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<FanEffect> 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<FanEffect> 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<FanEffect> 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);
} }
@Override @Override
@ -195,32 +75,14 @@ public class EncasedFanTileEntity extends KineticTileEntity implements ITickable
@Override @Override
public void read(CompoundNBT compound) { public void read(CompoundNBT compound) {
super.read(compound); super.read(compound);
pushDistance = compound.getFloat("PushDistance"); pushDistance = compound.getFloat("PushDistance");
pullDistance = compound.getFloat("PullDistance"); 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 @Override
public CompoundNBT write(CompoundNBT compound) { public CompoundNBT write(CompoundNBT compound) {
compound.putFloat("PushDistance", pushDistance); compound.putFloat("PushDistance", pushDistance);
compound.putFloat("PullDistance", pullDistance); 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); return super.write(compound);
} }
@ -307,16 +169,7 @@ public class EncasedFanTileEntity extends KineticTileEntity implements ITickable
List<Entity> frontEntities = world.getEntitiesWithinAABBExcludingEntity(null, frontBB); List<Entity> frontEntities = world.getEntitiesWithinAABBExcludingEntity(null, frontBB);
for (Entity entity : frontEntities) { for (Entity entity : frontEntities) {
moveEntity(entity, true); moveEntity(entity, true);
if (!(entity instanceof ItemEntity)) { processEntity(entity);
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);
}
}
} }
for (Entity entity : world.getEntitiesWithinAABBExcludingEntity(null, backBB)) { for (Entity entity : world.getEntitiesWithinAABBExcludingEntity(null, backBB)) {
@ -333,79 +186,46 @@ public class EncasedFanTileEntity extends KineticTileEntity implements ITickable
updateReachAndForce(); updateReachAndForce();
} }
updateProcessedItems(frontEntities);
if (world.isRemote) { if (world.isRemote) {
makeParticles(); particleHandler.makeParticles(this);
return; return;
} }
discoverEntitiesAfterLoad(frontEntities);
} }
public void updateProcessedItems(List<Entity> frontEntities) { public void processEntity(Entity entity) {
ArrayList<ProcessedItem> prevItems = new ArrayList<>(items); if (InWorldProcessing.isFrozen())
Iterator<ProcessedItem> itemIter = prevItems.iterator(); return;
if (canProcess()) { if (entity instanceof ItemEntity) {
while (itemIter.hasNext()) { if (world.rand.nextInt(4) == 0) {
Iterator<Entity> entityIter = frontEntities.iterator(); Type processingType = getProcessingType();
ProcessedItem item = itemIter.next(); if (processingType == Type.BLASTING)
world.addParticle(ParticleTypes.LARGE_SMOKE, entity.posX, entity.posY + .25f, entity.posZ, 0,
while (entityIter.hasNext()) { 1 / 16f, 0);
Entity e = entityIter.next(); if (processingType == Type.SMOKING)
if (!(e instanceof ItemEntity)) { world.addParticle(ParticleTypes.CLOUD, entity.posX, entity.posY + .25f, entity.posZ, 0, 1 / 16f, 0);
entityIter.remove();
continue;
} }
if (item.entity == e && e.isAlive()) { if (world.isRemote)
item.tick(); return;
entityIter.remove();
itemIter.remove();
continue;
}
}
}
// 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));
}
}
}
for (ProcessedItem lostItem : prevItems) { if (canProcess((ItemEntity) entity))
items.remove(lostItem); InWorldProcessing.process((ItemEntity) entity, getProcessingType());
if (!world.isRemote && lostItem.entity != null)
Create.itemProcessingHandler.stopProcessing(lostItem.entity);
}
}
public void discoverEntitiesAfterLoad(List<Entity> frontEntities) { } else {
if (findLoadedItems) { if (getProcessingType() == Type.SMOKING) {
findLoadedItems = false; entity.setFire(2);
Iterator<ProcessedItem> iterator = items.iterator(); entity.attackEntityFrom(damageSourceFire, 4);
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 (getProcessingType() == Type.BLASTING) {
entity.setFire(10);
entity.attackEntityFrom(damageSourceLava, 8);
} }
if (item.entity == null) if (getProcessingType() == Type.SPLASHING) {
iterator.remove(); 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) { protected boolean canProcess(ItemEntity entity) {
return canProcess() && new InWorldProcessing(getProcessingType(), 0).canProcess(entity); return canProcess() && InWorldProcessing.canProcess(entity, getProcessingType());
} }
protected InWorldProcessing.Type getProcessingType() { protected InWorldProcessing.Type getProcessingType() {
if (frontBlock == null)
return null;
Block block = frontBlock.getBlock(); Block block = frontBlock.getBlock();
if (block == Blocks.FIRE) if (block == Blocks.FIRE)
@ -439,37 +262,20 @@ public class EncasedFanTileEntity extends KineticTileEntity implements ITickable
Vec3d center = VecHelper.getCenterOf(pos); Vec3d center = VecHelper.getCenterOf(pos);
Vec3i flow = getAirFlow().getDirectionVec(); 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))); / (entity.getPositionVec().distanceTo(center) / (push ? pushDistance : pullDistance)));
Vec3d motion = entity.getMotion(); Vec3d previousMotion = entity.getMotion();
float maxSpeedModifier = 5; float maxAcceleration = 5;
double xIn = MathHelper.clamp(flow.getX() * s - motion.x, -maxSpeedModifier, maxSpeedModifier);
double yIn = MathHelper.clamp(flow.getY() * s - motion.y, -maxSpeedModifier, maxSpeedModifier); double xIn = MathHelper.clamp(flow.getX() * acceleration - previousMotion.x, -maxAcceleration, maxAcceleration);
double zIn = MathHelper.clamp(flow.getZ() * s - motion.z, -maxSpeedModifier, maxSpeedModifier); double yIn = MathHelper.clamp(flow.getY() * acceleration - previousMotion.y, -maxAcceleration, maxAcceleration);
entity.setMotion(motion.add(new Vec3d(xIn, yIn, zIn).mul(flow.getX(), flow.getY(), flow.getZ()).scale(1 / 8f))); 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; 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);
}
} }

View file

@ -1,7 +1,10 @@
package com.simibubi.create.modules.contraptions.receivers.constructs; package com.simibubi.create.modules.contraptions.receivers.constructs;
import static com.simibubi.create.CreateConfig.parameters;
import com.simibubi.create.AllPackets; import com.simibubi.create.AllPackets;
import com.simibubi.create.AllTileEntities; import com.simibubi.create.AllTileEntities;
import com.simibubi.create.CreateConfig;
import com.simibubi.create.foundation.block.SyncedTileEntity; import com.simibubi.create.foundation.block.SyncedTileEntity;
import net.minecraft.nbt.CompoundNBT; import net.minecraft.nbt.CompoundNBT;
@ -10,15 +13,13 @@ import net.minecraft.util.math.MathHelper;
public class ChassisTileEntity extends SyncedTileEntity implements ITickableTileEntity { public class ChassisTileEntity extends SyncedTileEntity implements ITickableTileEntity {
public static final int MAX_RANGE = 16;
private int range; private int range;
public int newRange; public int newRange;
public int lastModified; public int lastModified;
public ChassisTileEntity() { public ChassisTileEntity() {
super(AllTileEntities.CHASSIS.type); super(AllTileEntities.CHASSIS.type);
newRange = range = MAX_RANGE / 2; newRange = range = CreateConfig.parameters.maxChassisRange.get() / 2;
} }
@Override @Override
@ -45,7 +46,7 @@ public class ChassisTileEntity extends SyncedTileEntity implements ITickableTile
} }
public void setRangeLazily(int range) { 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) if (newRange == this.range)
return; return;
this.lastModified = 0; this.lastModified = 0;

View file

@ -35,7 +35,7 @@ public class MechanicalBearingTileEntity extends KineticTileEntity implements IT
public CompoundNBT write(CompoundNBT tag) { public CompoundNBT write(CompoundNBT tag) {
tag.putBoolean("Running", running); tag.putBoolean("Running", running);
tag.putFloat("Angle", angle); tag.putFloat("Angle", angle);
if (running) if (running && !RotationConstruct.isFrozen())
tag.put("Construct", movingConstruct.writeNBT()); tag.put("Construct", movingConstruct.writeNBT());
return super.write(tag); return super.write(tag);
@ -45,13 +45,15 @@ public class MechanicalBearingTileEntity extends KineticTileEntity implements IT
public void read(CompoundNBT tag) { public void read(CompoundNBT tag) {
running = tag.getBoolean("Running"); running = tag.getBoolean("Running");
angle = tag.getFloat("Angle"); angle = tag.getFloat("Angle");
if (running) if (running && !RotationConstruct.isFrozen())
movingConstruct = RotationConstruct.fromNBT(tag.getCompound("Construct")); movingConstruct = RotationConstruct.fromNBT(tag.getCompound("Construct"));
super.read(tag); super.read(tag);
} }
public float getInterpolatedAngle(float partialTicks) { public float getInterpolatedAngle(float partialTicks) {
if (RotationConstruct.isFrozen())
return 0;
return MathHelper.lerp(partialTicks, angle, angle + getAngularSpeed()); return MathHelper.lerp(partialTicks, angle, angle + getAngularSpeed());
} }
@ -111,6 +113,9 @@ public class MechanicalBearingTileEntity extends KineticTileEntity implements IT
@Override @Override
public void tick() { public void tick() {
if (running && RotationConstruct.isFrozen())
disassembleConstruct();
if (!world.isRemote && assembleNextTick) { if (!world.isRemote && assembleNextTick) {
assembleNextTick = false; assembleNextTick = false;
if (running) { if (running) {

View file

@ -52,7 +52,7 @@ public class MechanicalPistonTileEntity extends KineticTileEntity implements ITi
public CompoundNBT write(CompoundNBT tag) { public CompoundNBT write(CompoundNBT tag) {
tag.putBoolean("Running", running); tag.putBoolean("Running", running);
tag.putFloat("Offset", offset); tag.putFloat("Offset", offset);
if (running) if (running && !TranslationConstruct.isFrozen())
tag.put("Construct", movingConstruct.writeNBT()); tag.put("Construct", movingConstruct.writeNBT());
return super.write(tag); return super.write(tag);
@ -62,13 +62,16 @@ public class MechanicalPistonTileEntity extends KineticTileEntity implements ITi
public void read(CompoundNBT tag) { public void read(CompoundNBT tag) {
running = tag.getBoolean("Running"); running = tag.getBoolean("Running");
offset = tag.getFloat("Offset"); offset = tag.getFloat("Offset");
if (running) if (running && !TranslationConstruct.isFrozen())
movingConstruct = TranslationConstruct.fromNBT(tag.getCompound("Construct")); movingConstruct = TranslationConstruct.fromNBT(tag.getCompound("Construct"));
super.read(tag); super.read(tag);
} }
protected void onBlockVisited(float newOffset) { protected void onBlockVisited(float newOffset) {
if (TranslationConstruct.isFrozen())
return;
Direction direction = getBlockState().get(BlockStateProperties.FACING); Direction direction = getBlockState().get(BlockStateProperties.FACING);
for (BlockInfo block : movingConstruct.actors) { for (BlockInfo block : movingConstruct.actors) {
@ -205,6 +208,9 @@ public class MechanicalPistonTileEntity extends KineticTileEntity implements ITi
} }
private boolean hasBlockCollisions(float newOffset) { private boolean hasBlockCollisions(float newOffset) {
if (TranslationConstruct.isFrozen())
return true;
Direction movementDirection = getBlockState().get(BlockStateProperties.FACING); Direction movementDirection = getBlockState().get(BlockStateProperties.FACING);
BlockPos relativePos = BlockPos.ZERO.offset(movementDirection, getModulatedOffset(newOffset)); BlockPos relativePos = BlockPos.ZERO.offset(movementDirection, getModulatedOffset(newOffset));

View file

@ -46,6 +46,9 @@ public class MovingConstructHandler {
public static void moveEntities(MechanicalPistonTileEntity te, float movementSpeed, Direction movementDirection, public static void moveEntities(MechanicalPistonTileEntity te, float movementSpeed, Direction movementDirection,
float newOffset) { float newOffset) {
if (TranslationConstruct.isFrozen())
return;
World world = te.getWorld(); World world = te.getWorld();
Vec3d movementVec = new Vec3d(te.getBlockState().get(BlockStateProperties.FACING).getDirectionVec()); Vec3d movementVec = new Vec3d(te.getBlockState().get(BlockStateProperties.FACING).getDirectionVec());
TranslationConstruct construct = te.movingConstruct; TranslationConstruct construct = te.movingConstruct;
@ -132,8 +135,6 @@ public class MovingConstructHandler {
} }
} }
if (entity instanceof PlayerEntity && !world.isRemote)
return;
if (!allowedMovement.equals(movement)) { if (!allowedMovement.equals(movement)) {
if (allowedMovement.y != movement.y) { if (allowedMovement.y != movement.y) {
@ -141,6 +142,8 @@ public class MovingConstructHandler {
entity.fallDistance = 0; entity.fallDistance = 0;
entity.onGround = true; entity.onGround = true;
} }
if (entity instanceof PlayerEntity && !world.isRemote)
return;
entity.setMotion(allowedMovement.subtract(movement.subtract(motion))); entity.setMotion(allowedMovement.subtract(movement.subtract(motion)));
entity.velocityChanged = true; entity.velocityChanged = true;
} }

View file

@ -41,6 +41,8 @@ public class RotationConstruct {
} }
protected boolean collectAttached(World world, BlockPos pos, Direction direction) { protected boolean collectAttached(World world, BlockPos pos, Direction direction) {
if (isFrozen())
return false;
// Find chassis // Find chassis
List<BlockInfo> chassis = collectChassis(world, pos, direction); List<BlockInfo> chassis = collectChassis(world, pos, direction);
@ -188,4 +190,8 @@ public class RotationConstruct {
|| AllBlocks.ROTATION_CHASSIS.typeOf(world.getBlockState(pos)); || AllBlocks.ROTATION_CHASSIS.typeOf(world.getBlockState(pos));
} }
public static boolean isFrozen() {
return CreateConfig.parameters.freezeRotationConstructs.get();
}
} }

View file

@ -16,6 +16,7 @@ import java.util.Set;
import java.util.function.Function; import java.util.function.Function;
import com.simibubi.create.AllBlocks; import com.simibubi.create.AllBlocks;
import com.simibubi.create.CreateConfig;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.FallingBlock; import net.minecraft.block.FallingBlock;
@ -77,6 +78,9 @@ public class TranslationConstruct {
} }
public static TranslationConstruct getAttachedForPushing(World world, BlockPos pos, Direction direction) { public static TranslationConstruct getAttachedForPushing(World world, BlockPos pos, Direction direction) {
if (isFrozen())
return null;
TranslationConstruct construct = new TranslationConstruct(); TranslationConstruct construct = new TranslationConstruct();
if (!construct.collectExtensions(world, pos, direction)) if (!construct.collectExtensions(world, pos, direction))
@ -89,6 +93,9 @@ public class TranslationConstruct {
} }
public static TranslationConstruct getAttachedForPulling(World world, BlockPos pos, Direction direction) { public static TranslationConstruct getAttachedForPulling(World world, BlockPos pos, Direction direction) {
if (isFrozen())
return null;
TranslationConstruct construct = new TranslationConstruct(); TranslationConstruct construct = new TranslationConstruct();
if (!construct.collectExtensions(world, pos, direction)) if (!construct.collectExtensions(world, pos, direction))
@ -444,4 +451,8 @@ public class TranslationConstruct {
return construct; return construct;
} }
public static boolean isFrozen() {
return CreateConfig.parameters.freezePistonConstructs.get();
}
} }

View file

@ -1,7 +1,5 @@
package com.simibubi.create.modules.economy; package com.simibubi.create.modules.economy;
import com.simibubi.create.AllContainers;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.PlayerInventory; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.Container; import net.minecraft.inventory.container.Container;
@ -10,11 +8,13 @@ import net.minecraft.network.PacketBuffer;
public class ShopShelfContainer extends Container { public class ShopShelfContainer extends Container {
public ShopShelfContainer(int id, PlayerInventory inv, ShopShelfTileEntity te) { 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) { public ShopShelfContainer(int id, PlayerInventory inv, PacketBuffer extraData) {
super(AllContainers.SHOP_SHELF.type, id); // super(AllContainers.SHOP_SHELF.type, id);
super(null, id);
} }
@Override @Override

View file

@ -2,7 +2,6 @@ package com.simibubi.create.modules.economy;
import java.util.UUID; import java.util.UUID;
import com.simibubi.create.AllTileEntities;
import com.simibubi.create.foundation.block.SyncedTileEntity; import com.simibubi.create.foundation.block.SyncedTileEntity;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
@ -20,7 +19,8 @@ public class ShopShelfTileEntity extends SyncedTileEntity implements INamedConta
private UUID owner; private UUID owner;
public ShopShelfTileEntity() { public ShopShelfTileEntity() {
super(AllTileEntities.SHOP_SHELF.type); super(null);
// super(AllTileEntities.SHOP_SHELF.type);
} }
@Override @Override

View file

@ -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<IWorld, Map<ItemEntity, InWorldProcessing>> 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<ItemEntity, InWorldProcessing> 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<ItemEntity, InWorldProcessing> 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<ItemEntity, InWorldProcessing> itemsInWorld = items.get(entity.world);
if (!itemsInWorld.containsKey(entity))
return null;
return itemsInWorld.get(entity);
}
}

View file

@ -3,6 +3,7 @@ package com.simibubi.create.modules.logistics;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
import com.simibubi.create.CreateConfig;
import com.simibubi.create.foundation.utility.ItemHelper; import com.simibubi.create.foundation.utility.ItemHelper;
import net.minecraft.entity.item.ItemEntity; 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.IRecipe;
import net.minecraft.item.crafting.IRecipeType; import net.minecraft.item.crafting.IRecipeType;
import net.minecraft.item.crafting.SmokingRecipe; import net.minecraft.item.crafting.SmokingRecipe;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.tileentity.BlastFurnaceTileEntity; import net.minecraft.tileentity.BlastFurnaceTileEntity;
import net.minecraft.tileentity.FurnaceTileEntity; import net.minecraft.tileentity.FurnaceTileEntity;
import net.minecraft.tileentity.SmokerTileEntity; import net.minecraft.tileentity.SmokerTileEntity;
@ -24,19 +26,13 @@ public class InWorldProcessing {
SMOKING, BLASTING, SPLASHING SMOKING, BLASTING, SPLASHING
} }
public Type type; public static boolean canProcess(ItemEntity entity, 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) {
World world = entity.world; World world = entity.world;
if (entity.getPersistantData().contains("CreateData")
&& entity.getPersistantData().getCompound("CreateData").contains("Processing"))
return true;
if (type == Type.BLASTING) { if (type == Type.BLASTING) {
return true; return true;
} }
@ -56,13 +52,10 @@ public class InWorldProcessing {
return false; return false;
} }
public void process(ItemEntity entity) { public static void process(ItemEntity entity, Type type) {
timeRemaining--;
if (timeRemaining != 0) {
return;
}
World world = entity.world; World world = entity.world;
if (decrementProcessingTime(entity, type) != 0)
return;
if (type == Type.SPLASHING) { if (type == Type.SPLASHING) {
return; 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(); ItemStack out = recipe.getRecipeOutput().copy();
List<ItemStack> stacks = ItemHelper.multipliedOutput(entity.getItem(), out); List<ItemStack> stacks = ItemHelper.multipliedOutput(entity.getItem(), out);
if (stacks.isEmpty()) if (stacks.isEmpty())
@ -119,4 +133,8 @@ public class InWorldProcessing {
entity.world.addEntity(new ItemEntity(entity.world, entity.posX, entity.posY, entity.posZ, additional)); entity.world.addEntity(new ItemEntity(entity.world, entity.posX, entity.posY, entity.posZ, additional));
} }
public static boolean isFrozen() {
return CreateConfig.parameters.freezeInWorldProcessing.get();
}
} }

View file

@ -26,6 +26,9 @@ public interface IExtractor extends ITickableTileEntity, IInventoryManipulator {
@Override @Override
default void tick() { default void tick() {
if (isFrozen())
return;
State state = getState(); State state = getState();
if (state == State.LOCKED) if (state == State.LOCKED)
@ -79,6 +82,9 @@ public interface IExtractor extends ITickableTileEntity, IInventoryManipulator {
} }
public default void neighborChanged() { public default void neighborChanged() {
if (isFrozen())
return;
boolean hasSpace = hasSpaceForExtracting(); boolean hasSpace = hasSpaceForExtracting();
boolean hasInventory = getInventory().isPresent(); boolean hasInventory = getInventory().isPresent();
ItemStack toExtract = ItemStack.EMPTY; ItemStack toExtract = ItemStack.EMPTY;
@ -142,4 +148,8 @@ public interface IExtractor extends ITickableTileEntity, IInventoryManipulator {
return extracting; return extracting;
} }
public static boolean isFrozen() {
return CreateConfig.parameters.freezeExtractors.get();
}
} }

View file

@ -50,7 +50,6 @@ public class ServerSchematicLoader {
public ServerSchematicLoader() { public ServerSchematicLoader() {
activeUploads = new HashMap<>(); activeUploads = new HashMap<>();
FilesHelper.createFolderIfMissing(getSchematicPath());
} }
public String getSchematicPath() { public String getSchematicPath() {

View file

@ -12,5 +12,11 @@
"result": { "result": {
"item": "create:belt_connector", "item": "create:belt_connector",
"count": 1 "count": 1
},
"conditions": [
{
"type": "create:module",
"module": "contraptions"
} }
]
} }

View file

@ -19,5 +19,11 @@
"result": { "result": {
"item": "create:belt_funnel", "item": "create:belt_funnel",
"count": 1 "count": 1
},
"conditions": [
{
"type": "create:module",
"module": "logistics"
} }
]
} }

View file

@ -11,5 +11,11 @@
"result": { "result": {
"item": "create:blueprint_and_quill", "item": "create:blueprint_and_quill",
"count": 1 "count": 1
},
"conditions": [
{
"type": "create:module",
"module": "schematics"
} }
]
} }

View file

@ -22,5 +22,11 @@
"result": { "result": {
"item": "create:clutch", "item": "create:clutch",
"count": 1 "count": 1
},
"conditions": [
{
"type": "create:module",
"module": "contraptions"
} }
]
} }

View file

@ -11,5 +11,11 @@
"result": { "result": {
"item": "create:cocoa_log", "item": "create:cocoa_log",
"count": 1 "count": 1
},
"conditions": [
{
"type": "create:module",
"module": "gardens"
} }
]
} }

View file

@ -16,5 +16,11 @@
"result": { "result": {
"item": "create:cogwheel", "item": "create:cogwheel",
"count": 1 "count": 1
},
"conditions": [
{
"type": "create:module",
"module": "contraptions"
} }
]
} }

View file

@ -22,5 +22,11 @@
"result": { "result": {
"item": "create:contact", "item": "create:contact",
"count": 2 "count": 2
},
"conditions": [
{
"type": "create:module",
"module": "logistics"
} }
]
} }

View file

@ -19,5 +19,11 @@
"result": { "result": {
"item": "create:crushing_wheel", "item": "create:crushing_wheel",
"count": 1 "count": 1
},
"conditions": [
{
"type": "create:module",
"module": "contraptions"
} }
]
} }

View file

@ -22,5 +22,11 @@
"result": { "result": {
"item": "create:drill", "item": "create:drill",
"count": 1 "count": 1
},
"conditions": [
{
"type": "create:module",
"module": "contraptions"
} }
]
} }

View file

@ -11,5 +11,11 @@
"result": { "result": {
"item": "create:empty_blueprint", "item": "create:empty_blueprint",
"count": 1 "count": 1
},
"conditions": [
{
"type": "create:module",
"module": "schematics"
} }
]
} }

View file

@ -19,5 +19,11 @@
"result": { "result": {
"item": "create:encased_belt", "item": "create:encased_belt",
"count": 2 "count": 2
},
"conditions": [
{
"type": "create:module",
"module": "contraptions"
} }
]
} }

View file

@ -22,5 +22,11 @@
"result": { "result": {
"item": "create:encased_fan", "item": "create:encased_fan",
"count": 1 "count": 1
},
"conditions": [
{
"type": "create:module",
"module": "contraptions"
} }
]
} }

View file

@ -19,5 +19,11 @@
"result": { "result": {
"item": "create:encased_shaft", "item": "create:encased_shaft",
"count": 2 "count": 2
},
"conditions": [
{
"type": "create:module",
"module": "contraptions"
} }
]
} }

View file

@ -19,5 +19,11 @@
"result": { "result": {
"item": "create:entity_detector", "item": "create:entity_detector",
"count": 1 "count": 1
},
"conditions": [
{
"type": "create:module",
"module": "logistics"
} }
]
} }

View file

@ -25,5 +25,11 @@
"result": { "result": {
"item": "create:extractor", "item": "create:extractor",
"count": 1 "count": 1
},
"conditions": [
{
"type": "create:module",
"module": "logistics"
} }
]
} }

View file

@ -19,5 +19,11 @@
"result": { "result": {
"item": "create:flexcrate", "item": "create:flexcrate",
"count": 1 "count": 1
},
"conditions": [
{
"type": "create:module",
"module": "logistics"
} }
]
} }

View file

@ -19,5 +19,11 @@
"result": { "result": {
"item": "create:gearbox", "item": "create:gearbox",
"count": 2 "count": 2
},
"conditions": [
{
"type": "create:module",
"module": "contraptions"
} }
]
} }

View file

@ -22,5 +22,11 @@
"result": { "result": {
"item": "create:gearshift", "item": "create:gearshift",
"count": 1 "count": 1
},
"conditions": [
{
"type": "create:module",
"module": "contraptions"
} }
]
} }

View file

@ -19,5 +19,11 @@
"result": { "result": {
"item": "create:harvester", "item": "create:harvester",
"count": 1 "count": 1
},
"conditions": [
{
"type": "create:module",
"module": "contraptions"
} }
]
} }

View file

@ -19,5 +19,11 @@
"result": { "result": {
"item": "create:large_cogwheel", "item": "create:large_cogwheel",
"count": 1 "count": 1
},
"conditions": [
{
"type": "create:module",
"module": "contraptions"
} }
]
} }

View file

@ -11,5 +11,11 @@
"result": { "result": {
"item": "create:linked_extractor", "item": "create:linked_extractor",
"count": 1 "count": 1
},
"conditions": [
{
"type": "create:module",
"module": "logistics"
} }
]
} }

View file

@ -22,5 +22,11 @@
"result": { "result": {
"item": "create:mechanical_bearing", "item": "create:mechanical_bearing",
"count": 1 "count": 1
},
"conditions": [
{
"type": "create:module",
"module": "contraptions"
} }
]
} }

View file

@ -22,5 +22,11 @@
"result": { "result": {
"item": "create:mechanical_piston", "item": "create:mechanical_piston",
"count": 1 "count": 1
},
"conditions": [
{
"type": "create:module",
"module": "contraptions"
} }
]
} }

View file

@ -25,5 +25,11 @@
"result": { "result": {
"item": "create:motor", "item": "create:motor",
"count": 1 "count": 1
},
"conditions": [
{
"type": "create:module",
"module": "contraptions"
} }
]
} }

View file

@ -5,5 +5,11 @@
}, },
"result": "create:dolomite", "result": "create:dolomite",
"experience": 0.1, "experience": 0.1,
"cookingtime": 200 "cookingtime": 200,
"conditions": [
{
"type": "create:module",
"module": "palettes"
}
]
} }

View file

@ -12,5 +12,11 @@
"result": { "result": {
"item": "create:dolomite_bricks", "item": "create:dolomite_bricks",
"count": 4 "count": 4
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -11,5 +11,11 @@
"result": { "result": {
"item": "create:dolomite_slab", "item": "create:dolomite_slab",
"count": 6 "count": 6
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -13,5 +13,11 @@
"result": { "result": {
"item": "create:dolomite_stairs", "item": "create:dolomite_stairs",
"count": 8 "count": 8
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -12,5 +12,11 @@
"result": { "result": {
"item": "create:dolomite_wall", "item": "create:dolomite_wall",
"count": 12 "count": 12
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -5,5 +5,11 @@
}, },
"result": "create:gabbro", "result": "create:gabbro",
"experience": 0.1, "experience": 0.1,
"cookingtime": 200 "cookingtime": 200,
"conditions": [
{
"type": "create:module",
"module": "palettes"
}
]
} }

View file

@ -12,5 +12,11 @@
"result": { "result": {
"item": "create:gabbro_bricks", "item": "create:gabbro_bricks",
"count": 4 "count": 4
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -13,5 +13,11 @@
"result": { "result": {
"item": "create:gabbro_bricks_stairs", "item": "create:gabbro_bricks_stairs",
"count": 8 "count": 8
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -12,5 +12,11 @@
"result": { "result": {
"item": "create:gabbro_bricks_wall", "item": "create:gabbro_bricks_wall",
"count": 12 "count": 12
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -11,5 +11,11 @@
"result": { "result": {
"item": "create:gabbro_slab", "item": "create:gabbro_slab",
"count": 6 "count": 6
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -13,5 +13,11 @@
"result": { "result": {
"item": "create:gabbro_stairs", "item": "create:gabbro_stairs",
"count": 8 "count": 8
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -12,5 +12,11 @@
"result": { "result": {
"item": "create:gabbro_wall", "item": "create:gabbro_wall",
"count": 12 "count": 12
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -11,5 +11,11 @@
"result": { "result": {
"item": "create:indented_gabbro_slab", "item": "create:indented_gabbro_slab",
"count": 6 "count": 6
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -5,5 +5,11 @@
}, },
"result": "create:limestone", "result": "create:limestone",
"experience": 0.1, "experience": 0.1,
"cookingtime": 200 "cookingtime": 200,
"conditions": [
{
"type": "create:module",
"module": "palettes"
}
]
} }

View file

@ -12,5 +12,11 @@
"result": { "result": {
"item": "create:limestone_bricks", "item": "create:limestone_bricks",
"count": 4 "count": 4
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -11,5 +11,11 @@
"result": { "result": {
"item": "create:limestone_bricks_slab", "item": "create:limestone_bricks_slab",
"count": 6 "count": 6
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -13,5 +13,11 @@
"result": { "result": {
"item": "create:limestone_bricks_stairs", "item": "create:limestone_bricks_stairs",
"count": 8 "count": 8
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -12,5 +12,11 @@
"result": { "result": {
"item": "create:limestone_bricks_wall", "item": "create:limestone_bricks_wall",
"count": 12 "count": 12
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -11,5 +11,11 @@
"result": { "result": {
"item": "create:limestone_slab", "item": "create:limestone_slab",
"count": 6 "count": 6
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -13,5 +13,11 @@
"result": { "result": {
"item": "create:limestone_stairs", "item": "create:limestone_stairs",
"count": 8 "count": 8
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -12,5 +12,11 @@
"result": { "result": {
"item": "create:limestone_wall", "item": "create:limestone_wall",
"count": 12 "count": 12
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -11,5 +11,11 @@
"result": { "result": {
"item": "create:paved_gabbro_bricks_slab", "item": "create:paved_gabbro_bricks_slab",
"count": 6 "count": 6
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -12,5 +12,11 @@
"result": { "result": {
"item": "create:polished_dolomite", "item": "create:polished_dolomite",
"count": 4 "count": 4
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -12,5 +12,11 @@
"result": { "result": {
"item": "create:polished_gabbro", "item": "create:polished_gabbro",
"count": 4 "count": 4
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -12,5 +12,11 @@
"result": { "result": {
"item": "create:polished_limestone", "item": "create:polished_limestone",
"count": 4 "count": 4
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -11,5 +11,11 @@
"result": { "result": {
"item": "create:polished_limestone_slab", "item": "create:polished_limestone_slab",
"count": 6 "count": 6
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -12,5 +12,11 @@
"result": { "result": {
"item": "create:polished_weathered_limestone", "item": "create:polished_weathered_limestone",
"count": 4 "count": 4
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -11,5 +11,11 @@
"result": { "result": {
"item": "create:polished_weathered_limestone_slab", "item": "create:polished_weathered_limestone_slab",
"count": 6 "count": 6
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -16,5 +16,11 @@
"result": { "result": {
"item": "create:weathered_limestone", "item": "create:weathered_limestone",
"count": 8 "count": 8
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -12,5 +12,11 @@
"result": { "result": {
"item": "create:weathered_limestone_bricks", "item": "create:weathered_limestone_bricks",
"count": 4 "count": 4
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -11,5 +11,11 @@
"result": { "result": {
"item": "create:weathered_limestone_bricks_slab", "item": "create:weathered_limestone_bricks_slab",
"count": 6 "count": 6
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -13,5 +13,11 @@
"result": { "result": {
"item": "create:weathered_limestone_bricks_stairs", "item": "create:weathered_limestone_bricks_stairs",
"count": 8 "count": 8
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -12,5 +12,11 @@
"result": { "result": {
"item": "create:weathered_limestone_bricks_wall", "item": "create:weathered_limestone_bricks_wall",
"count": 12 "count": 12
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -11,5 +11,11 @@
"result": { "result": {
"item": "create:weathered_limestone_slab", "item": "create:weathered_limestone_slab",
"count": 6 "count": 6
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -13,5 +13,11 @@
"result": { "result": {
"item": "create:weathered_limestone_stairs", "item": "create:weathered_limestone_stairs",
"count": 8 "count": 8
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -12,5 +12,11 @@
"result": { "result": {
"item": "create:weathered_limestone_wall", "item": "create:weathered_limestone_wall",
"count": 12 "count": 12
},
"conditions": [
{
"type": "create:module",
"module": "palettes"
} }
]
} }

View file

@ -16,5 +16,11 @@
"result": { "result": {
"item": "create:piston_pole", "item": "create:piston_pole",
"count": 8 "count": 8
},
"conditions": [
{
"type": "create:module",
"module": "contraptions"
} }
]
} }

View file

@ -19,5 +19,11 @@
"result": { "result": {
"item": "create:placement_handgun", "item": "create:placement_handgun",
"count": 1 "count": 1
},
"conditions": [
{
"type": "create:module",
"module": "curiosities"
} }
]
} }

View file

@ -18,5 +18,11 @@
"result": { "result": {
"item": "create:pulse_repeater", "item": "create:pulse_repeater",
"count": 1 "count": 1
},
"conditions": [
{
"type": "create:module",
"module": "logistics"
} }
]
} }

View file

@ -18,5 +18,11 @@
"result": { "result": {
"item": "create:redstone_bridge", "item": "create:redstone_bridge",
"count": 2 "count": 2
},
"conditions": [
{
"type": "create:module",
"module": "logistics"
} }
]
} }

View file

@ -19,5 +19,11 @@
"result": { "result": {
"item": "create:rotation_chassis", "item": "create:rotation_chassis",
"count": 4 "count": 4
},
"conditions": [
{
"type": "create:module",
"module": "contraptions"
} }
]
} }

View file

@ -16,5 +16,11 @@
"result": { "result": {
"item": "create:schematic_table", "item": "create:schematic_table",
"count": 1 "count": 1
},
"conditions": [
{
"type": "create:module",
"module": "schematics"
} }
]
} }

View file

@ -25,5 +25,11 @@
"result": { "result": {
"item": "create:schematicannon", "item": "create:schematicannon",
"count": 1 "count": 1
},
"conditions": [
{
"type": "create:module",
"module": "schematics"
} }
]
} }

View file

@ -13,5 +13,11 @@
"result": { "result": {
"item": "create:shaft", "item": "create:shaft",
"count": 16 "count": 16
},
"conditions": [
{
"type": "create:module",
"module": "contraptions"
} }
]
} }

View file

@ -15,5 +15,11 @@
"result": { "result": {
"item": "create:sticky_mechanical_piston", "item": "create:sticky_mechanical_piston",
"count": 1 "count": 1
},
"conditions": [
{
"type": "create:module",
"module": "contraptions"
} }
]
} }

View file

@ -22,5 +22,11 @@
"result": { "result": {
"item": "create:stockswitch", "item": "create:stockswitch",
"count": 1 "count": 1
},
"conditions": [
{
"type": "create:module",
"module": "logistics"
} }
]
} }

View file

@ -25,5 +25,11 @@
"result": { "result": {
"item": "create:symmetry_wand", "item": "create:symmetry_wand",
"count": 1 "count": 1
},
"conditions": [
{
"type": "create:module",
"module": "curiosities"
} }
]
} }

View file

@ -19,5 +19,11 @@
"result": { "result": {
"item": "create:translation_chassis", "item": "create:translation_chassis",
"count": 4 "count": 4
},
"conditions": [
{
"type": "create:module",
"module": "contraptions"
} }
]
} }

Some files were not shown because too many files have changed in this diff Show more