From fb35aa7e10d1a9c7ff1be39d5de82594aa33328e Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Sat, 7 Sep 2019 13:12:12 +0200 Subject: [PATCH] Configurable Chasses - Removed old chassis blocks - Added new chasses with configurable range of effect - Added the mechanical bearing and rotation chassis - Motor speed can now be configured --- .../java/com/simibubi/create/AllBlocks.java | 70 +++++-- .../java/com/simibubi/create/AllItems.java | 27 ++- .../java/com/simibubi/create/AllPackets.java | 4 + .../com/simibubi/create/AllTileEntities.java | 18 +- .../com/simibubi/create/ClientEvents.java | 9 +- .../block/IBlockWithScrollableValue.java | 194 ++++++++++++++++++ .../generators/ConfigureMotorPacket.java | 40 ++++ .../contraptions/generators/MotorBlock.java | 41 +++- .../generators/MotorTileEntity.java | 45 +++- .../constructs/AbstractChassisBlock.java | 101 +++++++++ .../receivers/constructs/ChassisBlock.java | 37 ---- .../constructs/ChassisTileEntity.java | 67 ++++++ .../constructs/ConfigureChassisPacket.java | 37 ++++ .../constructs/MechanicalBearingBlock.java | 44 ++++ .../MechanicalBearingTileEntity.java | 12 ++ .../MechanicalBearingTileEntityRenderer.java | 41 ++++ .../constructs/MechanicalPistonBlock.java | 4 +- .../constructs/MechanicalPistonHeadBlock.java | 2 +- .../MechanicalPistonTileEntity.java | 51 +++-- .../MechanicalPistonTileEntityRenderer.java | 6 +- .../constructs/MovingConstructHandler.java | 3 +- .../receivers/constructs/PistonPoleBlock.java | 2 +- .../constructs/RotationChassisBlock.java | 75 +++++++ .../constructs/TranslationChassisBlock.java | 43 ++++ ...nstruct.java => TranslationConstruct.java} | 68 +++--- .../assets/create/blockstates/construct.json | 11 - .../blockstates/mechanical_bearing.json | 16 ++ .../blockstates/mechanical_bearing_top.json | 16 ++ .../blockstates/relocation_construct.json | 11 - .../create/blockstates/rotation_chassis.json | 98 +++++++++ .../create/blockstates/sticky_construct.json | 11 - .../blockstates/translation_chassis.json | 17 ++ .../resources/assets/create/lang/en_us.json | 10 +- .../assets/create/models/block/construct.json | 60 ------ .../create/models/block/construct_normal.json | 6 - .../models/block/construct_relocating.json | 6 - .../create/models/block/construct_sticky.json | 6 - .../models/block/mechanical_bearing_base.json | 67 ++++++ .../models/block/mechanical_bearing_top.json | 23 +++ .../models/block/rotation_chassis_base.json | 18 ++ .../models/block/rotation_chassis_side_x.json | 16 ++ .../block/rotation_chassis_side_x_sticky.json | 6 + .../models/block/rotation_chassis_side_y.json | 16 ++ .../block/rotation_chassis_side_y_sticky.json | 6 + .../models/block/rotation_chassis_side_z.json | 16 ++ .../block/rotation_chassis_side_z_sticky.json | 6 + .../models/block/translation_chassis.json | 8 + .../translation_chassis_both_sticky.json | 7 + .../translation_chassis_bottom_sticky.json | 6 + .../block/translation_chassis_top_sticky.json | 6 + .../assets/create/models/item/construct.json | 3 - .../models/item/mechanical_bearing.json | 82 ++++++++ .../models/item/relocation_construct.json | 3 - .../create/models/item/rotation_chassis.json | 8 + .../models/item/shadow_steel_mattock.json | 6 + .../models/item/shadow_steel_pickaxe.json | 6 + .../models/item/shadow_steel_sword.json | 6 + .../create/models/item/sticky_construct.json | 3 - .../models/item/translation_chassis.json | 3 + .../create/textures/block/bearing_side.png | Bin 0 -> 487 bytes .../create/textures/block/bearing_top.png | Bin 0 -> 449 bytes .../create/textures/block/construct_side.png | Bin 545 -> 0 bytes .../textures/block/rotation_chassis_side.png | Bin 0 -> 511 bytes .../block/rotation_chassis_side_sticky.png | Bin 0 -> 565 bytes .../textures/block/rotation_chassis_top.png | Bin 0 -> 536 bytes .../block/translation_chassis_side.png | Bin 0 -> 470 bytes .../block/translation_chassis_top.png | Bin 0 -> 648 bytes .../block/translation_chassis_top_sticky.png | Bin 0 -> 772 bytes .../textures/item/shadow_steel_mattock.png | Bin 0 -> 418 bytes .../textures/item/shadow_steel_pickaxe.png | Bin 0 -> 395 bytes .../textures/item/shadow_steel_sword.png | Bin 0 -> 417 bytes 71 files changed, 1372 insertions(+), 258 deletions(-) create mode 100644 src/main/java/com/simibubi/create/foundation/block/IBlockWithScrollableValue.java create mode 100644 src/main/java/com/simibubi/create/modules/contraptions/generators/ConfigureMotorPacket.java create mode 100644 src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/AbstractChassisBlock.java delete mode 100644 src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/ChassisBlock.java create mode 100644 src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/ChassisTileEntity.java create mode 100644 src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/ConfigureChassisPacket.java create mode 100644 src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalBearingBlock.java create mode 100644 src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalBearingTileEntity.java create mode 100644 src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalBearingTileEntityRenderer.java create mode 100644 src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/RotationChassisBlock.java create mode 100644 src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/TranslationChassisBlock.java rename src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/{Construct.java => TranslationConstruct.java} (88%) delete mode 100644 src/main/resources/assets/create/blockstates/construct.json create mode 100644 src/main/resources/assets/create/blockstates/mechanical_bearing.json create mode 100644 src/main/resources/assets/create/blockstates/mechanical_bearing_top.json delete mode 100644 src/main/resources/assets/create/blockstates/relocation_construct.json create mode 100644 src/main/resources/assets/create/blockstates/rotation_chassis.json delete mode 100644 src/main/resources/assets/create/blockstates/sticky_construct.json create mode 100644 src/main/resources/assets/create/blockstates/translation_chassis.json delete mode 100644 src/main/resources/assets/create/models/block/construct.json delete mode 100644 src/main/resources/assets/create/models/block/construct_normal.json delete mode 100644 src/main/resources/assets/create/models/block/construct_relocating.json delete mode 100644 src/main/resources/assets/create/models/block/construct_sticky.json create mode 100644 src/main/resources/assets/create/models/block/mechanical_bearing_base.json create mode 100644 src/main/resources/assets/create/models/block/mechanical_bearing_top.json create mode 100644 src/main/resources/assets/create/models/block/rotation_chassis_base.json create mode 100644 src/main/resources/assets/create/models/block/rotation_chassis_side_x.json create mode 100644 src/main/resources/assets/create/models/block/rotation_chassis_side_x_sticky.json create mode 100644 src/main/resources/assets/create/models/block/rotation_chassis_side_y.json create mode 100644 src/main/resources/assets/create/models/block/rotation_chassis_side_y_sticky.json create mode 100644 src/main/resources/assets/create/models/block/rotation_chassis_side_z.json create mode 100644 src/main/resources/assets/create/models/block/rotation_chassis_side_z_sticky.json create mode 100644 src/main/resources/assets/create/models/block/translation_chassis.json create mode 100644 src/main/resources/assets/create/models/block/translation_chassis_both_sticky.json create mode 100644 src/main/resources/assets/create/models/block/translation_chassis_bottom_sticky.json create mode 100644 src/main/resources/assets/create/models/block/translation_chassis_top_sticky.json delete mode 100644 src/main/resources/assets/create/models/item/construct.json create mode 100644 src/main/resources/assets/create/models/item/mechanical_bearing.json delete mode 100644 src/main/resources/assets/create/models/item/relocation_construct.json create mode 100644 src/main/resources/assets/create/models/item/rotation_chassis.json create mode 100644 src/main/resources/assets/create/models/item/shadow_steel_mattock.json create mode 100644 src/main/resources/assets/create/models/item/shadow_steel_pickaxe.json create mode 100644 src/main/resources/assets/create/models/item/shadow_steel_sword.json delete mode 100644 src/main/resources/assets/create/models/item/sticky_construct.json create mode 100644 src/main/resources/assets/create/models/item/translation_chassis.json create mode 100644 src/main/resources/assets/create/textures/block/bearing_side.png create mode 100644 src/main/resources/assets/create/textures/block/bearing_top.png delete mode 100644 src/main/resources/assets/create/textures/block/construct_side.png create mode 100644 src/main/resources/assets/create/textures/block/rotation_chassis_side.png create mode 100644 src/main/resources/assets/create/textures/block/rotation_chassis_side_sticky.png create mode 100644 src/main/resources/assets/create/textures/block/rotation_chassis_top.png create mode 100644 src/main/resources/assets/create/textures/block/translation_chassis_side.png create mode 100644 src/main/resources/assets/create/textures/block/translation_chassis_top.png create mode 100644 src/main/resources/assets/create/textures/block/translation_chassis_top_sticky.png create mode 100644 src/main/resources/assets/create/textures/item/shadow_steel_mattock.png create mode 100644 src/main/resources/assets/create/textures/item/shadow_steel_pickaxe.png create mode 100644 src/main/resources/assets/create/textures/item/shadow_steel_sword.png diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index c6cd245b2..999d1519f 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -12,10 +12,12 @@ import com.simibubi.create.modules.contraptions.receivers.DrillBlock; import com.simibubi.create.modules.contraptions.receivers.EncasedFanBlock; import com.simibubi.create.modules.contraptions.receivers.HarvesterBlock; import com.simibubi.create.modules.contraptions.receivers.TurntableBlock; -import com.simibubi.create.modules.contraptions.receivers.constructs.ChassisBlock; +import com.simibubi.create.modules.contraptions.receivers.constructs.MechanicalBearingBlock; import com.simibubi.create.modules.contraptions.receivers.constructs.MechanicalPistonBlock; import com.simibubi.create.modules.contraptions.receivers.constructs.MechanicalPistonHeadBlock; import com.simibubi.create.modules.contraptions.receivers.constructs.PistonPoleBlock; +import com.simibubi.create.modules.contraptions.receivers.constructs.RotationChassisBlock; +import com.simibubi.create.modules.contraptions.receivers.constructs.TranslationChassisBlock; import com.simibubi.create.modules.contraptions.redstone.ContactBlock; import com.simibubi.create.modules.contraptions.relays.ClutchBlock; import com.simibubi.create.modules.contraptions.relays.CogWheelBlock; @@ -59,38 +61,62 @@ import net.minecraftforge.registries.IForgeRegistry; public enum AllBlocks { // Schematics - SCHEMATICANNON(new SchematicannonBlock()), SCHEMATICANNON_CONNECTOR(new RenderUtilityBlock()), - SCHEMATICANNON_PIPE(new RenderUtilityBlock()), CREATIVE_CRATE(new CreativeCrateBlock()), + SCHEMATICANNON(new SchematicannonBlock()), + SCHEMATICANNON_CONNECTOR(new RenderUtilityBlock()), + SCHEMATICANNON_PIPE(new RenderUtilityBlock()), + CREATIVE_CRATE(new CreativeCrateBlock()), SCHEMATIC_TABLE(new SchematicTableBlock()), // Kinetics - SHAFT(new ShaftBlock(Properties.from(Blocks.ANDESITE))), COGWHEEL(new CogWheelBlock(false)), - LARGE_COGWHEEL(new CogWheelBlock(true)), ENCASED_SHAFT(new EncasedShaftBlock()), - ENCASED_BELT(new EncasedBeltBlock()), CLUTCH(new ClutchBlock()), GEARSHIFT(new GearshiftBlock()), - GEARBOX(new GearboxBlock()), BELT(new BeltBlock()), BELT_PULLEY(new RenderUtilityAxisBlock()), + SHAFT(new ShaftBlock(Properties.from(Blocks.ANDESITE))), + COGWHEEL(new CogWheelBlock(false)), + LARGE_COGWHEEL(new CogWheelBlock(true)), + ENCASED_SHAFT(new EncasedShaftBlock()), + ENCASED_BELT(new EncasedBeltBlock()), + CLUTCH(new ClutchBlock()), + GEARSHIFT(new GearshiftBlock()), + GEARBOX(new GearboxBlock()), + BELT(new BeltBlock()), + BELT_PULLEY(new RenderUtilityAxisBlock()), BELT_ANIMATION(new RenderUtilityBlock()), - MOTOR(new MotorBlock()), WATER_WHEEL(new WaterWheelBlock()), + MOTOR(new MotorBlock()), + WATER_WHEEL(new WaterWheelBlock()), - ENCASED_FAN(new EncasedFanBlock()), ENCASED_FAN_INNER(new RenderUtilityAxisBlock()), - TURNTABLE(new TurntableBlock()), SHAFT_HALF(new ShaftHalfBlock()), CRUSHING_WHEEL(new CrushingWheelBlock()), + ENCASED_FAN(new EncasedFanBlock()), + ENCASED_FAN_INNER(new RenderUtilityAxisBlock()), + TURNTABLE(new TurntableBlock()), + SHAFT_HALF(new ShaftHalfBlock()), + CRUSHING_WHEEL(new CrushingWheelBlock()), CRUSHING_WHEEL_CONTROLLER(new CrushingWheelControllerBlock()), - MECHANICAL_PISTON(new MechanicalPistonBlock(false)), STICKY_MECHANICAL_PISTON(new MechanicalPistonBlock(true)), - MECHANICAL_PISTON_HEAD(new MechanicalPistonHeadBlock()), PISTON_POLE(new PistonPoleBlock()), - CONSTRUCT(new ChassisBlock(ChassisBlock.Type.NORMAL)), STICKY_CONSTRUCT(new ChassisBlock(ChassisBlock.Type.STICKY)), - RELOCATION_CONSTRUCT(new ChassisBlock(ChassisBlock.Type.RELOCATING)), - - DRILL(new DrillBlock()), HARVESTER(new HarvesterBlock()), CONTACT(new ContactBlock()), + MECHANICAL_PISTON(new MechanicalPistonBlock(false)), + STICKY_MECHANICAL_PISTON(new MechanicalPistonBlock(true)), + MECHANICAL_PISTON_HEAD(new MechanicalPistonHeadBlock()), + PISTON_POLE(new PistonPoleBlock()), + MECHANICAL_BEARING(new MechanicalBearingBlock()), + MECHANICAL_BEARING_TOP(new ShaftHalfBlock()), + TRANSLATION_CHASSIS(new TranslationChassisBlock()), + ROTATION_CHASSIS(new RotationChassisBlock()), + + // Get rid o' these + DRILL(new DrillBlock()), + HARVESTER(new HarvesterBlock()), // Logistics - PULSE_REPEATER(new PulseRepeaterBlock()), REDSTONE_BRIDGE(new RedstoneBridgeBlock()), - STOCKSWITCH(new StockswitchBlock()), FLEXCRATE(new FlexcrateBlock()), EXTRACTOR(new ExtractorBlock()), - LINKED_EXTRACTOR(new LinkedExtractorBlock()), BELT_FUNNEL(new BeltFunnelBlock()), + CONTACT(new ContactBlock()), + REDSTONE_BRIDGE(new RedstoneBridgeBlock()), + STOCKSWITCH(new StockswitchBlock()), + FLEXCRATE(new FlexcrateBlock()), + EXTRACTOR(new ExtractorBlock()), + LINKED_EXTRACTOR(new LinkedExtractorBlock()), + BELT_FUNNEL(new BeltFunnelBlock()), ENTITY_DETECTOR(new EntityDetectorBlock()), + PULSE_REPEATER(new PulseRepeaterBlock()), // Symmetry - SYMMETRY_PLANE(new PlaneSymmetryBlock()), SYMMETRY_CROSSPLANE(new CrossPlaneSymmetryBlock()), + SYMMETRY_PLANE(new PlaneSymmetryBlock()), + SYMMETRY_CROSSPLANE(new CrossPlaneSymmetryBlock()), SYMMETRY_TRIPLEPLANE(new TriplePlaneSymmetryBlock()), // Gardens @@ -105,13 +131,13 @@ public enum AllBlocks { GRANITE_BRICKS(new Block(Properties.from(Blocks.GRANITE))), GABBRO(new Block(Properties.from(Blocks.ANDESITE)), 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), PAVED_GABBRO_BRICKS(new Block(Properties.from(GABBRO.block)), ComesWith.SLAB), INDENTED_GABBRO(new Block(Properties.from(GABBRO.block)), ComesWith.SLAB), SLIGHTLY_MOSSY_GABBRO_BRICKS(new Block(Properties.from(GABBRO.block))), MOSSY_GABBRO_BRICKS(new Block(Properties.from(GABBRO.block))), - + LIMESTONE(new Block(Properties.from(Blocks.GRANITE)), 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), diff --git a/src/main/java/com/simibubi/create/AllItems.java b/src/main/java/com/simibubi/create/AllItems.java index bccf22f4d..14a800020 100644 --- a/src/main/java/com/simibubi/create/AllItems.java +++ b/src/main/java/com/simibubi/create/AllItems.java @@ -39,24 +39,35 @@ public enum AllItems { PLACEMENT_HANDGUN( new BuilderGunItem(new Properties().setTEISR(() -> () -> renderUsing(AllItemRenderers.BUILDER_GUN)))), - ANDESITE_ALLOY_CUBE(new Item(standardProperties())), BLAZE_BRASS_CUBE(new Item(standardProperties())), + ANDESITE_ALLOY_CUBE(new Item(standardProperties())), + BLAZE_BRASS_CUBE(new Item(standardProperties())), CHORUS_CHROME_CUBE(new Item(standardProperties().rarity(Rarity.UNCOMMON))), - CHROMATIC_COMPOUND_CUBE(new ChromaticCompoundCubeItem(standardProperties().rarity(Rarity.UNCOMMON))), SHADOW_STEEL_CUBE(new Item(standardProperties().rarity(Rarity.UNCOMMON))), - ROSE_QUARTZ(new Item(standardProperties())), REFINED_ROSE_QUARTZ(new Item(standardProperties())), + ROSE_QUARTZ(new Item(standardProperties())), + REFINED_ROSE_QUARTZ(new Item(standardProperties())), + CHROMATIC_COMPOUND_CUBE(new ChromaticCompoundCubeItem(standardProperties().rarity(Rarity.UNCOMMON))), REFINED_RADIANCE_CUBE(new Item(standardProperties())), - BLAZING_PICKAXE(new Item(standardProperties())), BLAZING_SHOVEL(new Item(standardProperties())), - BLAZING_AXE(new Item(standardProperties())), BLAZING_SWORD(new Item(standardProperties())), + BLAZING_PICKAXE(new Item(standardProperties())), + BLAZING_SHOVEL(new Item(standardProperties())), + BLAZING_AXE(new Item(standardProperties())), + BLAZING_SWORD(new Item(standardProperties())), - ROSE_QUARTZ_PICKAXE(new Item(standardProperties())), ROSE_QUARTZ_SHOVEL(new Item(standardProperties())), - ROSE_QUARTZ_AXE(new Item(standardProperties())), ROSE_QUARTZ_SWORD(new Item(standardProperties())), + SHADOW_STEEL_PICKAXE(new Item(standardProperties())), + SHADOW_STEEL_MATTOCK(new Item(standardProperties())), + SHADOW_STEEL_SWORD(new Item(standardProperties())), + + ROSE_QUARTZ_PICKAXE(new Item(standardProperties())), + ROSE_QUARTZ_SHOVEL(new Item(standardProperties())), + ROSE_QUARTZ_AXE(new Item(standardProperties())), + ROSE_QUARTZ_SWORD(new Item(standardProperties())), TREE_FERTILIZER(new TreeFertilizerItem(standardProperties())), EMPTY_BLUEPRINT(new Item(standardProperties().maxStackSize(1))), BLUEPRINT_AND_QUILL(new SchematicAndQuillItem(standardProperties().maxStackSize(1))), - BLUEPRINT(new SchematicItem(standardProperties())), BELT_CONNECTOR(new BeltItem(standardProperties())), + BLUEPRINT(new SchematicItem(standardProperties())), + BELT_CONNECTOR(new BeltItem(standardProperties())), ; diff --git a/src/main/java/com/simibubi/create/AllPackets.java b/src/main/java/com/simibubi/create/AllPackets.java index 2109b55e6..9b10e1727 100644 --- a/src/main/java/com/simibubi/create/AllPackets.java +++ b/src/main/java/com/simibubi/create/AllPackets.java @@ -6,6 +6,8 @@ import java.util.function.Supplier; import com.simibubi.create.foundation.packet.NbtPacket; import com.simibubi.create.foundation.packet.SimplePacketBase; +import com.simibubi.create.modules.contraptions.generators.ConfigureMotorPacket; +import com.simibubi.create.modules.contraptions.receivers.constructs.ConfigureChassisPacket; import com.simibubi.create.modules.curiosities.placementHandgun.BuilderGunBeamPacket; import com.simibubi.create.modules.logistics.packet.ConfigureFlexcratePacket; import com.simibubi.create.modules.logistics.packet.ConfigureStockswitchPacket; @@ -27,6 +29,8 @@ public enum AllPackets { CONFIGURE_SCHEMATICANNON(ConfigureSchematicannonPacket.class, ConfigureSchematicannonPacket::new), CONFIGURE_FLEXCRATE(ConfigureFlexcratePacket.class, ConfigureFlexcratePacket::new), CONFIGURE_STOCKSWITCH(ConfigureStockswitchPacket.class, ConfigureStockswitchPacket::new), + CONFIGURE_CHASSIS(ConfigureChassisPacket.class, ConfigureChassisPacket::new), + CONFIGURE_MOTOR(ConfigureMotorPacket.class, ConfigureMotorPacket::new), PLACE_SCHEMATIC(SchematicPlacePacket.class, SchematicPlacePacket::new), UPLOAD_SCHEMATIC(SchematicUploadPacket.class, SchematicUploadPacket::new), diff --git a/src/main/java/com/simibubi/create/AllTileEntities.java b/src/main/java/com/simibubi/create/AllTileEntities.java index 738c00ee1..430627398 100644 --- a/src/main/java/com/simibubi/create/AllTileEntities.java +++ b/src/main/java/com/simibubi/create/AllTileEntities.java @@ -12,6 +12,9 @@ import com.simibubi.create.modules.contraptions.receivers.DrillTileEntity; import com.simibubi.create.modules.contraptions.receivers.EncasedFanTileEntity; import com.simibubi.create.modules.contraptions.receivers.EncasedFanTileEntityRenderer; import com.simibubi.create.modules.contraptions.receivers.TurntableTileEntity; +import com.simibubi.create.modules.contraptions.receivers.constructs.ChassisTileEntity; +import com.simibubi.create.modules.contraptions.receivers.constructs.MechanicalBearingTileEntity; +import com.simibubi.create.modules.contraptions.receivers.constructs.MechanicalBearingTileEntityRenderer; import com.simibubi.create.modules.contraptions.receivers.constructs.MechanicalPistonTileEntity; import com.simibubi.create.modules.contraptions.receivers.constructs.MechanicalPistonTileEntityRenderer; import com.simibubi.create.modules.contraptions.relays.ClutchTileEntity; @@ -62,12 +65,17 @@ public enum AllTileEntities { // Kinetics SHAFT(ShaftTileEntity::new, AllBlocks.SHAFT, AllBlocks.COGWHEEL, AllBlocks.LARGE_COGWHEEL, AllBlocks.ENCASED_SHAFT), - MOTOR(MotorTileEntity::new, AllBlocks.MOTOR), GEARBOX(GearboxTileEntity::new, AllBlocks.GEARBOX), + MOTOR(MotorTileEntity::new, AllBlocks.MOTOR), + GEARBOX(GearboxTileEntity::new, AllBlocks.GEARBOX), TURNTABLE(TurntableTileEntity::new, AllBlocks.TURNTABLE), ENCASED_SHAFT(EncasedShaftTileEntity::new, AllBlocks.ENCASED_SHAFT, AllBlocks.ENCASED_BELT), - ENCASED_FAN(EncasedFanTileEntity::new, AllBlocks.ENCASED_FAN), CLUTCH(ClutchTileEntity::new, AllBlocks.CLUTCH), - GEARSHIFT(GearshiftTileEntity::new, AllBlocks.GEARSHIFT), BELT(BeltTileEntity::new, AllBlocks.BELT), + ENCASED_FAN(EncasedFanTileEntity::new, AllBlocks.ENCASED_FAN), + CLUTCH(ClutchTileEntity::new, AllBlocks.CLUTCH), + GEARSHIFT(GearshiftTileEntity::new, AllBlocks.GEARSHIFT), + BELT(BeltTileEntity::new, AllBlocks.BELT), MECHANICAL_PISTON(MechanicalPistonTileEntity::new, AllBlocks.MECHANICAL_PISTON, AllBlocks.STICKY_MECHANICAL_PISTON), + MECHANICAL_BEARING(MechanicalBearingTileEntity::new, AllBlocks.MECHANICAL_BEARING), + CHASSIS(ChassisTileEntity::new, AllBlocks.ROTATION_CHASSIS, AllBlocks.TRANSLATION_CHASSIS), DRILL(DrillTileEntity::new, AllBlocks.DRILL), CRUSHING_WHEEL(CrushingWheelTileEntity::new, AllBlocks.CRUSHING_WHEEL), CRUSHING_WHEEL_CONTROLLER(CrushingWheelControllerTileEntity::new, AllBlocks.CRUSHING_WHEEL_CONTROLLER), @@ -76,7 +84,8 @@ public enum AllTileEntities { // Logistics REDSTONE_BRIDGE(RedstoneBridgeTileEntity::new, AllBlocks.REDSTONE_BRIDGE), STOCKSWITCH(StockswitchTileEntity::new, AllBlocks.STOCKSWITCH), - FLEXCRATE(FlexcrateTileEntity::new, AllBlocks.FLEXCRATE), EXTRACTOR(ExtractorTileEntity::new, AllBlocks.EXTRACTOR), + FLEXCRATE(FlexcrateTileEntity::new, AllBlocks.FLEXCRATE), + EXTRACTOR(ExtractorTileEntity::new, AllBlocks.EXTRACTOR), LINKED_EXTRACTOR(LinkedExtractorTileEntity::new, AllBlocks.LINKED_EXTRACTOR), BELT_FUNNEL(BeltFunnelTileEntity::new, AllBlocks.BELT_FUNNEL), ENTITY_DETECTOR(EntityDetectorTileEntity::new, AllBlocks.ENTITY_DETECTOR), @@ -123,6 +132,7 @@ public enum AllTileEntities { bind(ClutchTileEntity.class, new SplitShaftTileEntityRenderer()); bind(BeltTileEntity.class, new BeltTileEntityRenderer()); bind(MechanicalPistonTileEntity.class, new MechanicalPistonTileEntityRenderer()); + bind(MechanicalBearingTileEntity.class, new MechanicalBearingTileEntityRenderer()); bind(DrillTileEntity.class, new KineticTileEntityRenderer()); bind(CrushingWheelTileEntity.class, new KineticTileEntityRenderer()); bind(WaterWheelTileEntity.class, new KineticTileEntityRenderer()); diff --git a/src/main/java/com/simibubi/create/ClientEvents.java b/src/main/java/com/simibubi/create/ClientEvents.java index abc726fb0..07c5e349c 100644 --- a/src/main/java/com/simibubi/create/ClientEvents.java +++ b/src/main/java/com/simibubi/create/ClientEvents.java @@ -1,5 +1,6 @@ package com.simibubi.create; +import com.simibubi.create.foundation.block.IBlockWithScrollableValue; import com.simibubi.create.foundation.gui.ScreenOpener; import com.simibubi.create.modules.contraptions.receivers.TurntableHandler; import com.simibubi.create.modules.contraptions.relays.belt.BeltItemHandler; @@ -67,16 +68,16 @@ public class ClientEvents { CreateClient.schematicHandler.onKeyInput(key, pressed); } - @SubscribeEvent public static void onMouseScrolled(MouseScrollEvent event) { if (Minecraft.getInstance().currentScreen != null) return; - + double delta = event.getScrollDelta(); boolean cancelled = CreateClient.schematicHandler.mouseScrolled(delta) - || CreateClient.schematicAndQuillHandler.mouseScrolled(delta); + || CreateClient.schematicAndQuillHandler.mouseScrolled(delta) + || IBlockWithScrollableValue.onScroll(delta); event.setCanceled(cancelled); } @@ -96,7 +97,7 @@ public class ClientEvents { public static void onRenderTick(RenderTickEvent event) { if (!isGameActive()) return; - + TurntableHandler.gameRenderTick(); } diff --git a/src/main/java/com/simibubi/create/foundation/block/IBlockWithScrollableValue.java b/src/main/java/com/simibubi/create/foundation/block/IBlockWithScrollableValue.java new file mode 100644 index 000000000..e5c4bcb43 --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/block/IBlockWithScrollableValue.java @@ -0,0 +1,194 @@ +package com.simibubi.create.foundation.block; + +import com.mojang.blaze3d.platform.GlStateManager; +import com.simibubi.create.foundation.utility.TessellatorHelper; +import com.simibubi.create.foundation.utility.VecHelper; + +import net.minecraft.block.BlockState; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.BufferBuilder; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.WorldRenderer; +import net.minecraft.client.renderer.vertex.DefaultVertexFormats; +import net.minecraft.client.world.ClientWorld; +import net.minecraft.util.Direction; +import net.minecraft.util.Direction.Axis; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.RayTraceResult; +import net.minecraft.util.math.Vec3d; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.world.IWorld; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.client.event.DrawBlockHighlightEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod.EventBusSubscriber; + +@EventBusSubscriber(value = Dist.CLIENT) +public interface IBlockWithScrollableValue { + + public static final AxisAlignedBB VALUE_BB = new AxisAlignedBB(0, 0, 0, 2 / 16f, 6 / 16f, 6 / 16f); + + public int getCurrentValue(BlockState state, IWorld world, BlockPos pos); + + public void onScroll(BlockState state, IWorld world, BlockPos pos, double delta); + + public String getValueName(); + + public Vec3d getValueBoxPosition(BlockState state, IWorld world, BlockPos pos); + + public Direction getValueBoxDirection(BlockState state, IWorld world, BlockPos pos); + + public default boolean isValueOnAllSides() { + return false; + } + + @SubscribeEvent + @OnlyIn(Dist.CLIENT) + public static void onDrawBlockHighlight(DrawBlockHighlightEvent event) { + if (event.getTarget() == null || !(event.getTarget() instanceof BlockRayTraceResult)) + return; + + BlockRayTraceResult result = (BlockRayTraceResult) event.getTarget(); + Minecraft mc = Minecraft.getInstance(); + ClientWorld world = mc.world; + BlockPos blockPos = result.getPos(); + BlockState state = world.getBlockState(blockPos); + + if (!(state.getBlock() instanceof IBlockWithScrollableValue)) + return; + if (!mc.player.isAllowEdit()) + return; + + IBlockWithScrollableValue block = (IBlockWithScrollableValue) state.getBlock(); + Vec3d pos = new Vec3d(blockPos); + + Vec3d valueBoxPosition = block.getValueBoxPosition(state, world, blockPos); + AxisAlignedBB bb = VALUE_BB.offset(valueBoxPosition); + bb = bb.grow(1 / 128f); + Direction facing = block.isValueOnAllSides() ? result.getFace() + : block.getValueBoxDirection(state, world, blockPos); + + Vec3d cursor = result.getHitVec().subtract(VecHelper.getCenterOf(blockPos)); + cursor = VecHelper.rotate(cursor, facing.getHorizontalAngle() + 90, Axis.Y); + cursor = VecHelper.rotate(cursor, facing == Direction.UP ? -90 : facing == Direction.DOWN ? 90 : 0, Axis.Z) + .add(.5, .5, .5); + boolean contains = bb.contains(cursor); + + TessellatorHelper.prepareForDrawing(); + GlStateManager.enableBlend(); + GlStateManager.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, + GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, + GlStateManager.DestFactor.ZERO); + GlStateManager.disableTexture(); + GlStateManager.depthMask(false); + + Tessellator tessellator = Tessellator.getInstance(); + BufferBuilder bufferbuilder = tessellator.getBuffer(); + bufferbuilder.begin(3, DefaultVertexFormats.POSITION_COLOR); + + GlStateManager.translated(pos.x, pos.y, pos.z); + GlStateManager.translated(.5f, .5f, .5f); + GlStateManager.rotated(-facing.getHorizontalAngle() - 90, 0, 1, 0); + GlStateManager.rotated(facing == Direction.UP ? 90 : facing == Direction.DOWN ? -90 : 0, 0, 0, 1); + GlStateManager.translated(-.5f, -.5f, -.5f); + + GlStateManager.pushMatrix(); + + if (contains) { + GlStateManager.lineWidth(2); + WorldRenderer.drawBoundingBox(bufferbuilder, bb.minX, bb.minY, bb.minZ, bb.maxX, bb.maxY, bb.maxZ, .5f, 1, + .75f, 1f); + } else { + GlStateManager.lineWidth(2); + WorldRenderer.drawBoundingBox(bufferbuilder, bb.minX, bb.minY, bb.minZ, bb.maxX, bb.maxY, bb.maxZ, .25f, + .5f, .35f, 1f); + } + + tessellator.draw(); + GlStateManager.popMatrix(); + + GlStateManager.enableTexture(); + GlStateManager.depthMask(true); + + float textScale = 1 / 128f; + + GlStateManager.rotated(90, 0, 1, 0); + GlStateManager.translated(1 - valueBoxPosition.z - bb.getZSize(), valueBoxPosition.y + bb.getYSize(), + valueBoxPosition.x); + GlStateManager.translated(-1, 0, 3 / 32f); + + if (contains) { + GlStateManager.pushMatrix(); + GlStateManager.translated(bb.getZSize() + 1/32f, -1/16f, 0); + GlStateManager.scaled(textScale, -textScale, textScale); + + String text = block.getValueName(); + mc.fontRenderer.drawString(text, 0, 0, 0x88FFBB); + GlStateManager.translated(0, 0, -1 / 4f); + mc.fontRenderer.drawString(text, 1, 1, 0x224433); + GlStateManager.translated(0, 0, 1 / 4f); + + text = TextFormatting.ITALIC + ""; + mc.fontRenderer.drawString(text, 0, 10, 0xBBBBCC); + GlStateManager.translated(0, 0, -1 / 4f); + mc.fontRenderer.drawString(text, 1, 11, 0x111111); + GlStateManager.translated(0, 0, 1 / 4f); + + GlStateManager.popMatrix(); + } + + String numberText = block.getCurrentValue(state, world, blockPos) + ""; + int stringWidth = mc.fontRenderer.getStringWidth(numberText); + float numberScale = 4 / 128f * (6f / stringWidth); + GlStateManager.translated(7/64f, -5/64f, 0); + + GlStateManager.scaled(numberScale, -numberScale, numberScale); + + mc.fontRenderer.drawString(numberText, 0, 0, 0xFFFFFF); + GlStateManager.translated(0, 0, -1 / 4f); + mc.fontRenderer.drawString(numberText, 1, 1, 0x224433); + + GlStateManager.disableBlend(); + + GlStateManager.lineWidth(1); + TessellatorHelper.cleanUpAfterDrawing(); + } + + public static boolean onScroll(double delta) { + RayTraceResult objectMouseOver = Minecraft.getInstance().objectMouseOver; + if (!(objectMouseOver instanceof BlockRayTraceResult)) + return false; + + BlockRayTraceResult result = (BlockRayTraceResult) objectMouseOver; + Minecraft mc = Minecraft.getInstance(); + ClientWorld world = mc.world; + BlockPos blockPos = result.getPos(); + BlockState state = world.getBlockState(blockPos); + + if (!(state.getBlock() instanceof IBlockWithScrollableValue)) + return false; + if (!mc.player.isAllowEdit()) + return false; + + IBlockWithScrollableValue block = (IBlockWithScrollableValue) state.getBlock(); + Vec3d valueBoxPosition = block.getValueBoxPosition(state, world, blockPos); + AxisAlignedBB bb = VALUE_BB.offset(valueBoxPosition); + bb = bb.grow(1 / 128f); + Direction facing = block.isValueOnAllSides() ? result.getFace() + : block.getValueBoxDirection(state, world, blockPos); + + Vec3d cursor = result.getHitVec().subtract(VecHelper.getCenterOf(blockPos)); + cursor = VecHelper.rotate(cursor, facing.getHorizontalAngle() + 90, Axis.Y); + cursor = VecHelper.rotate(cursor, facing == Direction.UP ? -90 : facing == Direction.DOWN ? 90 : 0, Axis.Z) + .add(.5, .5, .5); + if (!bb.contains(cursor)) + return false; + + block.onScroll(state, world, blockPos, delta); + return true; + } + +} diff --git a/src/main/java/com/simibubi/create/modules/contraptions/generators/ConfigureMotorPacket.java b/src/main/java/com/simibubi/create/modules/contraptions/generators/ConfigureMotorPacket.java new file mode 100644 index 000000000..b442a46db --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/contraptions/generators/ConfigureMotorPacket.java @@ -0,0 +1,40 @@ +package com.simibubi.create.modules.contraptions.generators; + +import com.simibubi.create.foundation.packet.TileEntityConfigurationPacket; +import com.simibubi.create.modules.contraptions.RotationPropagator; + +import net.minecraft.network.PacketBuffer; +import net.minecraft.util.math.BlockPos; + +public class ConfigureMotorPacket extends TileEntityConfigurationPacket { + + private int speed; + + public ConfigureMotorPacket(BlockPos pos, int speed) { + super(pos); + this.speed = speed; + } + + public ConfigureMotorPacket(PacketBuffer buffer) { + super(buffer); + } + + @Override + protected void writeSettings(PacketBuffer buffer) { + buffer.writeInt(speed); + } + + @Override + protected void readSettings(PacketBuffer buffer) { + speed = buffer.readInt(); + } + + @Override + protected void applySettings(MotorTileEntity te) { + RotationPropagator.handleRemoved(te.getWorld(), te.getPos(), te); + te.setSpeed(speed); + te.sendData(); + RotationPropagator.handleAdded(te.getWorld(), te.getPos(), te); + } + +} diff --git a/src/main/java/com/simibubi/create/modules/contraptions/generators/MotorBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/generators/MotorBlock.java index bfc9aab0b..f7b84f4a5 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/generators/MotorBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/generators/MotorBlock.java @@ -1,5 +1,7 @@ package com.simibubi.create.modules.contraptions.generators; +import com.simibubi.create.foundation.block.IBlockWithScrollableValue; +import com.simibubi.create.foundation.block.IWithTileEntity; import com.simibubi.create.foundation.utility.ItemDescription; import com.simibubi.create.modules.contraptions.base.HorizontalKineticBlock; @@ -9,16 +11,21 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Direction; import net.minecraft.util.Direction.Axis; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.shapes.ISelectionContext; import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.world.IBlockReader; +import net.minecraft.world.IWorld; import net.minecraft.world.World; -public class MotorBlock extends HorizontalKineticBlock { +public class MotorBlock extends HorizontalKineticBlock + implements IWithTileEntity, IBlockWithScrollableValue { protected static final VoxelShape MOTOR_X = makeCuboidShape(0, 3, 3, 16, 13, 13); protected static final VoxelShape MOTOR_Z = makeCuboidShape(3, 3, 0, 13, 13, 16); + private static final Vec3d valuePos = new Vec3d(15 / 16f, 5 / 16f, 5 / 16f); + public MotorBlock() { super(Properties.create(Material.IRON)); } @@ -54,8 +61,36 @@ public class MotorBlock extends HorizontalKineticBlock { @Override public ItemDescription getDescription() { - return new ItemDescription(color).withSummary("Provides Rotational Power.").withControl("When R-Clicked", - "Opens the " + h("Configuration Screen", color)).createTabs(); + return new ItemDescription(color).withSummary("Provides Rotational Power.") + .withControl("When R-Clicked", "Opens the " + h("Configuration Screen", color)).createTabs(); } + + @Override + public int getCurrentValue(BlockState state, IWorld world, BlockPos pos) { + MotorTileEntity tileEntity = (MotorTileEntity) world.getTileEntity(pos); + if (tileEntity == null) + return 0; + return tileEntity.getSpeedValue(); + } + + @Override + public void onScroll(BlockState state, IWorld world, BlockPos pos, double delta) { + withTileEntityDo(world, pos, te -> te.setSpeedValueLazily((int) (te.getSpeedValue() * (delta > 0 ? 2 : .5f)))); + } + + @Override + public String getValueName() { + return "Speed"; + } + + @Override + public Vec3d getValueBoxPosition(BlockState state, IWorld world, BlockPos pos) { + return valuePos; + } + + @Override + public Direction getValueBoxDirection(BlockState state, IWorld world, BlockPos pos) { + return state.get(HORIZONTAL_FACING).getOpposite(); + } } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/generators/MotorTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/generators/MotorTileEntity.java index bc4c82df5..e7b16bf64 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/generators/MotorTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/generators/MotorTileEntity.java @@ -1,14 +1,22 @@ package com.simibubi.create.modules.contraptions.generators; +import com.simibubi.create.AllPackets; import com.simibubi.create.AllTileEntities; import com.simibubi.create.modules.contraptions.base.KineticTileEntity; -public class MotorTileEntity extends KineticTileEntity { +import net.minecraft.tileentity.ITickableTileEntity; +import net.minecraft.util.math.MathHelper; +public class MotorTileEntity extends KineticTileEntity implements ITickableTileEntity { + + public static final int MAX_SPEED = 4096; + public static final int DEFAULT_SPEED = 64; + public int newSpeed; + public int lastModified; + public MotorTileEntity() { super(AllTileEntities.MOTOR.type); - setSpeed(50); - setForce(10); + setSpeed(DEFAULT_SPEED); } @Override @@ -21,4 +29,35 @@ public class MotorTileEntity extends KineticTileEntity { return true; } + @Override + public void setSpeed(float speed) { + super.setSpeed(speed); + newSpeed = (int) speed; + } + + public int getSpeedValue() { + if (world.isRemote) + return newSpeed; + return (int) speed; + } + + public void setSpeedValueLazily(int speed) { + if (newSpeed == speed) + return; + newSpeed = MathHelper.clamp(speed, 1, MAX_SPEED); + this.lastModified = 0; + } + + @Override + public void tick() { + if (!world.isRemote) + return; + if (lastModified == -1) + return; + if (lastModified++ > 10) { + lastModified = -1; + AllPackets.channel.sendToServer(new ConfigureMotorPacket(pos, newSpeed)); + } + } + } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/AbstractChassisBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/AbstractChassisBlock.java new file mode 100644 index 000000000..9d445cd0b --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/AbstractChassisBlock.java @@ -0,0 +1,101 @@ +package com.simibubi.create.modules.contraptions.receivers.constructs; + +import com.simibubi.create.foundation.block.IBlockWithScrollableValue; +import com.simibubi.create.foundation.block.IWithTileEntity; + +import net.minecraft.block.BlockState; +import net.minecraft.block.RotatedPillarBlock; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.state.BooleanProperty; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.Direction; +import net.minecraft.util.Hand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.Vec3d; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.IWorld; +import net.minecraft.world.World; + +public abstract class AbstractChassisBlock extends RotatedPillarBlock + implements IWithTileEntity, IBlockWithScrollableValue { + + private static final Vec3d valuePos = new Vec3d(15 / 16f, 9 / 16f, 9 / 16f); + + public AbstractChassisBlock(Properties properties) { + super(properties); + } + + @Override + public boolean hasTileEntity(BlockState state) { + return true; + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) { + return new ChassisTileEntity(); + } + + @Override + public boolean onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, + BlockRayTraceResult hit) { + if (!player.isAllowEdit()) + return false; + + BooleanProperty affectedSide = getGlueableSide(state, hit.getFace()); + if (affectedSide == null) + return false; + + ItemStack heldItem = player.getHeldItem(handIn); + boolean isSlimeBall = heldItem.isItemEqual(new ItemStack(Items.SLIME_BALL)); + if ((!heldItem.isEmpty() || !player.isSneaking()) && !isSlimeBall) + return false; + if (state.get(affectedSide) == isSlimeBall) + return false; + if (worldIn.isRemote) + return true; + + if (isSlimeBall && !player.isCreative()) + heldItem.shrink(1); + worldIn.setBlockState(pos, state.with(affectedSide, isSlimeBall)); + return true; + } + + public abstract BooleanProperty getGlueableSide(BlockState state, Direction face); + + @Override + public int getCurrentValue(BlockState state, IWorld world, BlockPos pos) { + ChassisTileEntity tileEntity = (ChassisTileEntity) world.getTileEntity(pos); + if (tileEntity == null) + return 0; + return tileEntity.getRange(); + } + + @Override + public String getValueName() { + return "Range"; + } + + @Override + public Vec3d getValueBoxPosition(BlockState state, IWorld world, BlockPos pos) { + return valuePos; + } + + @Override + public Direction getValueBoxDirection(BlockState state, IWorld world, BlockPos pos) { + return null; + } + + @Override + public boolean isValueOnAllSides() { + return true; + } + + @Override + public void onScroll(BlockState state, IWorld world, BlockPos pos, double value) { + withTileEntityDo(world, pos, te -> te.setRangeLazily((int) (te.getRange() + value))); + } + +} diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/ChassisBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/ChassisBlock.java deleted file mode 100644 index 0c99f8b70..000000000 --- a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/ChassisBlock.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.simibubi.create.modules.contraptions.receivers.constructs; - -import net.minecraft.block.BlockState; -import net.minecraft.block.Blocks; -import net.minecraft.block.RotatedPillarBlock; -import net.minecraft.item.BlockItemUseContext; -import net.minecraft.util.BlockRenderLayer; -import net.minecraft.util.math.BlockPos; - -public class ChassisBlock extends RotatedPillarBlock { - - public Type type; - - public enum Type { - NORMAL, STICKY, RELOCATING; - } - - public ChassisBlock(Type type) { - super(Properties.from(Blocks.STRIPPED_SPRUCE_WOOD)); - this.type = type; - } - - @Override - public BlockRenderLayer getRenderLayer() { - return BlockRenderLayer.CUTOUT; - } - - @Override - public BlockState getStateForPlacement(BlockItemUseContext context) { - BlockPos placedOnPos = context.getPos().offset(context.getFace().getOpposite()); - BlockState blockState = context.getWorld().getBlockState(placedOnPos); - if (blockState.getBlock() instanceof ChassisBlock) - return getDefaultState().with(AXIS, blockState.get(AXIS)); - return super.getStateForPlacement(context); - } - -} diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/ChassisTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/ChassisTileEntity.java new file mode 100644 index 000000000..44d364ba4 --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/ChassisTileEntity.java @@ -0,0 +1,67 @@ +package com.simibubi.create.modules.contraptions.receivers.constructs; + +import com.simibubi.create.AllPackets; +import com.simibubi.create.AllTileEntities; +import com.simibubi.create.foundation.block.SyncedTileEntity; + +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.tileentity.ITickableTileEntity; +import net.minecraft.util.math.MathHelper; + +public class ChassisTileEntity extends SyncedTileEntity implements ITickableTileEntity { + + public static final int MAX_RANGE = 16; + public static final int DEFAULT_RANGE = 8; + private int range; + + public int newRange; + public int lastModified; + + public ChassisTileEntity() { + super(AllTileEntities.CHASSIS.type); + newRange = range = DEFAULT_RANGE; + } + + @Override + public CompoundNBT write(CompoundNBT compound) { + compound.putInt("Range", range); + return super.write(compound); + } + + @Override + public void read(CompoundNBT compound) { + newRange = range = compound.getInt("Range"); + super.read(compound); + } + + public int getRange() { + if (world.isRemote) + return newRange; + return range; + } + + public void setRange(int range) { + this.range = range; + sendData(); + } + + public void setRangeLazily(int range) { + this.newRange = MathHelper.clamp(range, 1, MAX_RANGE); + if (newRange == this.range) + return; + this.lastModified = 0; + } + + @Override + public void tick() { + if (!world.isRemote) + return; + if (lastModified == -1) + return; + if (lastModified++ > 10) { + lastModified = -1; + AllPackets.channel.sendToServer(new ConfigureChassisPacket(pos, newRange)); + } + } + +} diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/ConfigureChassisPacket.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/ConfigureChassisPacket.java new file mode 100644 index 000000000..51b88b4f9 --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/ConfigureChassisPacket.java @@ -0,0 +1,37 @@ +package com.simibubi.create.modules.contraptions.receivers.constructs; + +import com.simibubi.create.foundation.packet.TileEntityConfigurationPacket; + +import net.minecraft.network.PacketBuffer; +import net.minecraft.util.math.BlockPos; + +public class ConfigureChassisPacket extends TileEntityConfigurationPacket { + + private int range; + + public ConfigureChassisPacket(BlockPos pos, int range) { + super(pos); + this.range = range; + } + + public ConfigureChassisPacket(PacketBuffer buffer) { + super(buffer); + } + + @Override + protected void writeSettings(PacketBuffer buffer) { + buffer.writeInt(range); + } + + @Override + protected void readSettings(PacketBuffer buffer) { + range = buffer.readInt(); + } + + @Override + protected void applySettings(ChassisTileEntity te) { + te.setRange(range); + te.sendData(); + } + +} diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalBearingBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalBearingBlock.java new file mode 100644 index 000000000..66032267e --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalBearingBlock.java @@ -0,0 +1,44 @@ +package com.simibubi.create.modules.contraptions.receivers.constructs; + +import com.simibubi.create.foundation.utility.ItemDescription; +import com.simibubi.create.foundation.utility.ItemDescription.Palette; +import com.simibubi.create.modules.contraptions.base.DirectionalKineticBlock; + +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.World; + +public class MechanicalBearingBlock extends DirectionalKineticBlock { + + public MechanicalBearingBlock() { + super(Properties.from(Blocks.PISTON)); + } + + @Override + public ItemDescription getDescription() { + Palette color = Palette.Red; + return new ItemDescription(color) + .withSummary("Rotates attached structures around its axis. Can be used to generate rotational energy.") + .createTabs(); + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) { + return new MechanicalBearingTileEntity(); + } + + @Override + public boolean hasShaftTowards(World world, BlockPos pos, BlockState state, Direction face) { + return face == state.get(FACING).getOpposite(); + } + + @Override + protected boolean hasStaticPart() { + return true; + } + +} diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalBearingTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalBearingTileEntity.java new file mode 100644 index 000000000..fd9f60b17 --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalBearingTileEntity.java @@ -0,0 +1,12 @@ +package com.simibubi.create.modules.contraptions.receivers.constructs; + +import com.simibubi.create.AllTileEntities; +import com.simibubi.create.modules.contraptions.base.KineticTileEntity; + +public class MechanicalBearingTileEntity extends KineticTileEntity { + + public MechanicalBearingTileEntity() { + super(AllTileEntities.MECHANICAL_BEARING.type); + } + +} diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalBearingTileEntityRenderer.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalBearingTileEntityRenderer.java new file mode 100644 index 000000000..08a08cfb0 --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalBearingTileEntityRenderer.java @@ -0,0 +1,41 @@ +package com.simibubi.create.modules.contraptions.receivers.constructs; + +import com.simibubi.create.AllBlocks; +import com.simibubi.create.modules.contraptions.base.KineticTileEntity; +import com.simibubi.create.modules.contraptions.base.KineticTileEntityRenderer; + +import net.minecraft.block.BlockState; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.BufferBuilder; +import net.minecraft.state.properties.BlockStateProperties; +import net.minecraft.util.Direction; +import net.minecraft.util.math.BlockPos; +import net.minecraftforge.client.model.animation.Animation; + +public class MechanicalBearingTileEntityRenderer extends KineticTileEntityRenderer { + + @Override + public void renderTileEntityFast(KineticTileEntity te, double x, double y, double z, float partialTicks, + int destroyStage, BufferBuilder buffer) { + final Direction facing = te.getBlockState().get(BlockStateProperties.FACING); + final BlockPos pos = te.getPos(); + float time = Animation.getWorldTime(Minecraft.getInstance().world, partialTicks); + BlockState shaftState = AllBlocks.SHAFT_HALF.get().getDefaultState().with(BlockStateProperties.FACING, + facing.getOpposite()); + BlockState capState = AllBlocks.MECHANICAL_BEARING_TOP.get().getDefaultState().with(BlockStateProperties.FACING, + facing); + + cacheIfMissing(shaftState, BlockModelSpinner::new); + cacheIfMissing(capState, BlockModelSpinner::new); + + float offset = getRotationOffsetForPosition(te, pos, facing.getAxis()); + float angle = (time * te.getSpeed()) % 360; + + angle += offset; + angle = angle / 180f * (float) Math.PI; + + renderFromCache(buffer, shaftState, (float) x, (float) y, (float) z, pos, facing.getAxis(), angle); + renderFromCache(buffer, capState, (float) x, (float) y, (float) z, pos, facing.getAxis(), angle); + } + +} diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalPistonBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalPistonBlock.java index 96cd04a3a..e698ceab9 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalPistonBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalPistonBlock.java @@ -120,7 +120,7 @@ public class MechanicalPistonBlock extends KineticBlock { BlockPos pistonHead = null; BlockPos pistonBase = pos; - for (int offset = 1; offset < Construct.MAX_EXTENSIONS; offset++) { + for (int offset = 1; offset < TranslationConstruct.MAX_EXTENSIONS; offset++) { BlockPos currentPos = pos.offset(direction, offset); BlockState block = worldIn.getBlockState(currentPos); @@ -140,7 +140,7 @@ public class MechanicalPistonBlock extends KineticBlock { .forEach(p -> worldIn.destroyBlock(p, !player.isCreative())); } - for (int offset = 1; offset < Construct.MAX_EXTENSIONS; offset++) { + for (int offset = 1; offset < TranslationConstruct.MAX_EXTENSIONS; offset++) { BlockPos currentPos = pos.offset(direction.getOpposite(), offset); BlockState block = worldIn.getBlockState(currentPos); diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalPistonHeadBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalPistonHeadBlock.java index 4e43c36b9..8cb602eaf 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalPistonHeadBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalPistonHeadBlock.java @@ -65,7 +65,7 @@ public class MechanicalPistonHeadBlock extends ProperDirectionalBlock implements BlockPos pistonHead = pos; BlockPos pistonBase = null; - for (int offset = 1; offset < Construct.MAX_EXTENSIONS; offset++) { + for (int offset = 1; offset < TranslationConstruct.MAX_EXTENSIONS; offset++) { BlockPos currentPos = pos.offset(direction.getOpposite(), offset); BlockState block = worldIn.getBlockState(currentPos); diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalPistonTileEntity.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalPistonTileEntity.java index 748632ada..28cdbf11e 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalPistonTileEntity.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalPistonTileEntity.java @@ -14,6 +14,7 @@ import net.minecraft.block.Blocks; import net.minecraft.nbt.CompoundNBT; import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.tileentity.ITickableTileEntity; +import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Direction; import net.minecraft.util.Direction.Axis; import net.minecraft.util.math.AxisAlignedBB; @@ -24,7 +25,7 @@ import net.minecraft.world.gen.feature.template.Template.BlockInfo; public class MechanicalPistonTileEntity extends KineticTileEntity implements ITickableTileEntity { - protected Construct movingConstruct; + protected TranslationConstruct movingConstruct; protected float offset; protected boolean running; protected boolean assembleNextTick; @@ -65,7 +66,7 @@ public class MechanicalPistonTileEntity extends KineticTileEntity implements ITi running = tag.getBoolean("Running"); offset = tag.getFloat("Offset"); if (running) - movingConstruct = Construct.fromNBT(tag.getCompound("Construct")); + movingConstruct = TranslationConstruct.fromNBT(tag.getCompound("Construct")); super.read(tag); } @@ -85,8 +86,9 @@ public class MechanicalPistonTileEntity extends KineticTileEntity implements ITi Direction direction = getBlockState().get(BlockStateProperties.FACING); // Collect Construct - movingConstruct = getMovementSpeed() < 0 ? Construct.getAttachedForPulling(getWorld(), getPos(), direction) - : Construct.getAttachedForPushing(getWorld(), getPos(), direction); + movingConstruct = getMovementSpeed() < 0 + ? TranslationConstruct.getAttachedForPulling(getWorld(), getPos(), direction) + : TranslationConstruct.getAttachedForPushing(getWorld(), getPos(), direction); if (movingConstruct == null) return; @@ -141,6 +143,10 @@ public class MechanicalPistonTileEntity extends KineticTileEntity implements ITi world.destroyBlock(targetPos, world.getBlockState(targetPos).getCollisionShape(world, targetPos).isEmpty()); getWorld().setBlockState(targetPos, state, 3); + TileEntity tileEntity = world.getTileEntity(targetPos); + if (tileEntity != null && block.nbt != null) { + ((ChassisTileEntity) tileEntity).setRange(block.nbt.getInt("Range")); + } } running = false; @@ -206,10 +212,11 @@ public class MechanicalPistonTileEntity extends KineticTileEntity implements ITi BlockPos relativePos = BlockPos.ZERO.offset(movementDirection, getModulatedOffset(newOffset)); // Other moving Pistons - int maxPossibleRange = Construct.MAX_EXTENSIONS + Construct.MAX_CHAINED_BLOCKS + Construct.MAX_CHAINED_CHASSIS; + int maxPossibleRange = TranslationConstruct.MAX_EXTENSIONS + TranslationConstruct.MAX_CHAINED_BLOCKS + + TranslationConstruct.MAX_CHAINED_CHASSIS; Iterator iterator = Create.constructHandler.getOtherMovingPistonsInWorld(this) .iterator(); - while (iterator.hasNext()) { + pistonLoop: while (iterator.hasNext()) { MechanicalPistonTileEntity otherPiston = iterator.next(); if (otherPiston == this) @@ -225,24 +232,32 @@ public class MechanicalPistonTileEntity extends KineticTileEntity implements ITi BlockPos otherRelativePos = BlockPos.ZERO.offset(otherMovementDirection, getModulatedOffset(otherPiston.offset)); - for (AxisAlignedBB thisBB : Arrays.asList(movingConstruct.collisionBoxFront, + for (AxisAlignedBB tBB : Arrays.asList(movingConstruct.collisionBoxFront, movingConstruct.collisionBoxBack)) { - for (AxisAlignedBB otherBB : Arrays.asList(otherPiston.movingConstruct.collisionBoxFront, + for (AxisAlignedBB oBB : Arrays.asList(otherPiston.movingConstruct.collisionBoxFront, otherPiston.movingConstruct.collisionBoxBack)) { - - if (thisBB == null || otherBB == null) + if (tBB == null || oBB == null) continue; - if (thisBB.offset(relativePos).intersects(otherBB.offset(otherRelativePos))) { + + boolean frontalCollision = otherMovementDirection == movementDirection.getOpposite(); + BlockPos thisColliderOffset = relativePos.offset(movementDirection, + frontalCollision ? (getMovementSpeed() > 0 ? 1 : -1) : 0); + AxisAlignedBB thisBB = tBB.offset(thisColliderOffset); + AxisAlignedBB otherBB = oBB.offset(otherRelativePos); + + if (thisBB.intersects(otherBB)) { + boolean actuallyColliding = false; + for (BlockPos colliderPos : movingConstruct.getColliders(world, movementDirection)) { + colliderPos = colliderPos.add(thisColliderOffset).subtract(otherRelativePos); + if (!otherPiston.movingConstruct.blocks.containsKey(colliderPos)) + continue; + actuallyColliding = true; + } + if (!actuallyColliding) + continue pistonLoop; hadCollisionWithOtherPiston = true; return true; } - if (otherMovementDirection == movementDirection.getOpposite()) { - if (thisBB.offset(relativePos.offset(movementDirection, getMovementSpeed() > 0 ? 1 : -1)) - .intersects(otherBB.offset(otherRelativePos))) { - hadCollisionWithOtherPiston = true; - return true; - } - } } } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalPistonTileEntityRenderer.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalPistonTileEntityRenderer.java index b8f68d5ff..a9045791c 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalPistonTileEntityRenderer.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MechanicalPistonTileEntityRenderer.java @@ -26,7 +26,7 @@ import net.minecraftforge.client.model.data.EmptyModelData; public class MechanicalPistonTileEntityRenderer extends KineticTileEntityRenderer { - protected static Cache cachedConstructs; + protected static Cache cachedConstructs; @Override public void renderTileEntityFast(KineticTileEntity te, double x, double y, double z, float partialTicks, @@ -44,7 +44,7 @@ public class MechanicalPistonTileEntityRenderer extends KineticTileEntityRendere } - protected void cacheConstructIfMissing(Construct c) { + protected void cacheConstructIfMissing(TranslationConstruct c) { if (cachedConstructs == null) cachedConstructs = CacheBuilder.newBuilder().expireAfterAccess(1, TimeUnit.SECONDS).build(); if (cachedConstructs.getIfPresent(c) != null) @@ -67,7 +67,7 @@ public class MechanicalPistonTileEntityRenderer extends KineticTileEntityRendere cachedConstructs.put(c, new ConstructVertexBuffer(builder.getByteBuffer())); } - protected void renderConstructFromCache(Construct c, MechanicalPistonTileEntity te, double x, double y, double z, + protected void renderConstructFromCache(TranslationConstruct c, MechanicalPistonTileEntity te, double x, double y, double z, float partialTicks, BufferBuilder buffer) { final Vec3d offset = te.getConstructOffset(partialTicks); buffer.putBulkData(cachedConstructs.getIfPresent(c).getTransformed(te, diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MovingConstructHandler.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MovingConstructHandler.java index 107874820..24bf47314 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MovingConstructHandler.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/MovingConstructHandler.java @@ -48,7 +48,7 @@ public class MovingConstructHandler { float newOffset) { World world = te.getWorld(); Vec3d movementVec = new Vec3d(te.getBlockState().get(BlockStateProperties.FACING).getDirectionVec()); - Construct construct = te.movingConstruct; + TranslationConstruct construct = te.movingConstruct; if (world.isRemote) { renderedBBs.clear(); @@ -142,6 +142,7 @@ public class MovingConstructHandler { entity.onGround = true; } entity.setMotion(allowedMovement.subtract(movement.subtract(motion))); + entity.velocityChanged = true; } } diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/PistonPoleBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/PistonPoleBlock.java index 4b4b4d0ff..c63993395 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/PistonPoleBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/PistonPoleBlock.java @@ -55,7 +55,7 @@ public class PistonPoleBlock extends ProperDirectionalBlock implements ITooltip BlockPos pistonBase = null; for (int modifier : new int[] { 1, -1 }) { - for (int offset = modifier; modifier * offset < Construct.MAX_EXTENSIONS; offset += modifier) { + for (int offset = modifier; modifier * offset < TranslationConstruct.MAX_EXTENSIONS; offset += modifier) { BlockPos currentPos = pos.offset(direction, offset); BlockState block = worldIn.getBlockState(currentPos); diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/RotationChassisBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/RotationChassisBlock.java new file mode 100644 index 000000000..83754074a --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/RotationChassisBlock.java @@ -0,0 +1,75 @@ +package com.simibubi.create.modules.contraptions.receivers.constructs; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.state.BooleanProperty; +import net.minecraft.state.StateContainer.Builder; +import net.minecraft.util.Direction; +import net.minecraft.util.Direction.Axis; + +public class RotationChassisBlock extends AbstractChassisBlock { + + public static final BooleanProperty STICKY_NORTH = BooleanProperty.create("sticky_north"); + public static final BooleanProperty STICKY_SOUTH = BooleanProperty.create("sticky_south"); + public static final BooleanProperty STICKY_EAST = BooleanProperty.create("sticky_east"); + public static final BooleanProperty STICKY_WEST = BooleanProperty.create("sticky_west"); + + public RotationChassisBlock() { + super(Properties.from(Blocks.PISTON)); + setDefaultState(getDefaultState().with(STICKY_EAST, false).with(STICKY_SOUTH, false).with(STICKY_NORTH, false) + .with(STICKY_WEST, false)); + } + + @Override + protected void fillStateContainer(Builder builder) { + builder.add(STICKY_NORTH, STICKY_EAST, STICKY_SOUTH, STICKY_WEST); + super.fillStateContainer(builder); + } + + @Override + public String getValueName() { + return "Radius"; + } + + @Override + public BooleanProperty getGlueableSide(BlockState state, Direction face) { + Axis axis = state.get(AXIS); + + if (axis == Axis.X) { + if (face == Direction.NORTH) + return STICKY_WEST; + if (face == Direction.SOUTH) + return STICKY_EAST; + if (face == Direction.UP) + return STICKY_NORTH; + if (face == Direction.DOWN) + return STICKY_SOUTH; + } + + if (axis == Axis.Y) { + if (face == Direction.NORTH) + return STICKY_NORTH; + if (face == Direction.SOUTH) + return STICKY_SOUTH; + if (face == Direction.EAST) + return STICKY_EAST; + if (face == Direction.WEST) + return STICKY_WEST; + } + + if (axis == Axis.Z) { + if (face == Direction.UP) + return STICKY_NORTH; + if (face == Direction.DOWN) + return STICKY_SOUTH; + if (face == Direction.EAST) + return STICKY_EAST; + if (face == Direction.WEST) + return STICKY_WEST; + } + + return null; + } + +} diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/TranslationChassisBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/TranslationChassisBlock.java new file mode 100644 index 000000000..e0aec695a --- /dev/null +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/TranslationChassisBlock.java @@ -0,0 +1,43 @@ +package com.simibubi.create.modules.contraptions.receivers.constructs; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.item.BlockItemUseContext; +import net.minecraft.state.BooleanProperty; +import net.minecraft.state.StateContainer.Builder; +import net.minecraft.util.Direction; +import net.minecraft.util.Direction.AxisDirection; +import net.minecraft.util.math.BlockPos; + +public class TranslationChassisBlock extends AbstractChassisBlock { + + public static final BooleanProperty STICKY_TOP = BooleanProperty.create("sticky_top"); + public static final BooleanProperty STICKY_BOTTOM = BooleanProperty.create("sticky_bottom"); + + public TranslationChassisBlock() { + super(Properties.from(Blocks.PISTON)); + setDefaultState(getDefaultState().with(STICKY_TOP, false).with(STICKY_BOTTOM, false)); + } + + @Override + protected void fillStateContainer(Builder builder) { + builder.add(STICKY_TOP, STICKY_BOTTOM); + super.fillStateContainer(builder); + } + + @Override + public BlockState getStateForPlacement(BlockItemUseContext context) { + BlockPos placedOnPos = context.getPos().offset(context.getFace().getOpposite()); + BlockState blockState = context.getWorld().getBlockState(placedOnPos); + if (blockState.getBlock() instanceof TranslationChassisBlock && !context.isPlacerSneaking()) + return getDefaultState().with(AXIS, blockState.get(AXIS)); + return super.getStateForPlacement(context); + } + + @Override + public BooleanProperty getGlueableSide(BlockState state, Direction face) { + return face.getAxisDirection() == AxisDirection.POSITIVE ? STICKY_TOP : STICKY_BOTTOM; + } + +} diff --git a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/Construct.java b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/TranslationConstruct.java similarity index 88% rename from src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/Construct.java rename to src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/TranslationConstruct.java index c7a7b73f5..138057e78 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/Construct.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/receivers/constructs/TranslationConstruct.java @@ -32,7 +32,7 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.gen.feature.template.Template.BlockInfo; -public class Construct { +public class TranslationConstruct { public static final int MAX_EXTENSIONS = 20; public static final int MAX_CHAINED_CHASSIS = 12; @@ -50,7 +50,7 @@ public class Construct { protected int extensionLength; protected int initialExtensionProgress; - public Construct() { + public TranslationConstruct() { blocks = new HashMap<>(); actors = new ArrayList<>(); } @@ -79,8 +79,8 @@ public class Construct { return cachedColliders; } - public static Construct getAttachedForPushing(World world, BlockPos pos, Direction direction) { - Construct construct = new Construct(); + public static TranslationConstruct getAttachedForPushing(World world, BlockPos pos, Direction direction) { + TranslationConstruct construct = new TranslationConstruct(); if (!construct.collectExtensions(world, pos, direction)) return null; @@ -91,8 +91,8 @@ public class Construct { return construct; } - public static Construct getAttachedForPulling(World world, BlockPos pos, Direction direction) { - Construct construct = new Construct(); + public static TranslationConstruct getAttachedForPulling(World world, BlockPos pos, Direction direction) { + TranslationConstruct construct = new TranslationConstruct(); if (!construct.collectExtensions(world, pos, direction)) return null; @@ -209,9 +209,9 @@ public class Construct { collisionBoxFront = new AxisAlignedBB(blockPos); else collisionBoxFront = collisionBoxFront.union(new AxisAlignedBB(blockPos)); - + // Don't collect in front of drills - if (AllBlocks.DRILL.typeOf(state) && state.get(FACING) == direction) + if (AllBlocks.DRILL.typeOf(state) && state.get(FACING) == direction) break; } } @@ -266,19 +266,30 @@ public class Construct { BlockState chassisState = world.getBlockState(currentChassisPos); // Not attached to a chassis - if (!(chassisState.getBlock() instanceof ChassisBlock)) + if (!(chassisState.getBlock() instanceof TranslationChassisBlock)) + continue; + + int chassisRange = ((ChassisTileEntity) world.getTileEntity(currentChassisPos)).getRange(); + boolean chassisSticky = chassisState + .get(((AbstractChassisBlock) chassisState.getBlock()).getGlueableSide(chassisState, direction)); + + // Ignore replaceable Blocks and Air-like + if (state.getMaterial().isReplaceable() || state.isAir(world, currentPos)) + continue; + if (state.getCollisionShape(world, currentPos).isEmpty()) continue; // Too many Blocks - if (!currentChassisPos.withinDistance(currentPos, MAX_CHAINED_BLOCKS + 2)) + if (direction == movementDirection && !currentChassisPos.withinDistance(currentPos, chassisRange + 1)) return null; + if (direction != movementDirection && !currentChassisPos.withinDistance(currentPos, chassisRange + 1)) + continue; // Skip if pushed column ended already (Except for Relocating Chassis) - if (!AllBlocks.RELOCATION_CONSTRUCT.typeOf(chassisState) && !currentPos.equals(currentChassisPos)) { + if (!chassisSticky && !currentPos.equals(currentChassisPos)) { boolean skip = false; - if (movementDirection != direction && !currentChassisPos.withinDistance(currentPos, - AllBlocks.STICKY_CONSTRUCT.typeOf(chassisState) ? 2 : 1)) + if (movementDirection != direction && !currentChassisPos.withinDistance(currentPos, 1)) continue; for (BlockPos p = currentPos; !p.equals(currentChassisPos); p = p.offset(direction.getOpposite())) { @@ -293,27 +304,24 @@ public class Construct { } // Ignore sand and co. - if (AllBlocks.RELOCATION_CONSTRUCT.typeOf(chassisState) && movementDirection != direction - && state.getBlock() instanceof FallingBlock) - continue; - - // Ignore replaceable Blocks and Air-like - if (state.getMaterial().isReplaceable() || state.isAir(world, currentPos)) - continue; - if (state.getCollisionShape(world, currentPos).isEmpty()) + if (chassisSticky && movementDirection != direction && state.getBlock() instanceof FallingBlock) continue; // Structure is immobile if (!canPush(world, currentPos, movementDirection)) return null; - blocks.add(new BlockInfo(currentPos.offset(direction, -offset), state, null)); + CompoundNBT nbt = new CompoundNBT(); + nbt.putInt("Range", chassisRange); + + blocks.add(new BlockInfo(currentPos.offset(direction, -offset), state, + AllBlocks.TRANSLATION_CHASSIS.typeOf(state) ? nbt : null)); for (Direction facing : Direction.values()) { if (currentChassisPos.equals(currentPos) && facing == direction.getOpposite()) continue; if (AllBlocks.DRILL.typeOf(state) && facing == direction) continue; - + frontier.add(currentPos.offset(facing)); } } @@ -322,7 +330,8 @@ public class Construct { } private static boolean canPush(World world, BlockPos pos, Direction direction) { - return PistonBlock.canPush(world.getBlockState(pos), world, pos, direction, true, direction); + return PistonBlock.canPush(world.getBlockState(pos), world, pos, direction, true, direction) + || AllBlocks.TRANSLATION_CHASSIS.typeOf(world.getBlockState(pos)); } private static boolean canPull(World world, BlockPos pos, Direction direction) { @@ -343,7 +352,7 @@ public class Construct { continue; BlockState blockState = world.getBlockState(current); - if (!(blockState.getBlock() instanceof ChassisBlock)) + if (!(blockState.getBlock() instanceof TranslationChassisBlock)) continue; if (blockState.get(BlockStateProperties.AXIS) != direction.getAxis()) continue; @@ -375,6 +384,8 @@ public class Construct { CompoundNBT c = new CompoundNBT(); c.put("Block", NBTUtil.writeBlockState(block.state)); c.put("Pos", NBTUtil.writeBlockPos(block.pos)); + if (block.nbt != null) + c.put("Data", block.nbt); blocks.add(c); } @@ -412,12 +423,13 @@ public class Construct { } - public static Construct fromNBT(CompoundNBT nbt) { - Construct construct = new Construct(); + public static TranslationConstruct fromNBT(CompoundNBT nbt) { + TranslationConstruct construct = new TranslationConstruct(); nbt.getList("Blocks", 10).forEach(c -> { CompoundNBT comp = (CompoundNBT) c; BlockInfo info = new BlockInfo(NBTUtil.readBlockPos(comp.getCompound("Pos")), - NBTUtil.readBlockState(comp.getCompound("Block")), null); + NBTUtil.readBlockState(comp.getCompound("Block")), + comp.contains("Data") ? comp.getCompound("Data") : null); construct.blocks.put(info.pos, info); }); construct.extensionLength = nbt.getInt("ExtensionLength"); diff --git a/src/main/resources/assets/create/blockstates/construct.json b/src/main/resources/assets/create/blockstates/construct.json deleted file mode 100644 index a4e8c6b59..000000000 --- a/src/main/resources/assets/create/blockstates/construct.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "forgemarker": 1, - "defaults": { - "model": "create:block/construct_normal" - }, - "variants": { - "axis=y": { "model": "create:block/construct_normal" }, - "axis=z": { "model": "create:block/construct_normal", "x": 90 }, - "axis=x": { "model": "create:block/construct_normal", "x": 90, "y": 90 } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/create/blockstates/mechanical_bearing.json b/src/main/resources/assets/create/blockstates/mechanical_bearing.json new file mode 100644 index 000000000..75d3f3ace --- /dev/null +++ b/src/main/resources/assets/create/blockstates/mechanical_bearing.json @@ -0,0 +1,16 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "create:block/mechanical_bearing_base" + }, + "variants": { + "facing" : { + "up" : { }, + "down" : { "x": 180 }, + "north" : { "x": 90 }, + "east" : { "x": 90, "y": 90 }, + "south" : { "x": 90, "y": 180 }, + "west" : { "x": 90, "y": 270 } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/blockstates/mechanical_bearing_top.json b/src/main/resources/assets/create/blockstates/mechanical_bearing_top.json new file mode 100644 index 000000000..9358a464b --- /dev/null +++ b/src/main/resources/assets/create/blockstates/mechanical_bearing_top.json @@ -0,0 +1,16 @@ +{ + "forge_marker": 1, + "defaults": { + "model": "create:block/mechanical_bearing_top" + }, + "variants": { + "facing" : { + "up" : { }, + "down" : { "x": 180 }, + "north" : { "x": 90 }, + "east" : { "x": 90, "y": 90 }, + "south" : { "x": 90, "y": 180 }, + "west" : { "x": 90, "y": 270 } + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/blockstates/relocation_construct.json b/src/main/resources/assets/create/blockstates/relocation_construct.json deleted file mode 100644 index 823d704c4..000000000 --- a/src/main/resources/assets/create/blockstates/relocation_construct.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "forgemarker": 1, - "defaults": { - "model": "create:block/construct_relocating" - }, - "variants": { - "axis=y": { "model": "create:block/construct_relocating" }, - "axis=z": { "model": "create:block/construct_relocating", "x": 90 }, - "axis=x": { "model": "create:block/construct_relocating", "x": 90, "y": 90 } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/create/blockstates/rotation_chassis.json b/src/main/resources/assets/create/blockstates/rotation_chassis.json new file mode 100644 index 000000000..2506c0523 --- /dev/null +++ b/src/main/resources/assets/create/blockstates/rotation_chassis.json @@ -0,0 +1,98 @@ +{ +"multipart": [ + { "when": { "axis": "x" }, + "apply": { "model": "create:block/rotation_chassis_base", "x": 90, "y": 90 } + }, + { "when": { "axis": "y" }, + "apply": { "model": "create:block/rotation_chassis_base" } + }, + { "when": { "axis": "z" }, + "apply": { "model": "create:block/rotation_chassis_base", "x": 90 } + }, + + + { "when": { "axis": "x", "sticky_south": "false" }, + "apply": { "model": "create:block/rotation_chassis_side_x", "x": 180, "y": 0 } + }, + { "when": { "axis": "y", "sticky_south": "false" }, + "apply": { "model": "create:block/rotation_chassis_side_y" } + }, + { "when": { "axis": "z", "sticky_south": "false" }, + "apply": { "model": "create:block/rotation_chassis_side_x", "x": 180, "y": 90 } + }, + + { "when": { "axis": "x", "sticky_south": "true" }, + "apply": { "model": "create:block/rotation_chassis_side_x_sticky", "x": 180, "y": 0 } + }, + { "when": { "axis": "y", "sticky_south": "true" }, + "apply": { "model": "create:block/rotation_chassis_side_y_sticky" } + }, + { "when": { "axis": "z", "sticky_south": "true" }, + "apply": { "model": "create:block/rotation_chassis_side_x_sticky", "x": 180, "y": 90 } + }, + + + { "when": { "axis": "x", "sticky_north": "false" }, + "apply": { "model": "create:block/rotation_chassis_side_x", "x": 0, "y": 0 } + }, + { "when": { "axis": "y", "sticky_north": "false" }, + "apply": { "model": "create:block/rotation_chassis_side_y", "x": 0, "y": 180 } + }, + { "when": { "axis": "z", "sticky_north": "false" }, + "apply": { "model": "create:block/rotation_chassis_side_x", "x": 0, "y": 90 } + }, + + { "when": { "axis": "x", "sticky_north": "true" }, + "apply": { "model": "create:block/rotation_chassis_side_x_sticky", "x": 0, "y": 0 } + }, + { "when": { "axis": "y", "sticky_north": "true" }, + "apply": { "model": "create:block/rotation_chassis_side_y_sticky", "x": 0, "y": 180 } + }, + { "when": { "axis": "z", "sticky_north": "true" }, + "apply": { "model": "create:block/rotation_chassis_side_x_sticky", "x": 0, "y": 90 } + }, + + + { "when": { "axis": "x", "sticky_east": "false" }, + "apply": { "model": "create:block/rotation_chassis_side_x", "x": 270, "y": 0 } + }, + { "when": { "axis": "y", "sticky_east": "false" }, + "apply": { "model": "create:block/rotation_chassis_side_y", "x": 0, "y": 270 } + }, + { "when": { "axis": "z", "sticky_east": "false" }, + "apply": { "model": "create:block/rotation_chassis_side_z", "x": 0, "y": 0 } + }, + + { "when": { "axis": "x", "sticky_east": "true" }, + "apply": { "model": "create:block/rotation_chassis_side_x_sticky", "x": 270, "y": 0 } + }, + { "when": { "axis": "y", "sticky_east": "true" }, + "apply": { "model": "create:block/rotation_chassis_side_y_sticky", "x": 0, "y": 270 } + }, + { "when": { "axis": "z", "sticky_east": "true" }, + "apply": { "model": "create:block/rotation_chassis_side_z_sticky", "x": 0, "y": 0 } + }, + + + { "when": { "axis": "x", "sticky_west": "false" }, + "apply": { "model": "create:block/rotation_chassis_side_x", "x": 90, "y": 0 } + }, + { "when": { "axis": "y", "sticky_west": "false" }, + "apply": { "model": "create:block/rotation_chassis_side_y", "x": 0, "y": 90 } + }, + { "when": { "axis": "z", "sticky_west": "false" }, + "apply": { "model": "create:block/rotation_chassis_side_z", "x": 0, "y": 180 } + }, + + { "when": { "axis": "x", "sticky_west": "true" }, + "apply": { "model": "create:block/rotation_chassis_side_x_sticky", "x": 90, "y": 0 } + }, + { "when": { "axis": "y", "sticky_west": "true" }, + "apply": { "model": "create:block/rotation_chassis_side_y_sticky", "x": 0, "y": 90 } + }, + { "when": { "axis": "z", "sticky_west": "true" }, + "apply": { "model": "create:block/rotation_chassis_side_z_sticky", "x": 0, "y": 180 } + } + + ] +} diff --git a/src/main/resources/assets/create/blockstates/sticky_construct.json b/src/main/resources/assets/create/blockstates/sticky_construct.json deleted file mode 100644 index c86cac3d7..000000000 --- a/src/main/resources/assets/create/blockstates/sticky_construct.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "forgemarker": 1, - "defaults": { - "model": "create:block/construct_sticky" - }, - "variants": { - "axis=y": { "model": "create:block/construct_sticky" }, - "axis=z": { "model": "create:block/construct_sticky", "x": 90 }, - "axis=x": { "model": "create:block/construct_sticky", "x": 90, "y": 90 } - } -} \ No newline at end of file diff --git a/src/main/resources/assets/create/blockstates/translation_chassis.json b/src/main/resources/assets/create/blockstates/translation_chassis.json new file mode 100644 index 000000000..1a45f99a8 --- /dev/null +++ b/src/main/resources/assets/create/blockstates/translation_chassis.json @@ -0,0 +1,17 @@ +{ + "forge_marker": 1, + "variants": { + "axis=x,sticky_top=false,sticky_bottom=false": { "model": "create:block/translation_chassis", "x": 90, "y": 90 }, + "axis=x,sticky_top=true,sticky_bottom=false": { "model": "create:block/translation_chassis_top_sticky", "x": 90, "y": 90 }, + "axis=x,sticky_top=false,sticky_bottom=true": { "model": "create:block/translation_chassis_bottom_sticky", "x": 90, "y": 90 }, + "axis=x,sticky_top=true,sticky_bottom=true": { "model": "create:block/translation_chassis_both_sticky", "x": 90, "y": 90 }, + "axis=y,sticky_top=false,sticky_bottom=false": { "model": "create:block/translation_chassis" }, + "axis=y,sticky_top=true,sticky_bottom=false": { "model": "create:block/translation_chassis_top_sticky" }, + "axis=y,sticky_top=false,sticky_bottom=true": { "model": "create:block/translation_chassis_bottom_sticky" }, + "axis=y,sticky_top=true,sticky_bottom=true": { "model": "create:block/translation_chassis_both_sticky" }, + "axis=z,sticky_top=false,sticky_bottom=false": { "model": "create:block/translation_chassis", "x": 90, "y": 180 }, + "axis=z,sticky_top=true,sticky_bottom=false": { "model": "create:block/translation_chassis_top_sticky", "x": 90, "y": 180 }, + "axis=z,sticky_top=false,sticky_bottom=true": { "model": "create:block/translation_chassis_bottom_sticky", "x": 90, "y": 180 }, + "axis=z,sticky_top=true,sticky_bottom=true": { "model": "create:block/translation_chassis_both_sticky", "x": 90, "y": 180 } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/lang/en_us.json b/src/main/resources/assets/create/lang/en_us.json index 783fb674a..19fef40fa 100644 --- a/src/main/resources/assets/create/lang/en_us.json +++ b/src/main/resources/assets/create/lang/en_us.json @@ -21,6 +21,10 @@ "item.create.blazing_axe": "Blazing Axe", "item.create.blazing_sword": "Blazing Longsword", + "item.create.shadow_steel_pickaxe": "Shadow Steel Pickaxe", + "item.create.shadow_steel_mattock": "Shadow Steel Garden Mattock", + "item.create.shadow_steel_sword": "Shadow Steel Sword", + "item.create.rose_quartz_pickaxe": "Gilded Quartz Pickaxe", "item.create.rose_quartz_shovel": "Gilded Quartz Shovel", "item.create.rose_quartz_axe": "Gilded Quartz Axe", @@ -47,9 +51,9 @@ "block.create.mechanical_piston": "Mechanical Piston", "block.create.mechanical_piston_head": "Mechanical Piston Head", "block.create.piston_pole": "Piston Extension Pole", - "block.create.construct": "Movement Chassis", - "block.create.sticky_construct": "Sticky Chassis", - "block.create.relocation_construct": "Relocation Chassis", + "block.create.mechanical_bearing": "Mechanical Bearing", + "block.create.translation_chassis": "Translation Chassis", + "block.create.rotation_chassis": "Rotation Chassis", "block.create.contact": "Redstone Contact", "block.create.redstone_bridge": "Redstone Bridge", diff --git a/src/main/resources/assets/create/models/block/construct.json b/src/main/resources/assets/create/models/block/construct.json deleted file mode 100644 index 465253f9f..000000000 --- a/src/main/resources/assets/create/models/block/construct.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)", - "parent": "block/cube", - "textures": { - "particle": "create:block/construct_side", - "0": "create:block/construct_side", - "1": "block/stripped_spruce_log_top", - "2": "block/stripped_spruce_log" - }, - "elements": [ - { - "name": "Bottom", - "from": [ 0.0, 0.0, 0.0 ], - "to": [ 16.0, 3.0, 16.0 ], - "faces": { - "north": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 3.0 ] }, - "east": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 3.0 ] }, - "south": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 3.0 ] }, - "west": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 3.0 ] }, - "up": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, - "down": { "texture": "#2", "uv": [ 0.0, 0.0, 16.0, 16.0 ] } - } - }, - { - "name": "Top", - "from": [ 0.0, 13.0, 0.0 ], - "to": [ 16.0, 16.0, 16.0 ], - "faces": { - "north": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 3.0 ] }, - "east": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 3.0 ] }, - "south": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 3.0 ] }, - "west": { "texture": "#0", "uv": [ 0.0, 0.0, 16.0, 3.0 ] }, - "up": { "texture": "#2", "uv": [ 0.0, 0.0, 16.0, 16.0 ] }, - "down": { "texture": "#1", "uv": [ 0.0, 0.0, 16.0, 16.0 ] } - } - }, - { - "name": "Core", - "from": [ 2.0, 3.0, 2.0 ], - "to": [ 14.0, 13.0, 14.0 ], - "faces": { - "north": { "texture": "#inner", "uv": [ 2.0, 0.0, 14.0, 10.0 ] }, - "east": { "texture": "#inner", "uv": [ 2.0, 0.0, 14.0, 10.0 ] }, - "south": { "texture": "#inner", "uv": [ 2.0, 0.0, 14.0, 10.0 ] }, - "west": { "texture": "#inner", "uv": [ 2.0, 0.0, 14.0, 10.0 ] } - } - }, - { - "name": "Coat", - "from": [ 0.0, 3.0, 0.0 ], - "to": [ 16.0, 13.0, 16.0 ], - "faces": { - "north": { "texture": "#0", "uv": [ 0.0, 3.0, 16.0, 13.0 ], "cullface": "north" }, - "east": { "texture": "#0", "uv": [ 0.0, 3.0, 16.0, 13.0 ], "cullface": "east" }, - "south": { "texture": "#0", "uv": [ 0.0, 3.0, 16.0, 13.0 ], "cullface": "south" }, - "west": { "texture": "#0", "uv": [ 0.0, 3.0, 16.0, 13.0 ], "cullface": "west" } - } - } - ] -} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/construct_normal.json b/src/main/resources/assets/create/models/block/construct_normal.json deleted file mode 100644 index 81e185184..000000000 --- a/src/main/resources/assets/create/models/block/construct_normal.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "create:block/construct", - "textures": { - "inner": "block/cobblestone" - } -} diff --git a/src/main/resources/assets/create/models/block/construct_relocating.json b/src/main/resources/assets/create/models/block/construct_relocating.json deleted file mode 100644 index 93e8210dc..000000000 --- a/src/main/resources/assets/create/models/block/construct_relocating.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "create:block/construct", - "textures": { - "inner": "block/purpur_pillar" - } -} diff --git a/src/main/resources/assets/create/models/block/construct_sticky.json b/src/main/resources/assets/create/models/block/construct_sticky.json deleted file mode 100644 index 6c8dc68ad..000000000 --- a/src/main/resources/assets/create/models/block/construct_sticky.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "create:block/construct", - "textures": { - "inner": "block/slime_block" - } -} diff --git a/src/main/resources/assets/create/models/block/mechanical_bearing_base.json b/src/main/resources/assets/create/models/block/mechanical_bearing_base.json new file mode 100644 index 000000000..ab4d568e6 --- /dev/null +++ b/src/main/resources/assets/create/models/block/mechanical_bearing_base.json @@ -0,0 +1,67 @@ +{ + "__comment": "Model generated using MrCrayfish's Model Creator (https://mrcrayfish.com/tools?id=mc)", + "textures": { + "particle": "create:block/bearing_side", + "gearbox": "create:block/gearbox", + "bearing_side": "create:block/bearing_side" + }, + "elements": [ + { + "name": "Side", + "from": [ 0, 0, 0 ], + "to": [ 2, 12, 16 ], + "faces": { + "north": { "texture": "#bearing_side", "uv": [ 13, 4, 16, 16 ] }, + "east": { "texture": "#bearing_side", "uv": [ 0, 4, 16, 16 ] }, + "south": { "texture": "#bearing_side", "uv": [ 0, 4, 2, 16 ] }, + "west": { "texture": "#bearing_side", "uv": [ 0, 4, 16, 16 ] }, + "up": { "texture": "#gearbox", "uv": [ 0, 0, 2, 16 ] }, + "down": { "texture": "#gearbox", "uv": [ 0, 0, 2, 16 ] } + } + }, + { + "name": "Side", + "from": [ 14, 0, 0 ], + "to": [ 16, 12, 16 ], + "faces": { + "north": { "texture": "#bearing_side", "uv": [ 0, 4, 2, 16 ] }, + "east": { "texture": "#bearing_side", "uv": [ 0, 4, 16, 16 ] }, + "south": { "texture": "#bearing_side", "uv": [ 14, 4, 16, 16 ] }, + "west": { "texture": "#bearing_side", "uv": [ 0, 4, 16, 16 ] }, + "up": { "texture": "#gearbox", "uv": [ 14, 0, 16, 16 ] }, + "down": { "texture": "#gearbox", "uv": [ 14, 0, 16, 16 ] } + } + }, + { + "name": "Side", + "from": [ 2, 0, 0 ], + "to": [ 14, 12, 2 ], + "faces": { + "north": { "texture": "#bearing_side", "uv": [ 2, 4, 14, 16 ] }, + "south": { "texture": "#bearing_side", "uv": [ 2, 4, 14, 16 ] }, + "up": { "texture": "#gearbox", "uv": [ 2, 0, 14, 2 ] }, + "down": { "texture": "#gearbox", "uv": [ 2, 14, 14, 16 ] } + } + }, + { + "name": "Side", + "from": [ 2, 0, 14 ], + "to": [ 14, 12, 16 ], + "faces": { + "north": { "texture": "#bearing_side", "uv": [ 2, 4, 14, 16 ] }, + "south": { "texture": "#bearing_side", "uv": [ 2, 4, 14, 16 ] }, + "up": { "texture": "#gearbox", "uv": [ 2, 14, 14, 16 ] }, + "down": { "texture": "#gearbox", "uv": [ 2, 0, 14, 2 ] } + } + }, + { + "name": "Core", + "from": [ 2, 1, 2 ], + "to": [ 14, 12, 14 ], + "faces": { + "up": { "texture": "#gearbox", "uv": [ 2, 2, 14, 14 ] }, + "down": { "texture": "#gearbox", "uv": [ 2, 2, 14, 14 ] } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/mechanical_bearing_top.json b/src/main/resources/assets/create/models/block/mechanical_bearing_top.json new file mode 100644 index 000000000..34ec58c56 --- /dev/null +++ b/src/main/resources/assets/create/models/block/mechanical_bearing_top.json @@ -0,0 +1,23 @@ +{ + "__comment": "Model generated using MrCrayfish's Model Creator (https://mrcrayfish.com/tools?id=mc)", + "textures": { + "particle": "create:block/bearing_side", + "bearing_top": "create:block/bearing_top", + "bearing_side": "create:block/bearing_side" + }, + "elements": [ + { + "name": "Top", + "from": [ 0, 12, 0 ], + "to": [ 16, 16, 16 ], + "faces": { + "north": { "texture": "#bearing_side", "uv": [ 0, 0, 16, 4 ] }, + "east": { "texture": "#bearing_side", "uv": [ 0, 0, 16, 4 ] }, + "south": { "texture": "#bearing_side", "uv": [ 0, 0, 16, 4 ] }, + "west": { "texture": "#bearing_side", "uv": [ 0, 0, 16, 4 ] }, + "up": { "texture": "#bearing_top", "uv": [ 0, 0, 16, 16 ] }, + "down": { "texture": "#bearing_top", "uv": [ 0, 0, 16, 16 ] } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/rotation_chassis_base.json b/src/main/resources/assets/create/models/block/rotation_chassis_base.json new file mode 100644 index 000000000..cb3ee690f --- /dev/null +++ b/src/main/resources/assets/create/models/block/rotation_chassis_base.json @@ -0,0 +1,18 @@ +{ + "__comment": "Model generated using MrCrayfish's Model Creator (https://mrcrayfish.com/tools?id=mc)", + "textures": { + "particle": "create:block/rotation_chassis_side", + "rotation_chassis_top": "create:block/rotation_chassis_top" + }, + "elements": [ + { + "name": "Cube", + "from": [ 0, 0, 0 ], + "to": [ 16, 16, 16 ], + "faces": { + "up": { "texture": "#rotation_chassis_top", "uv": [ 0, 0, 16, 16 ] }, + "down": { "texture": "#rotation_chassis_top", "uv": [ 0, 0, 16, 16 ] } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/rotation_chassis_side_x.json b/src/main/resources/assets/create/models/block/rotation_chassis_side_x.json new file mode 100644 index 000000000..c427f4e21 --- /dev/null +++ b/src/main/resources/assets/create/models/block/rotation_chassis_side_x.json @@ -0,0 +1,16 @@ +{ + "__comment": "Model generated using MrCrayfish's Model Creator (https://mrcrayfish.com/tools?id=mc)", + "textures": { + "rotation_chassis_side": "create:block/rotation_chassis_side" + }, + "elements": [ + { + "name": "Cube", + "from": [ 0, 0, 0 ], + "to": [ 16, 16, 16 ], + "faces": { + "up": { "texture": "#rotation_chassis_side", "uv": [ 0, 0, 16, 16 ], "rotation": 90 } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/rotation_chassis_side_x_sticky.json b/src/main/resources/assets/create/models/block/rotation_chassis_side_x_sticky.json new file mode 100644 index 000000000..86f40dbed --- /dev/null +++ b/src/main/resources/assets/create/models/block/rotation_chassis_side_x_sticky.json @@ -0,0 +1,6 @@ +{ + "parent": "create:block/rotation_chassis_side_x", + "textures": { + "rotation_chassis_side": "create:block/rotation_chassis_side_sticky" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/rotation_chassis_side_y.json b/src/main/resources/assets/create/models/block/rotation_chassis_side_y.json new file mode 100644 index 000000000..7f6677b78 --- /dev/null +++ b/src/main/resources/assets/create/models/block/rotation_chassis_side_y.json @@ -0,0 +1,16 @@ +{ + "__comment": "Model generated using MrCrayfish's Model Creator (https://mrcrayfish.com/tools?id=mc)", + "textures": { + "rotation_chassis_side": "create:block/rotation_chassis_side" + }, + "elements": [ + { + "name": "Cube", + "from": [ 0, 0, 0 ], + "to": [ 16, 16, 16 ], + "faces": { + "south": { "texture": "#rotation_chassis_side", "uv": [ 0, 0, 16, 16 ] } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/rotation_chassis_side_y_sticky.json b/src/main/resources/assets/create/models/block/rotation_chassis_side_y_sticky.json new file mode 100644 index 000000000..d4a4f68ce --- /dev/null +++ b/src/main/resources/assets/create/models/block/rotation_chassis_side_y_sticky.json @@ -0,0 +1,6 @@ +{ + "parent": "create:block/rotation_chassis_side_y", + "textures": { + "rotation_chassis_side": "create:block/rotation_chassis_side_sticky" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/rotation_chassis_side_z.json b/src/main/resources/assets/create/models/block/rotation_chassis_side_z.json new file mode 100644 index 000000000..ae1800c80 --- /dev/null +++ b/src/main/resources/assets/create/models/block/rotation_chassis_side_z.json @@ -0,0 +1,16 @@ +{ + "__comment": "Model generated using MrCrayfish's Model Creator (https://mrcrayfish.com/tools?id=mc)", + "textures": { + "rotation_chassis_side": "create:block/rotation_chassis_side" + }, + "elements": [ + { + "name": "Cube", + "from": [ 0, 0, 0 ], + "to": [ 16, 16, 16 ], + "faces": { + "east": { "texture": "#rotation_chassis_side", "uv": [ 0, 0, 16, 16 ], "rotation": 270 } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/rotation_chassis_side_z_sticky.json b/src/main/resources/assets/create/models/block/rotation_chassis_side_z_sticky.json new file mode 100644 index 000000000..917d6e787 --- /dev/null +++ b/src/main/resources/assets/create/models/block/rotation_chassis_side_z_sticky.json @@ -0,0 +1,6 @@ +{ + "parent": "create:block/rotation_chassis_side_z", + "textures": { + "rotation_chassis_side": "create:block/rotation_chassis_side_sticky" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/translation_chassis.json b/src/main/resources/assets/create/models/block/translation_chassis.json new file mode 100644 index 000000000..23c7defcf --- /dev/null +++ b/src/main/resources/assets/create/models/block/translation_chassis.json @@ -0,0 +1,8 @@ +{ + "parent": "block/cube_bottom_top", + "textures": { + "bottom": "create:block/translation_chassis_top", + "top": "create:block/translation_chassis_top", + "side": "create:block/translation_chassis_side" + } +} diff --git a/src/main/resources/assets/create/models/block/translation_chassis_both_sticky.json b/src/main/resources/assets/create/models/block/translation_chassis_both_sticky.json new file mode 100644 index 000000000..0a2407b98 --- /dev/null +++ b/src/main/resources/assets/create/models/block/translation_chassis_both_sticky.json @@ -0,0 +1,7 @@ +{ + "parent": "create:block/translation_chassis", + "textures": { + "bottom": "create:block/translation_chassis_top_sticky", + "top": "create:block/translation_chassis_top_sticky" + } +} diff --git a/src/main/resources/assets/create/models/block/translation_chassis_bottom_sticky.json b/src/main/resources/assets/create/models/block/translation_chassis_bottom_sticky.json new file mode 100644 index 000000000..d5e5c5fac --- /dev/null +++ b/src/main/resources/assets/create/models/block/translation_chassis_bottom_sticky.json @@ -0,0 +1,6 @@ +{ + "parent": "create:block/translation_chassis", + "textures": { + "bottom": "create:block/translation_chassis_top_sticky" + } +} diff --git a/src/main/resources/assets/create/models/block/translation_chassis_top_sticky.json b/src/main/resources/assets/create/models/block/translation_chassis_top_sticky.json new file mode 100644 index 000000000..0d04fcbcb --- /dev/null +++ b/src/main/resources/assets/create/models/block/translation_chassis_top_sticky.json @@ -0,0 +1,6 @@ +{ + "parent": "create:block/translation_chassis", + "textures": { + "top": "create:block/translation_chassis_top_sticky" + } +} diff --git a/src/main/resources/assets/create/models/item/construct.json b/src/main/resources/assets/create/models/item/construct.json deleted file mode 100644 index 78398ef35..000000000 --- a/src/main/resources/assets/create/models/item/construct.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "create:block/construct_normal" -} diff --git a/src/main/resources/assets/create/models/item/mechanical_bearing.json b/src/main/resources/assets/create/models/item/mechanical_bearing.json new file mode 100644 index 000000000..3b4733de5 --- /dev/null +++ b/src/main/resources/assets/create/models/item/mechanical_bearing.json @@ -0,0 +1,82 @@ +{ + "__comment": "Model generated using MrCrayfish's Model Creator (https://mrcrayfish.com/tools?id=mc)", + "parent": "block/block", + "textures": { + "particle": "create:block/bearing_side", + "bearing_top": "create:block/bearing_top", + "gearbox": "create:block/gearbox", + "bearing_side": "create:block/bearing_side" + }, + "elements": [ + { + "name": "Side", + "from": [ 0, 0, 0 ], + "to": [ 2, 12, 16 ], + "faces": { + "north": { "texture": "#bearing_side", "uv": [ 13, 4, 16, 16 ] }, + "east": { "texture": "#bearing_side", "uv": [ 0, 4, 16, 16 ] }, + "south": { "texture": "#bearing_side", "uv": [ 0, 4, 2, 16 ] }, + "west": { "texture": "#bearing_side", "uv": [ 0, 4, 16, 16 ] }, + "up": { "texture": "#gearbox", "uv": [ 0, 0, 2, 16 ] }, + "down": { "texture": "#gearbox", "uv": [ 0, 0, 2, 16 ] } + } + }, + { + "name": "Side", + "from": [ 14, 0, 0 ], + "to": [ 16, 12, 16 ], + "faces": { + "north": { "texture": "#bearing_side", "uv": [ 0, 4, 2, 16 ] }, + "east": { "texture": "#bearing_side", "uv": [ 0, 4, 16, 16 ] }, + "south": { "texture": "#bearing_side", "uv": [ 14, 4, 16, 16 ] }, + "west": { "texture": "#bearing_side", "uv": [ 0, 4, 16, 16 ] }, + "up": { "texture": "#gearbox", "uv": [ 14, 0, 16, 16 ] }, + "down": { "texture": "#gearbox", "uv": [ 14, 0, 16, 16 ] } + } + }, + { + "name": "Side", + "from": [ 2, 0, 0 ], + "to": [ 14, 12, 2 ], + "faces": { + "north": { "texture": "#bearing_side", "uv": [ 2, 4, 14, 16 ] }, + "south": { "texture": "#bearing_side", "uv": [ 2, 4, 14, 16 ] }, + "up": { "texture": "#gearbox", "uv": [ 2, 0, 14, 2 ] }, + "down": { "texture": "#gearbox", "uv": [ 2, 14, 14, 16 ] } + } + }, + { + "name": "Side", + "from": [ 2, 0, 14 ], + "to": [ 14, 12, 16 ], + "faces": { + "north": { "texture": "#bearing_side", "uv": [ 2, 4, 14, 16 ] }, + "south": { "texture": "#bearing_side", "uv": [ 2, 4, 14, 16 ] }, + "up": { "texture": "#gearbox", "uv": [ 2, 14, 14, 16 ] }, + "down": { "texture": "#gearbox", "uv": [ 2, 0, 14, 2 ] } + } + }, + { + "name": "Core", + "from": [ 2, 1, 2 ], + "to": [ 14, 12, 14 ], + "faces": { + "up": { "texture": "#gearbox", "uv": [ 2, 2, 14, 14 ] }, + "down": { "texture": "#gearbox", "uv": [ 2, 2, 14, 14 ] } + } + }, + { + "name": "Top", + "from": [ 0, 12, 0 ], + "to": [ 16, 16, 16 ], + "faces": { + "north": { "texture": "#bearing_side", "uv": [ 0, 0, 16, 4 ] }, + "east": { "texture": "#bearing_side", "uv": [ 0, 0, 16, 4 ] }, + "south": { "texture": "#bearing_side", "uv": [ 0, 0, 16, 4 ] }, + "west": { "texture": "#bearing_side", "uv": [ 0, 0, 16, 4 ] }, + "up": { "texture": "#bearing_top", "uv": [ 0, 0, 16, 16 ] }, + "down": { "texture": "#bearing_top", "uv": [ 0, 0, 16, 16 ] } + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/relocation_construct.json b/src/main/resources/assets/create/models/item/relocation_construct.json deleted file mode 100644 index b4a1d5167..000000000 --- a/src/main/resources/assets/create/models/item/relocation_construct.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "create:block/construct_relocating" -} diff --git a/src/main/resources/assets/create/models/item/rotation_chassis.json b/src/main/resources/assets/create/models/item/rotation_chassis.json new file mode 100644 index 000000000..768e670ed --- /dev/null +++ b/src/main/resources/assets/create/models/item/rotation_chassis.json @@ -0,0 +1,8 @@ +{ + "parent": "block/cube_bottom_top", + "textures": { + "bottom": "create:block/rotation_chassis_top", + "top": "create:block/rotation_chassis_top", + "side": "create:block/rotation_chassis_side" + } +} diff --git a/src/main/resources/assets/create/models/item/shadow_steel_mattock.json b/src/main/resources/assets/create/models/item/shadow_steel_mattock.json new file mode 100644 index 000000000..208f58b8c --- /dev/null +++ b/src/main/resources/assets/create/models/item/shadow_steel_mattock.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "create:item/shadow_steel_mattock" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/shadow_steel_pickaxe.json b/src/main/resources/assets/create/models/item/shadow_steel_pickaxe.json new file mode 100644 index 000000000..e43a556d2 --- /dev/null +++ b/src/main/resources/assets/create/models/item/shadow_steel_pickaxe.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "create:item/shadow_steel_pickaxe" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/shadow_steel_sword.json b/src/main/resources/assets/create/models/item/shadow_steel_sword.json new file mode 100644 index 000000000..c30f569c8 --- /dev/null +++ b/src/main/resources/assets/create/models/item/shadow_steel_sword.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "create:item/shadow_steel_sword" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/sticky_construct.json b/src/main/resources/assets/create/models/item/sticky_construct.json deleted file mode 100644 index 866300efb..000000000 --- a/src/main/resources/assets/create/models/item/sticky_construct.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "parent": "create:block/construct_sticky" -} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/translation_chassis.json b/src/main/resources/assets/create/models/item/translation_chassis.json new file mode 100644 index 000000000..186d53604 --- /dev/null +++ b/src/main/resources/assets/create/models/item/translation_chassis.json @@ -0,0 +1,3 @@ +{ + "parent": "create:block/translation_chassis" +} \ No newline at end of file diff --git a/src/main/resources/assets/create/textures/block/bearing_side.png b/src/main/resources/assets/create/textures/block/bearing_side.png new file mode 100644 index 0000000000000000000000000000000000000000..a627b3a15dafd19fb58c2ea25eb21e615f666e00 GIT binary patch literal 487 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0eneBK~y+TWm3yd z!ax+Af!bk8rBEO7k(i(+E_|%qldxsylEf8>U*@m)1?tv?F2JavpthZM3ZCIM1M1E6 zaH%X4GZS_6xs016?1R^VDD zgkeb5)gYx5kSyRJQ52bkPN%a7SjwN;lxc+zZU!a&Eht8WCb4J|jt-CGM7gd5cTvo; zELry(dOmkJhb5XsvL00V%&Ar%9`8*MVRwgB}9b474hQ dELLTV{QxM!(ds41hB*KL002ovPDHLkV1gNT$|V2* literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/block/bearing_top.png b/src/main/resources/assets/create/textures/block/bearing_top.png new file mode 100644 index 0000000000000000000000000000000000000000..9177285df2338ff8f467199600209e97f50fc056 GIT binary patch literal 449 zcmV;y0Y3hTP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0ai&wK~y+TWs*xz z!ax*-r|lF9R!ty=$W{}6Mw2f1|63Aa;X)S%d{Cg3R{X|;W0AACJ$L3l&h6YF%d#kn zthIMn%dU;ney7-eR`tHkjWM&;H8E9HxrE_i#gP!l@qX_j&Ix$4HQIyhT4asjeKJ~WjN{PlR4 zikMF5`v8}KM0}bIQcDL;qA>WmHSXk>t8U2OkS`!(z1dN+tXv6B;JTtN!6AQ*RIfxq z6kZjzPRPe<9)gdOu!#0Sfe?Xz; zVZ5a4<~~Z&ssM^ft1R#{=qah|hMs>6as0bbl}tvGLeL(M6%3}+X<9zZr>W$f6QM|M rgFMe!sk*LNs`g5^IiUz4rfHgQeF@6Ag`nUD00000NkvXXu0mjfQR~Kz literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/block/construct_side.png b/src/main/resources/assets/create/textures/block/construct_side.png deleted file mode 100644 index fbd5e6131084146db21729c48eb8daae895f74ae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 545 zcmV++0^a?JP)N2bZe?^J zG%hhNHvLWs=l}o#pGibPR5(v{lig0jKoEudLS7Jw`T&LmywMAdLQFIyB8t&~T4*V> z5NHdOBL4zW#OP~|J40qIO=$9U_sp4{-7buhIg7yc$qwMipboRmSDr4S6vS~Gys(to zhuYNvfpd&0siQqOjYr`)7NLjhyiCIH&liYC34$?XxtwqH(>G~Q@YQr| z=yW?WX*?NF%&3~6S1Pbvy+dy}kp5`gCr=j8jWVcO8T@_^K0c>Vsaryq{;d;)N;We+8&k?MU+YRn7fQa6U12fHkHzDsb7H8&O` j+nEXKU}D%?>j?Y-bOdQ}kwt`G00000NkvXXu0mjf^0Vd{ diff --git a/src/main/resources/assets/create/textures/block/rotation_chassis_side.png b/src/main/resources/assets/create/textures/block/rotation_chassis_side.png new file mode 100644 index 0000000000000000000000000000000000000000..bf9d01277c86813e7cdb900a003cba3301cf1f0c GIT binary patch literal 511 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0hCEZK~y+TU6L_N z!%z^%(~wkCt07be9Sj&J5$hn;QP9c3rF0hj0)m@<0A2k8>gp`wCUjJBP%52N(7{r) z6s0CL4aHx2<%RmEz1-cq_rL$U_fo}T(eu1ot(Fa{yN74Zdj0fhN9!RsHnO#MOy>M# z|Fz@VwoRE1eBWnz$S_%x(&BoaAC6=i-#><7^j5S~sZ??tCkO&MNDAWRx!h+vdVcvL zq#D~EU2t8uQmN=_D}c4IIE7Pp)UG4V%9WKV0oIyNjL_jtZH^iX>6dNnk>M$U_I6e?a3`B|e zN}Eg{Imw}cs=K^?LyY)p5`uw?6F$HVG9{F#dlaG9)002ovPDHLkV1kEu B;2Hn` literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/block/rotation_chassis_side_sticky.png b/src/main/resources/assets/create/textures/block/rotation_chassis_side_sticky.png new file mode 100644 index 0000000000000000000000000000000000000000..9f48bdcd46dfdb78edd1440d0ccd0484500af3fc GIT binary patch literal 565 zcmV-50?Pe~P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!TuwH|gG5OwA`KZX zl4i;jYpZQ-KJOk`d~5H%d!Fy}Jm2SiXYl*|E|)7Bjoup1Ld!cJvDnty>}_3M)3lzr zZEPt>WGXn(lJ(l{c4Rt8CX=LX6;^T()H4gygZ}=#{F_8NzeT<=H3nBe9lLW{oFoLCa*`1zrlM$3+~1cXg!j1HgYUK_o* z#^MgbNYnnXN=0N>blj4pI0fqA_@V)4Z~Fi>=-BoC=Aj@^(}>9JW2d+@e$dIaqGojn zqYB9)iVr7XOHSrckCUT|1AapOJe)9qnk|P6mEui;Jctm1p3P>3afx&FE9>K%$K?sU z5y84dAel@?WO^=_lUoAv-{fEIyNb(uNd(YW8PT+F&>rbZz;l%R00000NkvXXu0mjf DZqELM literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/block/rotation_chassis_top.png b/src/main/resources/assets/create/textures/block/rotation_chassis_top.png new file mode 100644 index 0000000000000000000000000000000000000000..a4eef9d8a495391d1c41c20a03ec2648219e6f9f GIT binary patch literal 536 zcmV+z0_XjSP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0j)_yK~y+TZBji? z!cY_~uRQ333bB|pvbdPwVxoV<*^oFWiL1s0;pX1^?$^2RrfT~&DFW|29i816?e^`}33)nwi#*pC2VQB@wrwFqm|#3V zQUt&`_dM@k1yEMj)162g@N@qeQP_!Ft_wW);XO6^kxulXJWmwz?l-Q!KV?@|!qN!^{ABbiAY&>3~{m27M86sg#QGYPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0c%M_K~y+TwUSM4 z!Y~kpofrZR0aOS@Vu4hoZhM7t2iDwxOVh3@q&DQwKZ%{bWKxQ{?_1cP$8Tor#NOd> zV0Q|Fpr=m8n4W&*olYlAaU7Rr8HOPkfRUI)5dyy7@2jdxl0+$`wI*=RkqKK6SplfR zce|an77oripew`xc_$>36%lZnrrztbxTMu67?#R}<3MIwOh@4DDtf!*h)`UcYBd|C zit(4HCG&%-w)0uEeh|_&VJOgK^SDR~yz_!~OF|M#mso*JOnZ#aL-I zowS)?+9LThS=FDOOp9pnnb#CSK1LLxr4L6b6=<`JZYC00A>53*FsgU zhRr)3k9}?@A=*pdBxQe%oBsbTwa?r4+p7--zuyj`hkd_Q*R^x*8*um+TQCikI{*Lx M07*qoM6N<$g05A^Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0v$<2K~y+TZBk8Z z6HyeMW~S3TGqE$B*rXqckX9p8g-}H+DC$ndofX}=sHRZpMiiP~;Lep>U5cA-#f1uj zXoYS!o>J7vsRa7B^d1Y`}^kS=94G1rt1z4hJ8L?cqlfPng#P=>63teSmiSE=&!7^ zTPJ~j&fjGYw%-pBF#?9$Vhn;xN@%BA>#viegi#37ZRhg!bDHXvy1CCsF6HuTv_rYH zS>iI$KtE8GQ2gXb;%I2`P3HPkj7SQ-!Q4&j?Q-eH zWeqr6FiTELR%9Q$Lu{HxpU?|{cfdGM!g!n=XU}mPHLFHln!T4A7)~y|d)08`v#eK-NUiohUc)8i%ol@|7!06jG^ehe zM=4+qH6FThHXc*?fBgB|F}ResOsq!NC76Kja05?qm_Nv@WG;n=q96sV)UBJ-R{7$K zrw>sx84n)6yl|U)lD-2BNzx(lZu%MK&aSTf*(E7)6?s^ZJtlf)8rgPQ9)rJk*PAUf iBqDnyf-zpnaolfZVmI@e#!{950000Z~ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/block/translation_chassis_top_sticky.png b/src/main/resources/assets/create/textures/block/translation_chassis_top_sticky.png new file mode 100644 index 0000000000000000000000000000000000000000..32a69c6a01716d6e1b48aefeb9bf87280cbc05d3 GIT binary patch literal 772 zcmV+f1N;1mP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0+~rfK~y+TZIXXT z6LA#4Z?~=8%yU1Kn{I9DHgjyKwY2;}H4=%!f*>MH-5lDYU(4Rv2M`RRK z*bfkdvRK-fC6VH7xw)05V?T0kw(IV8w{^X7V*m6w9`Aj=?|t9DF5_2@=7G0CxtAPEmlaxR%2u`&80X@?pb)Bi86J zaM1d4<=ejs2K_GU@Ax}1EX5>WCP;>6=Gbht&A76-s@ze+V{A6YroL}ft86kkT1?Pt zv=L(CvU&Go-`pv8_wkd*RFyb~v4o|f##lq;vI>=)PHF*F2pX7tFxArD91ACIogTIrj4&mcTB8;x01Z$n+V2g*S6W^|d1*&SJs2S={eUk zbYlqKef{}WMY%ke;j6lrY(fh>;;*|E|T?mJinbe4B zi?m6PB2t9LbHGIc3%j-6;xfbbg5GvPM6&H72=W)Gk4{zn6wN9C0000Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0XIoRK~y+TV;~m% z|NkG#LIsRa8Yi%_a0Tl;dVCjLEh8gB8(srIn)S6!!R(7yPlFBdu#bd0Wyitgj7(5A z27qb)@b(QD3k%3Fi12Cu|NQGM!<$cU7|xu(1XhRD1<0De{P+zP`}OTRn1*Qtfj6J7 zB6$W1K!FAFBR9Jw*r_lt@bYjmgoK7OR8&vu#MDuV+!40~3`wm$C z$FKJcUw=La>%|!cFdH&*q8PgSYr%o2uByUdVyMT!!6pcn!wF!Ti;Ii@Z{EE5zc8;B zSO7#@8TrBacmYWB+qZB3>+0&l6=O31s~13;9UL4OK=|_I%V58PV#dna94wC)V6zzn z2s+>0F5*83gZzxH83yqB9i(~of79>&#E@1Su8=HiwxU3`Q<9!e86-96sXU zH{Z6>w#$MeVTOW^4o|A0gOk&tdUkg9ww4t|2Jx|>tq-5QwN4N>XmtI+FyYy%Ra$HU zb)R2qwY668Hr(Vnbbg*~bN009lN&aDkZ8y;_Swua|69Fzy7UGco&-~d>1PcNXrEzD zO=LWJ^yvTl`)Ys3hlhW+*Ki0lF!*wL^67viMm~p&EQe;B=O0@q+2P2rI!(Z#FMWkT mAj3QRl-`J7iChL|W`@>{J(nfhr{n+wkipZ{&t;ucLK6Up9hCC` literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/item/shadow_steel_sword.png b/src/main/resources/assets/create/textures/item/shadow_steel_sword.png new file mode 100644 index 0000000000000000000000000000000000000000..ad87571fe66a05d493f35463573911822101554f GIT binary patch literal 417 zcmV;S0bc%zP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0X9iQK~y+Tm5{wk z13?hSXJf4hks#<37>n4$H-9hpOdi1Ccj&|v(cgt(s9YrP!Pr?OIJqQBh`#xd(3)~+= zYi&Hw<8ImMC3Ae(G?;Ncd1xz;&(E%TGu9$}U%ODU5#Sx-FeOBvX~)lS_f#5Y00000 LNkvXXu0mjf>`|@o literal 0 HcmV?d00001