From d9d5e60606575d8e5d789f9ad41a8cbf0fb0b629 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Thu, 24 Sep 2020 13:39:12 +0200 Subject: [PATCH] Workstation transfer, Part I - Intermediate changes, probably doesn't even compile --- src/generated/resources/.cache/cache | 4 +- .../portable_storage_interface.json | 12 +- .../item/portable_storage_interface.json | 2 +- .../com/simibubi/create/AllBlockPartials.java | 4 + .../java/com/simibubi/create/AllBlocks.java | 8 +- .../java/com/simibubi/create/AllShapes.java | 3 +- .../com/simibubi/create/AllTileEntities.java | 489 +++++++++--------- .../actors/PortableStorageInterfaceBlock.java | 19 +- .../PortableStorageInterfaceMovement.java | 167 ++++++ .../PortableStorageInterfaceRenderer.java | 64 +++ .../PortableStorageInterfaceTileEntity.java | 56 ++ .../actors/StorageInterfaceMovement.java | 157 ------ .../create/foundation/config/CLogistics.java | 2 + .../portable_storage_interface/block.json | 63 +++ .../block_middle.json | 28 + .../block_middle_powered.json | 28 + .../portable_storage_interface/block_top.json | 120 +++++ .../brass_casing.png | Bin 0 -> 432 bytes .../portable_storage_interface/item.json | 238 +++++++++ .../portable_storage_interface.bbmodel | 1 + .../portable_storage_interface.png | Bin 0 -> 4142 bytes .../block/portable_storage_interface.png | Bin 0 -> 4142 bytes 22 files changed, 1051 insertions(+), 414 deletions(-) create mode 100644 src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceMovement.java create mode 100644 src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceRenderer.java create mode 100644 src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceTileEntity.java delete mode 100644 src/main/java/com/simibubi/create/content/contraptions/components/actors/StorageInterfaceMovement.java create mode 100644 src/main/resources/assets/create/models/block/portable_storage_interface/block.json create mode 100644 src/main/resources/assets/create/models/block/portable_storage_interface/block_middle.json create mode 100644 src/main/resources/assets/create/models/block/portable_storage_interface/block_middle_powered.json create mode 100644 src/main/resources/assets/create/models/block/portable_storage_interface/block_top.json create mode 100644 src/main/resources/assets/create/models/block/portable_storage_interface/brass_casing.png create mode 100644 src/main/resources/assets/create/models/block/portable_storage_interface/item.json create mode 100644 src/main/resources/assets/create/models/block/portable_storage_interface/portable_storage_interface.bbmodel create mode 100644 src/main/resources/assets/create/models/block/portable_storage_interface/portable_storage_interface.png create mode 100644 src/main/resources/assets/create/textures/block/portable_storage_interface.png diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index 10d8136e7..36b412ed4 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -291,7 +291,7 @@ c8467d55bc22d2e2256b8b732c06c9fdc64d336f assets/create/blockstates/polished_weat 5d811eab3c5e8411f98e2ea98d93d35955ce18fc assets/create/blockstates/polished_weathered_limestone_slab.json acec6cdebe772ca72de94a85d98199e827495acb assets/create/blockstates/polished_weathered_limestone_stairs.json f42ad32aefcfa7ccc6287f57ee1a5f092b65126f assets/create/blockstates/polished_weathered_limestone_wall.json -b7829c2ef2c47188713f8cab21b2c9bc7f9c5b79 assets/create/blockstates/portable_storage_interface.json +1b70b4e5792dccd2110b84e209016ac258005e28 assets/create/blockstates/portable_storage_interface.json 8296d43d5f1c2113012d127038fb319af83aaee4 assets/create/blockstates/powered_latch.json e8b0a401c10d1ba67ed71ba31bd5f9bc28571b65 assets/create/blockstates/powered_toggle_latch.json 3a739f9d4276828d83f2d2750bf3227c87bcd438 assets/create/blockstates/pulley_magnet.json @@ -1306,7 +1306,7 @@ e95125318055b8557afd7d108488cf0bdd81fe49 assets/create/models/item/polished_scor 68fb04f7a89c8117bb641e347df9bfc1f1248335 assets/create/models/item/polished_weathered_limestone_slab.json 6d92ee7112aa20e8a1adfe73d8933031c299bed1 assets/create/models/item/polished_weathered_limestone_stairs.json b4995fb4799f33508cd6bf2ded80c0b3e866ad43 assets/create/models/item/polished_weathered_limestone_wall.json -ef2c9dcd5f6385a0f0cdc2e9120c984827863100 assets/create/models/item/portable_storage_interface.json +3bc60b0d9884c2ee0f1dd530e90fceb699eea737 assets/create/models/item/portable_storage_interface.json d3cfc1a1137c4bc98848947d425d2972df144c95 assets/create/models/item/powdered_obsidian.json 1e501c1f2e9250aaaadcf17db62646d08177d4e1 assets/create/models/item/powered_latch.json 3a6dfc7f36e31ebfcd650c3144a7f2210e8a4f9f assets/create/models/item/powered_toggle_latch.json diff --git a/src/generated/resources/assets/create/blockstates/portable_storage_interface.json b/src/generated/resources/assets/create/blockstates/portable_storage_interface.json index 463c071a2..331749529 100644 --- a/src/generated/resources/assets/create/blockstates/portable_storage_interface.json +++ b/src/generated/resources/assets/create/blockstates/portable_storage_interface.json @@ -1,28 +1,28 @@ { "variants": { "facing=down": { - "model": "create:block/portable_storage_interface", + "model": "create:block/portable_storage_interface/block", "x": 180 }, "facing=up": { - "model": "create:block/portable_storage_interface" + "model": "create:block/portable_storage_interface/block" }, "facing=north": { - "model": "create:block/portable_storage_interface", + "model": "create:block/portable_storage_interface/block", "x": 90 }, "facing=south": { - "model": "create:block/portable_storage_interface", + "model": "create:block/portable_storage_interface/block", "x": 90, "y": 180 }, "facing=west": { - "model": "create:block/portable_storage_interface", + "model": "create:block/portable_storage_interface/block", "x": 90, "y": 270 }, "facing=east": { - "model": "create:block/portable_storage_interface", + "model": "create:block/portable_storage_interface/block", "x": 90, "y": 90 } diff --git a/src/generated/resources/assets/create/models/item/portable_storage_interface.json b/src/generated/resources/assets/create/models/item/portable_storage_interface.json index 87d2165ba..3330b9ffd 100644 --- a/src/generated/resources/assets/create/models/item/portable_storage_interface.json +++ b/src/generated/resources/assets/create/models/item/portable_storage_interface.json @@ -1,3 +1,3 @@ { - "parent": "create:block/portable_storage_interface" + "parent": "create:block/portable_storage_interface/item" } \ No newline at end of file diff --git a/src/main/java/com/simibubi/create/AllBlockPartials.java b/src/main/java/com/simibubi/create/AllBlockPartials.java index cc08122af..492ee1335 100644 --- a/src/main/java/com/simibubi/create/AllBlockPartials.java +++ b/src/main/java/com/simibubi/create/AllBlockPartials.java @@ -68,6 +68,10 @@ public class AllBlockPartials { SYMMETRY_PLANE = get("symmetry_effect/plane"), SYMMETRY_CROSSPLANE = get("symmetry_effect/crossplane"), SYMMETRY_TRIPLEPLANE = get("symmetry_effect/tripleplane"), + + PORTABLE_STORAGE_INTERFACE_MIDDLE = get("portable_storage_interface/block_middle"), + PORTABLE_STORAGE_INTERFACE_MIDDLE_POWERED = get("portable_storage_interface/block_middle_powered"), + PORTABLE_STORAGE_INTERFACE_TOP = get("portable_storage_interface/block_top"), ARM_COG = get("mechanical_arm/cog"), ARM_BASE = get("mechanical_arm/base"), ARM_LOWER_BODY = get("mechanical_arm/lower_body"), ARM_UPPER_BODY = get("mechanical_arm/upper_body"), diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index fba5eac5b..a73c72662 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -20,6 +20,7 @@ import com.simibubi.create.content.contraptions.components.actors.HarvesterMovem import com.simibubi.create.content.contraptions.components.actors.PloughBlock; import com.simibubi.create.content.contraptions.components.actors.PloughMovementBehaviour; import com.simibubi.create.content.contraptions.components.actors.PortableStorageInterfaceBlock; +import com.simibubi.create.content.contraptions.components.actors.PortableStorageInterfaceMovement; import com.simibubi.create.content.contraptions.components.actors.SawMovementBehaviour; import com.simibubi.create.content.contraptions.components.actors.SeatBlock; import com.simibubi.create.content.contraptions.components.actors.SeatMovementBehaviour; @@ -667,9 +668,10 @@ public class AllBlocks { public static final BlockEntry PORTABLE_STORAGE_INTERFACE = REGISTRATE.block("portable_storage_interface", PortableStorageInterfaceBlock::new) .initialProperties(SharedProperties::stone) -// .onRegister(addMovementBehaviour(new StorageInterfaceMovement())) - .blockstate(BlockStateGen.directionalBlockProvider(false)) - .simpleItem() + .blockstate((c, p) -> p.directionalBlock(c.get(), AssetLookup.partialBaseModel(c, p))) + .onRegister(addMovementBehaviour(new PortableStorageInterfaceMovement())) + .item() + .transform(customItemModel()) .register(); public static final BlockEntry MECHANICAL_HARVESTER = diff --git a/src/main/java/com/simibubi/create/AllShapes.java b/src/main/java/com/simibubi/create/AllShapes.java index 096b9bb76..f78e208ea 100644 --- a/src/main/java/com/simibubi/create/AllShapes.java +++ b/src/main/java/com/simibubi/create/AllShapes.java @@ -32,8 +32,7 @@ public class AllShapes { EIGHT_VOXEL_POLE = shape(4, 0, 4, 12, 16, 12).forAxis(), FURNACE_ENGINE = shape(1, 1, 0, 15, 15, 16).add(0, 0, 9, 16, 16, 14) .forHorizontal(Direction.SOUTH), - PORTABLE_STORAGE_INTERFACE = shape(0, 0, 0, 16, 12, 16).add(3, 12, 3, 13, 16, 13) - .forDirectional(), + PORTABLE_STORAGE_INTERFACE = shape(0, 0, 0, 16, 14, 16).forDirectional(), PULLEY = shape(0, 0, 0, 16, 16, 2).add(1, 1, 2, 15, 15, 14) .add(0, 0, 14, 16, 16, 16) .forHorizontalAxis(), diff --git a/src/main/java/com/simibubi/create/AllTileEntities.java b/src/main/java/com/simibubi/create/AllTileEntities.java index 2a1e145f2..2af986739 100644 --- a/src/main/java/com/simibubi/create/AllTileEntities.java +++ b/src/main/java/com/simibubi/create/AllTileEntities.java @@ -5,6 +5,8 @@ import com.simibubi.create.content.contraptions.components.actors.DrillRenderer; import com.simibubi.create.content.contraptions.components.actors.DrillTileEntity; import com.simibubi.create.content.contraptions.components.actors.HarvesterRenderer; import com.simibubi.create.content.contraptions.components.actors.HarvesterTileEntity; +import com.simibubi.create.content.contraptions.components.actors.PortableStorageInterfaceRenderer; +import com.simibubi.create.content.contraptions.components.actors.PortableStorageInterfaceTileEntity; import com.simibubi.create.content.contraptions.components.clock.CuckooClockRenderer; import com.simibubi.create.content.contraptions.components.clock.CuckooClockTileEntity; import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterRenderer; @@ -106,371 +108,380 @@ public class AllTileEntities { // Schematics public static final TileEntityEntry SCHEMATICANNON = Create.registrate() - .tileEntity("schematicannon", SchematicannonTileEntity::new) - .validBlocks(AllBlocks.SCHEMATICANNON) - .renderer(() -> SchematicannonRenderer::new) - .register(); + .tileEntity("schematicannon", SchematicannonTileEntity::new) + .validBlocks(AllBlocks.SCHEMATICANNON) + .renderer(() -> SchematicannonRenderer::new) + .register(); public static final TileEntityEntry SCHEMATIC_TABLE = Create.registrate() - .tileEntity("schematic_table", SchematicTableTileEntity::new) - .validBlocks(AllBlocks.SCHEMATIC_TABLE) - //.renderer(() -> renderer) - .register(); + .tileEntity("schematic_table", SchematicTableTileEntity::new) + .validBlocks(AllBlocks.SCHEMATIC_TABLE) + // .renderer(() -> renderer) + .register(); // Kinetics public static final TileEntityEntry SIMPLE_KINETIC = Create.registrate() - .tileEntity("simple_kinetic", SimpleKineticTileEntity::new) - .validBlocks(AllBlocks.SHAFT, AllBlocks.COGWHEEL, AllBlocks.LARGE_COGWHEEL, AllBlocks.ENCASED_SHAFT) - .renderer(() -> KineticTileEntityRenderer::new) - .register(); + .tileEntity("simple_kinetic", SimpleKineticTileEntity::new) + .validBlocks(AllBlocks.SHAFT, AllBlocks.COGWHEEL, AllBlocks.LARGE_COGWHEEL, AllBlocks.ENCASED_SHAFT) + .renderer(() -> KineticTileEntityRenderer::new) + .register(); public static final TileEntityEntry MOTOR = Create.registrate() - .tileEntity("motor", CreativeMotorTileEntity::new) - .validBlocks(AllBlocks.CREATIVE_MOTOR) - .renderer(() -> CreativeMotorRenderer::new) - .register(); + .tileEntity("motor", CreativeMotorTileEntity::new) + .validBlocks(AllBlocks.CREATIVE_MOTOR) + .renderer(() -> CreativeMotorRenderer::new) + .register(); public static final TileEntityEntry GEARBOX = Create.registrate() - .tileEntity("gearbox", GearboxTileEntity::new) - .validBlocks(AllBlocks.GEARBOX) - .renderer(() -> GearboxRenderer::new) - .register(); + .tileEntity("gearbox", GearboxTileEntity::new) + .validBlocks(AllBlocks.GEARBOX) + .renderer(() -> GearboxRenderer::new) + .register(); public static final TileEntityEntry ENCASED_SHAFT = Create.registrate() - .tileEntity("encased_shaft", EncasedShaftTileEntity::new) - .validBlocks(AllBlocks.ENCASED_SHAFT, AllBlocks.ENCASED_BELT) - .renderer(() -> EncasedShaftRenderer::new) - .register(); + .tileEntity("encased_shaft", EncasedShaftTileEntity::new) + .validBlocks(AllBlocks.ENCASED_SHAFT, AllBlocks.ENCASED_BELT) + .renderer(() -> EncasedShaftRenderer::new) + .register(); public static final TileEntityEntry ADJUSTABLE_PULLEY = Create.registrate() - .tileEntity("adjustable_pulley", AdjustablePulleyTileEntity::new) - .validBlocks(AllBlocks.ADJUSTABLE_PULLEY) - .renderer(() -> EncasedShaftRenderer::new) - .register(); + .tileEntity("adjustable_pulley", AdjustablePulleyTileEntity::new) + .validBlocks(AllBlocks.ADJUSTABLE_PULLEY) + .renderer(() -> EncasedShaftRenderer::new) + .register(); public static final TileEntityEntry ENCASED_FAN = Create.registrate() - .tileEntity("encased_fan", EncasedFanTileEntity::new) - .validBlocks(AllBlocks.ENCASED_FAN) - .renderer(() -> EncasedFanRenderer::new) - .register(); + .tileEntity("encased_fan", EncasedFanTileEntity::new) + .validBlocks(AllBlocks.ENCASED_FAN) + .renderer(() -> EncasedFanRenderer::new) + .register(); public static final TileEntityEntry NOZZLE = Create.registrate() - .tileEntity("nozzle", NozzleTileEntity::new) - .validBlocks(AllBlocks.NOZZLE) - //.renderer(() -> renderer) - .register(); + .tileEntity("nozzle", NozzleTileEntity::new) + .validBlocks(AllBlocks.NOZZLE) + // .renderer(() -> renderer) + .register(); public static final TileEntityEntry CLUTCH = Create.registrate() - .tileEntity("clutch", ClutchTileEntity::new) - .validBlocks(AllBlocks.CLUTCH) - .renderer(() -> SplitShaftRenderer::new) - .register(); + .tileEntity("clutch", ClutchTileEntity::new) + .validBlocks(AllBlocks.CLUTCH) + .renderer(() -> SplitShaftRenderer::new) + .register(); public static final TileEntityEntry GEARSHIFT = Create.registrate() - .tileEntity("gearshift", GearshiftTileEntity::new) - .validBlocks(AllBlocks.GEARSHIFT) - .renderer(() -> SplitShaftRenderer::new) - .register(); + .tileEntity("gearshift", GearshiftTileEntity::new) + .validBlocks(AllBlocks.GEARSHIFT) + .renderer(() -> SplitShaftRenderer::new) + .register(); public static final TileEntityEntry TURNTABLE = Create.registrate() - .tileEntity("turntable", TurntableTileEntity::new) - .validBlocks(AllBlocks.TURNTABLE) - .renderer(() -> KineticTileEntityRenderer::new) - .register(); + .tileEntity("turntable", TurntableTileEntity::new) + .validBlocks(AllBlocks.TURNTABLE) + .renderer(() -> KineticTileEntityRenderer::new) + .register(); public static final TileEntityEntry HAND_CRANK = Create.registrate() - .tileEntity("hand_crank", HandCrankTileEntity::new) - .validBlocks(AllBlocks.HAND_CRANK) - .renderer(() -> HandCrankRenderer::new) - .register(); + .tileEntity("hand_crank", HandCrankTileEntity::new) + .validBlocks(AllBlocks.HAND_CRANK) + .renderer(() -> HandCrankRenderer::new) + .register(); public static final TileEntityEntry CUCKOO_CLOCK = Create.registrate() - .tileEntity("cuckoo_clock", CuckooClockTileEntity::new) - .validBlocks(AllBlocks.CUCKOO_CLOCK, AllBlocks.MYSTERIOUS_CUCKOO_CLOCK) - .renderer(() -> CuckooClockRenderer::new) - .register(); + .tileEntity("cuckoo_clock", CuckooClockTileEntity::new) + .validBlocks(AllBlocks.CUCKOO_CLOCK, AllBlocks.MYSTERIOUS_CUCKOO_CLOCK) + .renderer(() -> CuckooClockRenderer::new) + .register(); public static final TileEntityEntry MECHANICAL_PUMP = Create.registrate() - .tileEntity("mechanical_pump", PumpTileEntity::new) - .validBlocks(AllBlocks.MECHANICAL_PUMP) - .renderer(() -> PumpRenderer::new) - .register(); + .tileEntity("mechanical_pump", PumpTileEntity::new) + .validBlocks(AllBlocks.MECHANICAL_PUMP) + .renderer(() -> PumpRenderer::new) + .register(); public static final TileEntityEntry FLUID_PIPE = Create.registrate() - .tileEntity("fluid_pipe", FluidPipeTileEntity::new) - .validBlocks(AllBlocks.FLUID_PIPE) - .register(); + .tileEntity("fluid_pipe", FluidPipeTileEntity::new) + .validBlocks(AllBlocks.FLUID_PIPE) + .register(); public static final TileEntityEntry ENCASED_FLUID_PIPE = Create.registrate() - .tileEntity("encased_fluid_pipe", StraightPipeTileEntity::new) - .validBlocks(AllBlocks.ENCASED_FLUID_PIPE) - .register(); + .tileEntity("encased_fluid_pipe", StraightPipeTileEntity::new) + .validBlocks(AllBlocks.ENCASED_FLUID_PIPE) + .register(); public static final TileEntityEntry GLASS_FLUID_PIPE = Create.registrate() - .tileEntity("glass_fluid_pipe", StraightPipeTileEntity::new) - .validBlocks(AllBlocks.GLASS_FLUID_PIPE) - .renderer(() -> TransparentStraightPipeRenderer::new) - .register(); + .tileEntity("glass_fluid_pipe", StraightPipeTileEntity::new) + .validBlocks(AllBlocks.GLASS_FLUID_PIPE) + .renderer(() -> TransparentStraightPipeRenderer::new) + .register(); public static final TileEntityEntry FLUID_TANK = Create.registrate() - .tileEntity("fluid_tank", FluidTankTileEntity::new) - .validBlocks(AllBlocks.FLUID_TANK) - .renderer(() -> FluidTankRenderer::new) - .register(); - + .tileEntity("fluid_tank", FluidTankTileEntity::new) + .validBlocks(AllBlocks.FLUID_TANK) + .renderer(() -> FluidTankRenderer::new) + .register(); + public static final TileEntityEntry SPOUT = Create.registrate() - .tileEntity("spout", SpoutTileEntity::new) - .validBlocks(AllBlocks.SPOUT) - .renderer(() -> SpoutRenderer::new) - .register(); + .tileEntity("spout", SpoutTileEntity::new) + .validBlocks(AllBlocks.SPOUT) + .renderer(() -> SpoutRenderer::new) + .register(); public static final TileEntityEntry BELT = Create.registrate() - .tileEntity("belt", BeltTileEntity::new) - .validBlocks(AllBlocks.BELT) - .renderer(() -> BeltRenderer::new) - .register(); + .tileEntity("belt", BeltTileEntity::new) + .validBlocks(AllBlocks.BELT) + .renderer(() -> BeltRenderer::new) + .register(); public static final TileEntityEntry CHUTE = Create.registrate() - .tileEntity("chute", ChuteTileEntity::new) - .validBlocks(AllBlocks.CHUTE) - .renderer(() -> ChuteRenderer::new) - .register(); + .tileEntity("chute", ChuteTileEntity::new) + .validBlocks(AllBlocks.CHUTE) + .renderer(() -> ChuteRenderer::new) + .register(); public static final TileEntityEntry ANDESITE_TUNNEL = Create.registrate() - .tileEntity("andesite_tunnel", BeltTunnelTileEntity::new) - .validBlocks(AllBlocks.ANDESITE_TUNNEL) - .renderer(() -> BeltTunnelRenderer::new) - .register(); + .tileEntity("andesite_tunnel", BeltTunnelTileEntity::new) + .validBlocks(AllBlocks.ANDESITE_TUNNEL) + .renderer(() -> BeltTunnelRenderer::new) + .register(); public static final TileEntityEntry BRASS_TUNNEL = Create.registrate() - .tileEntity("brass_tunnel", BrassTunnelTileEntity::new) - .validBlocks(AllBlocks.BRASS_TUNNEL) - .renderer(() -> BeltTunnelRenderer::new) - .register(); + .tileEntity("brass_tunnel", BrassTunnelTileEntity::new) + .validBlocks(AllBlocks.BRASS_TUNNEL) + .renderer(() -> BeltTunnelRenderer::new) + .register(); public static final TileEntityEntry MECHANICAL_ARM = Create.registrate() - .tileEntity("mechanical_arm", ArmTileEntity::new) - .validBlocks(AllBlocks.MECHANICAL_ARM) - .renderer(() -> ArmRenderer::new) - .register(); + .tileEntity("mechanical_arm", ArmTileEntity::new) + .validBlocks(AllBlocks.MECHANICAL_ARM) + .renderer(() -> ArmRenderer::new) + .register(); public static final TileEntityEntry MECHANICAL_PISTON = Create.registrate() - .tileEntity("mechanical_piston", MechanicalPistonTileEntity::new) - .validBlocks(AllBlocks.MECHANICAL_PISTON, AllBlocks.STICKY_MECHANICAL_PISTON) - .renderer(() -> MechanicalPistonRenderer::new) - .register(); + .tileEntity("mechanical_piston", MechanicalPistonTileEntity::new) + .validBlocks(AllBlocks.MECHANICAL_PISTON, AllBlocks.STICKY_MECHANICAL_PISTON) + .renderer(() -> MechanicalPistonRenderer::new) + .register(); public static final TileEntityEntry MECHANICAL_BEARING = Create.registrate() - .tileEntity("mechanical_bearing", MechanicalBearingTileEntity::new) - .validBlocks(AllBlocks.MECHANICAL_BEARING) - .renderer(() -> BearingRenderer::new) - .register(); + .tileEntity("mechanical_bearing", MechanicalBearingTileEntity::new) + .validBlocks(AllBlocks.MECHANICAL_BEARING) + .renderer(() -> BearingRenderer::new) + .register(); public static final TileEntityEntry CLOCKWORK_BEARING = Create.registrate() - .tileEntity("clockwork_bearing", ClockworkBearingTileEntity::new) - .validBlocks(AllBlocks.CLOCKWORK_BEARING) - .renderer(() -> BearingRenderer::new) - .register(); + .tileEntity("clockwork_bearing", ClockworkBearingTileEntity::new) + .validBlocks(AllBlocks.CLOCKWORK_BEARING) + .renderer(() -> BearingRenderer::new) + .register(); public static final TileEntityEntry ROPE_PULLEY = Create.registrate() - .tileEntity("rope_pulley", PulleyTileEntity::new) - .validBlocks(AllBlocks.ROPE_PULLEY) - .renderer(() -> PulleyRenderer::new) - .register(); + .tileEntity("rope_pulley", PulleyTileEntity::new) + .validBlocks(AllBlocks.ROPE_PULLEY) + .renderer(() -> PulleyRenderer::new) + .register(); public static final TileEntityEntry CHASSIS = Create.registrate() - .tileEntity("chassis", ChassisTileEntity::new) - .validBlocks(AllBlocks.RADIAL_CHASSIS, AllBlocks.LINEAR_CHASSIS, AllBlocks.SECONDARY_LINEAR_CHASSIS) - //.renderer(() -> renderer) - .register(); + .tileEntity("chassis", ChassisTileEntity::new) + .validBlocks(AllBlocks.RADIAL_CHASSIS, AllBlocks.LINEAR_CHASSIS, AllBlocks.SECONDARY_LINEAR_CHASSIS) + // .renderer(() -> renderer) + .register(); public static final TileEntityEntry DRILL = Create.registrate() - .tileEntity("drill", DrillTileEntity::new) - .validBlocks(AllBlocks.MECHANICAL_DRILL) - .renderer(() -> DrillRenderer::new) - .register(); + .tileEntity("drill", DrillTileEntity::new) + .validBlocks(AllBlocks.MECHANICAL_DRILL) + .renderer(() -> DrillRenderer::new) + .register(); public static final TileEntityEntry SAW = Create.registrate() - .tileEntity("saw", SawTileEntity::new) - .validBlocks(AllBlocks.MECHANICAL_SAW) - .renderer(() -> SawRenderer::new) - .register(); + .tileEntity("saw", SawTileEntity::new) + .validBlocks(AllBlocks.MECHANICAL_SAW) + .renderer(() -> SawRenderer::new) + .register(); public static final TileEntityEntry HARVESTER = Create.registrate() - .tileEntity("harvester", HarvesterTileEntity::new) - .validBlocks(AllBlocks.MECHANICAL_HARVESTER) - .renderer(() -> HarvesterRenderer::new) + .tileEntity("harvester", HarvesterTileEntity::new) + .validBlocks(AllBlocks.MECHANICAL_HARVESTER) + .renderer(() -> HarvesterRenderer::new) + .register(); + + public static final TileEntityEntry PORTABLE_STORAGE_INTERFACE = + Create.registrate() + .tileEntity("portable_storage_interface", PortableStorageInterfaceTileEntity::new) + .validBlocks(AllBlocks.PORTABLE_STORAGE_INTERFACE) + .renderer(() -> PortableStorageInterfaceRenderer::new) .register(); public static final TileEntityEntry FLYWHEEL = Create.registrate() - .tileEntity("flywheel", FlywheelTileEntity::new) - .validBlocks(AllBlocks.FLYWHEEL) - .renderer(() -> FlywheelRenderer::new) - .register(); + .tileEntity("flywheel", FlywheelTileEntity::new) + .validBlocks(AllBlocks.FLYWHEEL) + .renderer(() -> FlywheelRenderer::new) + .register(); public static final TileEntityEntry FURNACE_ENGINE = Create.registrate() - .tileEntity("furnace_engine", FurnaceEngineTileEntity::new) - .validBlocks(AllBlocks.FURNACE_ENGINE) - .renderer(() -> EngineRenderer::new) - .register(); + .tileEntity("furnace_engine", FurnaceEngineTileEntity::new) + .validBlocks(AllBlocks.FURNACE_ENGINE) + .renderer(() -> EngineRenderer::new) + .register(); public static final TileEntityEntry MILLSTONE = Create.registrate() - .tileEntity("millstone", MillstoneTileEntity::new) - .validBlocks(AllBlocks.MILLSTONE) - .renderer(() -> MillstoneRenderer::new) - .register(); + .tileEntity("millstone", MillstoneTileEntity::new) + .validBlocks(AllBlocks.MILLSTONE) + .renderer(() -> MillstoneRenderer::new) + .register(); public static final TileEntityEntry CRUSHING_WHEEL = Create.registrate() - .tileEntity("crushing_wheel", CrushingWheelTileEntity::new) - .validBlocks(AllBlocks.CRUSHING_WHEEL) - .renderer(() -> KineticTileEntityRenderer::new) - .register(); + .tileEntity("crushing_wheel", CrushingWheelTileEntity::new) + .validBlocks(AllBlocks.CRUSHING_WHEEL) + .renderer(() -> KineticTileEntityRenderer::new) + .register(); - public static final TileEntityEntry CRUSHING_WHEEL_CONTROLLER = Create.registrate() + public static final TileEntityEntry CRUSHING_WHEEL_CONTROLLER = + Create.registrate() .tileEntity("crushing_wheel_controller", CrushingWheelControllerTileEntity::new) .validBlocks(AllBlocks.CRUSHING_WHEEL_CONTROLLER) - //.renderer(() -> renderer) + // .renderer(() -> renderer) .register(); public static final TileEntityEntry WATER_WHEEL = Create.registrate() - .tileEntity("water_wheel", WaterWheelTileEntity::new) - .validBlocks(AllBlocks.WATER_WHEEL) - .renderer(() -> KineticTileEntityRenderer::new) - .register(); + .tileEntity("water_wheel", WaterWheelTileEntity::new) + .validBlocks(AllBlocks.WATER_WHEEL) + .renderer(() -> KineticTileEntityRenderer::new) + .register(); public static final TileEntityEntry MECHANICAL_PRESS = Create.registrate() - .tileEntity("mechanical_press", MechanicalPressTileEntity::new) - .validBlocks(AllBlocks.MECHANICAL_PRESS) - .renderer(() -> MechanicalPressRenderer::new) - .register(); + .tileEntity("mechanical_press", MechanicalPressTileEntity::new) + .validBlocks(AllBlocks.MECHANICAL_PRESS) + .renderer(() -> MechanicalPressRenderer::new) + .register(); public static final TileEntityEntry MECHANICAL_MIXER = Create.registrate() - .tileEntity("mechanical_mixer", MechanicalMixerTileEntity::new) - .validBlocks(AllBlocks.MECHANICAL_MIXER) - .renderer(() -> MechanicalMixerRenderer::new) - .register(); + .tileEntity("mechanical_mixer", MechanicalMixerTileEntity::new) + .validBlocks(AllBlocks.MECHANICAL_MIXER) + .renderer(() -> MechanicalMixerRenderer::new) + .register(); public static final TileEntityEntry DEPLOYER = Create.registrate() - .tileEntity("deployer", DeployerTileEntity::new) - .validBlocks(AllBlocks.DEPLOYER) - .renderer(() -> DeployerRenderer::new) - .register(); + .tileEntity("deployer", DeployerTileEntity::new) + .validBlocks(AllBlocks.DEPLOYER) + .renderer(() -> DeployerRenderer::new) + .register(); public static final TileEntityEntry BASIN = Create.registrate() - .tileEntity("basin", BasinTileEntity::new) - .validBlocks(AllBlocks.BASIN) - .renderer(() -> BasinRenderer::new) - .register(); + .tileEntity("basin", BasinTileEntity::new) + .validBlocks(AllBlocks.BASIN) + .renderer(() -> BasinRenderer::new) + .register(); public static final TileEntityEntry HEATER = Create.registrate() - .tileEntity("blaze_heater", BlazeBurnerTileEntity::new) - .validBlocks(AllBlocks.BLAZE_BURNER) - .renderer(() -> BlazeBurnerRenderer::new) - .register(); + .tileEntity("blaze_heater", BlazeBurnerTileEntity::new) + .validBlocks(AllBlocks.BLAZE_BURNER) + .renderer(() -> BlazeBurnerRenderer::new) + .register(); public static final TileEntityEntry MECHANICAL_CRAFTER = Create.registrate() - .tileEntity("mechanical_crafter", MechanicalCrafterTileEntity::new) - .validBlocks(AllBlocks.MECHANICAL_CRAFTER) - .renderer(() -> MechanicalCrafterRenderer::new) - .register(); + .tileEntity("mechanical_crafter", MechanicalCrafterTileEntity::new) + .validBlocks(AllBlocks.MECHANICAL_CRAFTER) + .renderer(() -> MechanicalCrafterRenderer::new) + .register(); public static final TileEntityEntry SEQUENCED_GEARSHIFT = Create.registrate() - .tileEntity("sequenced_gearshift", SequencedGearshiftTileEntity::new) - .validBlocks(AllBlocks.SEQUENCED_GEARSHIFT) - .renderer(() -> SplitShaftRenderer::new) - .register(); + .tileEntity("sequenced_gearshift", SequencedGearshiftTileEntity::new) + .validBlocks(AllBlocks.SEQUENCED_GEARSHIFT) + .renderer(() -> SplitShaftRenderer::new) + .register(); public static final TileEntityEntry ROTATION_SPEED_CONTROLLER = Create.registrate() - .tileEntity("rotation_speed_controller", SpeedControllerTileEntity::new) - .validBlocks(AllBlocks.ROTATION_SPEED_CONTROLLER) - .renderer(() -> SpeedControllerRenderer::new) - .register(); + .tileEntity("rotation_speed_controller", SpeedControllerTileEntity::new) + .validBlocks(AllBlocks.ROTATION_SPEED_CONTROLLER) + .renderer(() -> SpeedControllerRenderer::new) + .register(); public static final TileEntityEntry SPEEDOMETER = Create.registrate() - .tileEntity("speedometer", SpeedGaugeTileEntity::new) - .validBlocks(AllBlocks.SPEEDOMETER) - .renderer(() -> GaugeRenderer::speed) - .register(); + .tileEntity("speedometer", SpeedGaugeTileEntity::new) + .validBlocks(AllBlocks.SPEEDOMETER) + .renderer(() -> GaugeRenderer::speed) + .register(); public static final TileEntityEntry STRESSOMETER = Create.registrate() - .tileEntity("stressometer", StressGaugeTileEntity::new) - .validBlocks(AllBlocks.STRESSOMETER) - .renderer(() -> GaugeRenderer::stress) - .register(); + .tileEntity("stressometer", StressGaugeTileEntity::new) + .validBlocks(AllBlocks.STRESSOMETER) + .renderer(() -> GaugeRenderer::stress) + .register(); public static final TileEntityEntry ANALOG_LEVER = Create.registrate() - .tileEntity("analog_lever", AnalogLeverTileEntity::new) - .validBlocks(AllBlocks.ANALOG_LEVER) - .renderer(() -> AnalogLeverRenderer::new) - .register(); + .tileEntity("analog_lever", AnalogLeverTileEntity::new) + .validBlocks(AllBlocks.ANALOG_LEVER) + .renderer(() -> AnalogLeverRenderer::new) + .register(); public static final TileEntityEntry CART_ASSEMBLER = Create.registrate() - .tileEntity("cart_assembler", CartAssemblerTileEntity::new) - .validBlocks(AllBlocks.CART_ASSEMBLER) - //.renderer(() -> renderer) - .register(); + .tileEntity("cart_assembler", CartAssemblerTileEntity::new) + .validBlocks(AllBlocks.CART_ASSEMBLER) + // .renderer(() -> renderer) + .register(); // Logistics public static final TileEntityEntry REDSTONE_LINK = Create.registrate() - .tileEntity("redstone_link", RedstoneLinkTileEntity::new) - .validBlocks(AllBlocks.REDSTONE_LINK) - .renderer(() -> SmartTileEntityRenderer::new) - .register(); + .tileEntity("redstone_link", RedstoneLinkTileEntity::new) + .validBlocks(AllBlocks.REDSTONE_LINK) + .renderer(() -> SmartTileEntityRenderer::new) + .register(); public static final TileEntityEntry NIXIE_TUBE = Create.registrate() - .tileEntity("nixie_tube", NixieTubeTileEntity::new) - .validBlocks(AllBlocks.NIXIE_TUBE) - .renderer(() -> NixieTubeRenderer::new) - .register(); + .tileEntity("nixie_tube", NixieTubeTileEntity::new) + .validBlocks(AllBlocks.NIXIE_TUBE) + .renderer(() -> NixieTubeRenderer::new) + .register(); public static final TileEntityEntry STOCKPILE_SWITCH = Create.registrate() - .tileEntity("stockpile_switch", StockpileSwitchTileEntity::new) - .validBlocks(AllBlocks.STOCKPILE_SWITCH) - .renderer(() -> SmartTileEntityRenderer::new) - .register(); + .tileEntity("stockpile_switch", StockpileSwitchTileEntity::new) + .validBlocks(AllBlocks.STOCKPILE_SWITCH) + .renderer(() -> SmartTileEntityRenderer::new) + .register(); public static final TileEntityEntry ADJUSTABLE_CRATE = Create.registrate() - .tileEntity("adjustable_crate", AdjustableCrateTileEntity::new) - .validBlocks(AllBlocks.ADJUSTABLE_CRATE) - //.renderer(() -> renderer) - .register(); + .tileEntity("adjustable_crate", AdjustableCrateTileEntity::new) + .validBlocks(AllBlocks.ADJUSTABLE_CRATE) + // .renderer(() -> renderer) + .register(); public static final TileEntityEntry CREATIVE_CRATE = Create.registrate() - .tileEntity("creative_crate", CreativeCrateTileEntity::new) - .validBlocks(AllBlocks.CREATIVE_CRATE) - .renderer(() -> SmartTileEntityRenderer::new) - .register(); + .tileEntity("creative_crate", CreativeCrateTileEntity::new) + .validBlocks(AllBlocks.CREATIVE_CRATE) + .renderer(() -> SmartTileEntityRenderer::new) + .register(); public static final TileEntityEntry DEPOT = Create.registrate() - .tileEntity("depot", DepotTileEntity::new) - .validBlocks(AllBlocks.DEPOT) - .renderer(() -> DepotRenderer::new) - .register(); + .tileEntity("depot", DepotTileEntity::new) + .validBlocks(AllBlocks.DEPOT) + .renderer(() -> DepotRenderer::new) + .register(); public static final TileEntityEntry FUNNEL = Create.registrate() - .tileEntity("funnel", FunnelTileEntity::new) - .validBlocks(AllBlocks.BRASS_FUNNEL, AllBlocks.BRASS_BELT_FUNNEL, AllBlocks.ANDESITE_FUNNEL, AllBlocks.ANDESITE_BELT_FUNNEL) - .renderer(() -> FunnelRenderer::new) - .register(); + .tileEntity("funnel", FunnelTileEntity::new) + .validBlocks(AllBlocks.BRASS_FUNNEL, AllBlocks.BRASS_BELT_FUNNEL, AllBlocks.ANDESITE_FUNNEL, + AllBlocks.ANDESITE_BELT_FUNNEL) + .renderer(() -> FunnelRenderer::new) + .register(); public static final TileEntityEntry CONTENT_OBSERVER = Create.registrate() - .tileEntity("content_observer", ContentObserverTileEntity::new) - .validBlocks(AllBlocks.CONTENT_OBSERVER) - .renderer(() -> SmartTileEntityRenderer::new) - .register(); + .tileEntity("content_observer", ContentObserverTileEntity::new) + .validBlocks(AllBlocks.CONTENT_OBSERVER) + .renderer(() -> SmartTileEntityRenderer::new) + .register(); public static final TileEntityEntry ADJUSTABLE_REPEATER = Create.registrate() - .tileEntity("adjustable_repeater", AdjustableRepeaterTileEntity::new) - .validBlocks(AllBlocks.ADJUSTABLE_REPEATER) - .renderer(() -> AdjustableRepeaterRenderer::new) - .register(); + .tileEntity("adjustable_repeater", AdjustableRepeaterTileEntity::new) + .validBlocks(AllBlocks.ADJUSTABLE_REPEATER) + .renderer(() -> AdjustableRepeaterRenderer::new) + .register(); - public static final TileEntityEntry ADJUSTABLE_PULSE_REPEATER = Create.registrate() + public static final TileEntityEntry ADJUSTABLE_PULSE_REPEATER = + Create.registrate() .tileEntity("adjustable_pulse_repeater", AdjustablePulseRepeaterTileEntity::new) .validBlocks(AllBlocks.ADJUSTABLE_PULSE_REPEATER) .renderer(() -> AdjustableRepeaterRenderer::new) .register(); - public static void register() { - } + public static void register() {} } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceBlock.java index a992df339..d4795c41b 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceBlock.java @@ -1,19 +1,20 @@ package com.simibubi.create.content.contraptions.components.actors; +import javax.annotation.ParametersAreNonnullByDefault; + import com.simibubi.create.AllShapes; +import com.simibubi.create.AllTileEntities; import com.simibubi.create.foundation.block.ProperDirectionalBlock; +import mcp.MethodsReturnNonnullByDefault; import net.minecraft.block.BlockState; import net.minecraft.item.BlockItemUseContext; +import net.minecraft.tileentity.TileEntity; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.shapes.ISelectionContext; import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.world.IBlockReader; - -import javax.annotation.ParametersAreNonnullByDefault; -import mcp.MethodsReturnNonnullByDefault; - @ParametersAreNonnullByDefault @MethodsReturnNonnullByDefault public class PortableStorageInterfaceBlock extends ProperDirectionalBlock { @@ -21,6 +22,16 @@ public class PortableStorageInterfaceBlock extends ProperDirectionalBlock { public PortableStorageInterfaceBlock(Properties p_i48415_1_) { super(p_i48415_1_); } + + @Override + public boolean hasTileEntity(BlockState state) { + return true; + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) { + return AllTileEntities.PORTABLE_STORAGE_INTERFACE.create(); + } @Override public BlockState getStateForPlacement(BlockItemUseContext context) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceMovement.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceMovement.java new file mode 100644 index 000000000..6ceea2f44 --- /dev/null +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceMovement.java @@ -0,0 +1,167 @@ +package com.simibubi.create.content.contraptions.components.actors; + +import java.util.function.Predicate; + +import com.simibubi.create.AllBlocks; +import com.simibubi.create.content.contraptions.components.structureMovement.MovementBehaviour; +import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; +import com.simibubi.create.foundation.config.AllConfigs; +import com.simibubi.create.foundation.item.ItemHelper; +import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; +import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour; +import com.simibubi.create.foundation.tileEntity.behaviour.inventory.SingleTargetAutoExtractingBehaviour; +import com.simibubi.create.foundation.utility.VecHelper; + +import net.minecraft.block.BlockState; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTUtil; +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.world.World; +import net.minecraftforge.items.IItemHandlerModifiable; +import net.minecraftforge.items.ItemHandlerHelper; + +public class PortableStorageInterfaceMovement extends MovementBehaviour { + + private static final String _exporting_ = "Exporting"; + private static final String _delay_ = "Delay"; + private static final String _workingPos_ = "WorkingPos"; + + @Override + public Vec3d getActiveAreaOffset(MovementContext context) { + return new Vec3d(context.state.get(PortableStorageInterfaceBlock.FACING) + .getDirectionVec()).scale(.85f); + } + + @Override + public void visitNewPosition(MovementContext context, BlockPos pos) { + Direction currentFacing = getCurrentFacing(context); + PortableStorageInterfaceTileEntity psi = + getValidStationaryInterface(context.world, pos, currentFacing.getAxis()); + if (psi == null) + return; + if (psi.isTransferring()) + return; + context.data.put(_workingPos_, NBTUtil.writeBlockPos(pos)); + context.stall = true; + } + + @Override + public void tick(MovementContext context) { + if (!context.data.contains(_workingPos_)) + return; + if (context.world.isRemote) + return; + + BlockPos pos = NBTUtil.readBlockPos(context.data.getCompound(_workingPos_)); + PortableStorageInterfaceTileEntity stationaryInterface = + getValidStationaryInterface(context.world, pos, getCurrentFacing(context).getAxis()); + if (stationaryInterface == null) { + reset(context); + return; + } + + int nextExtract = context.data.getInt(_delay_); + if (nextExtract > 0) { + nextExtract--; + context.data.putInt(_delay_, nextExtract); + return; + } + + boolean extract = context.data.getBoolean(_exporting_); + boolean success = false; + IItemHandlerModifiable inv = context.contraption.inventory; + SingleTargetAutoExtractingBehaviour extracting = + TileEntityBehaviour.get(stationaryInterface, SingleTargetAutoExtractingBehaviour.TYPE); + FilteringBehaviour filtering = TileEntityBehaviour.get(stationaryInterface, FilteringBehaviour.TYPE); + + if (extract) { + // Export from Contraption + Predicate test = extracting.getFilterTest(); + int exactAmount = extracting.getAmountFromFilter(); + ItemStack itemExtracted = ItemStack.EMPTY; + if (exactAmount != -1) + itemExtracted = ItemHelper.extract(inv, test, exactAmount, false); + else + itemExtracted = ItemHelper.extract(inv, test, stationaryInterface::amountToExtract, false); + + if (!itemExtracted.isEmpty()) { + stationaryInterface.onExtract(itemExtracted); + success = exactAmount == -1; + } + + } else { + // Import to Contraption + if (extracting != null) { + extracting.setSynchronized(false); + extracting.withAdditionalFilter(stack -> { + if (filtering.anyAmount()) + return true; + return ItemHandlerHelper.insertItemStacked(inv, stack, true) + .isEmpty(); + }); + + extracting.withAmountThreshold(stack -> { + ItemStack tester = stack.copy(); + tester.setCount(tester.getMaxStackSize()); + return stack.getCount() - ItemHandlerHelper.insertItemStacked(inv, stack, true) + .getCount(); + }); + + extracting.setCallback(stack -> { + ItemHandlerHelper.insertItemStacked(inv, stack, false); + }); + + success = extracting.extract() && filtering.anyAmount(); + extracting.setSynchronized(true); + stationaryInterface.applyFilteringCallbacks(); + extracting.setCallback(stationaryInterface::onExtract); + } + } + + if (!success) { + reset(context); + return; + } + + context.data.putInt(_delay_, AllConfigs.SERVER.logistics.defaultExtractionTimer.get()); + } + + @Override + public void stopMoving(MovementContext context) { + reset(context); + } + + public void reset(MovementContext context) { + context.data.remove(_workingPos_); + context.data.remove(_delay_); + context.data.remove(_exporting_); + context.stall = false; + } + + private PortableStorageInterfaceTileEntity getValidStationaryInterface(World world, BlockPos pos, Axis validAxis) { + TileEntity te = world.getTileEntity(pos); + if (!(te instanceof PortableStorageInterfaceTileEntity)) + return null; + BlockState blockState = world.getBlockState(pos); + if (!AllBlocks.PORTABLE_STORAGE_INTERFACE.has(blockState)) + return null; + if (blockState.get(PortableStorageInterfaceBlock.FACING) + .getAxis() != validAxis) + return null; + if (world.isBlockPowered(pos)) + return null; + return (PortableStorageInterfaceTileEntity) te; + } + + private Direction getCurrentFacing(MovementContext context) { + Vec3d directionVec = new Vec3d(context.state.get(PortableStorageInterfaceBlock.FACING) + .getDirectionVec()); + directionVec = VecHelper.rotate(directionVec, context.rotation.x, context.rotation.y, context.rotation.z); + return Direction.getFacingFromVector(directionVec.x, directionVec.y, directionVec.z); + } + +} diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceRenderer.java new file mode 100644 index 000000000..7d57fb692 --- /dev/null +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceRenderer.java @@ -0,0 +1,64 @@ +package com.simibubi.create.content.contraptions.components.actors; + +import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.vertex.IVertexBuilder; +import com.simibubi.create.AllBlockPartials; +import com.simibubi.create.foundation.tileEntity.renderer.SafeTileEntityRenderer; +import com.simibubi.create.foundation.utility.AngleHelper; +import com.simibubi.create.foundation.utility.AnimationTickHolder; +import com.simibubi.create.foundation.utility.MatrixStacker; +import com.simibubi.create.foundation.utility.SuperByteBuffer; + +import net.minecraft.block.BlockState; +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; +import net.minecraft.util.Direction; +import net.minecraft.util.math.MathHelper; + +public class PortableStorageInterfaceRenderer extends SafeTileEntityRenderer { + + public PortableStorageInterfaceRenderer(TileEntityRendererDispatcher dispatcher) { + super(dispatcher); + } + + @Override + protected void renderSafe(PortableStorageInterfaceTileEntity te, float partialTicks, MatrixStack ms, + IRenderTypeBuffer buffer, int light, int overlay) { + + BlockState blockState = te.getBlockState(); + SuperByteBuffer middle = AllBlockPartials.PORTABLE_STORAGE_INTERFACE_MIDDLE.renderOn(blockState); + SuperByteBuffer top = AllBlockPartials.PORTABLE_STORAGE_INTERFACE_TOP.renderOn(blockState); + IVertexBuilder vb = buffer.getBuffer(RenderType.getSolid()); + + ms.push(); + + Direction facing = blockState.get(PortableStorageInterfaceBlock.FACING); + MatrixStacker.of(ms) + .centre() + .rotateY(AngleHelper.horizontalAngle(facing)) + .rotateX(facing == Direction.UP ? 0 : facing == Direction.DOWN ? 180 : 90) + .unCentre(); + + float progress = (float) ((AnimationTickHolder.getRenderTick() * .25f) % (Math.PI * 2)); + float bounce = (MathHelper.sin(progress) + 1) / 4f; + + if (bounce > 7/16f) { + middle = AllBlockPartials.PORTABLE_STORAGE_INTERFACE_MIDDLE_POWERED.renderOn(blockState); + } + + + ms.translate(0, bounce, 0); + + ms.push(); + ms.translate(0, 6/16f, 0); + middle.renderInto(ms, vb); + ms.pop(); + + ms.translate(0, bounce, 0); + top.renderInto(ms, vb); + + ms.pop(); + } + +} diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceTileEntity.java new file mode 100644 index 000000000..3e27dd173 --- /dev/null +++ b/src/main/java/com/simibubi/create/content/contraptions/components/actors/PortableStorageInterfaceTileEntity.java @@ -0,0 +1,56 @@ +package com.simibubi.create.content.contraptions.components.actors; + +import java.util.List; + +import com.simibubi.create.content.contraptions.components.structureMovement.Contraption; +import com.simibubi.create.foundation.tileEntity.SmartTileEntity; +import com.simibubi.create.foundation.tileEntity.SyncedTileEntity; +import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; + +import net.minecraft.tileentity.TileEntityType; +import net.minecraft.util.Direction; +import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.common.util.LazyOptional; +import net.minecraftforge.items.IItemHandlerModifiable; +import net.minecraftforge.items.wrapper.CombinedInvWrapper; + +public class PortableStorageInterfaceTileEntity extends SmartTileEntity { + + protected int transferTimeout; + protected LazyOptional capability; + + public PortableStorageInterfaceTileEntity(TileEntityType tileEntityTypeIn) { + super(tileEntityTypeIn); + transferTimeout = 0; + capability = LazyOptional.empty(); + } + + public void startTransferringTo(Contraption contraption) { + CombinedInvWrapper inventory = contraption.inventory; + capability.invalidate(); + capability = LazyOptional.of(() -> inventory); + + } + + @Override + public void tick() { + super.tick(); + } + + public boolean isTransferring() { + return transferTimeout != 0; + } + + @Override + public LazyOptional getCapability(Capability cap, Direction side) { + return super.getCapability(cap, side); + } + + public void resetTimer() { + + } + + @Override + public void addBehaviours(List behaviours) {} + +} diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/actors/StorageInterfaceMovement.java b/src/main/java/com/simibubi/create/content/contraptions/components/actors/StorageInterfaceMovement.java deleted file mode 100644 index c6442a00f..000000000 --- a/src/main/java/com/simibubi/create/content/contraptions/components/actors/StorageInterfaceMovement.java +++ /dev/null @@ -1,157 +0,0 @@ -//package com.simibubi.create.content.contraptions.components.actors; -// -//import java.util.function.Predicate; -// -//import com.simibubi.create.content.contraptions.components.structureMovement.MovementBehaviour; -//import com.simibubi.create.content.contraptions.components.structureMovement.MovementContext; -//import com.simibubi.create.content.logistics.block.transposer.TransposerBlock; -//import com.simibubi.create.content.logistics.block.transposer.TransposerTileEntity; -//import com.simibubi.create.foundation.config.AllConfigs; -//import com.simibubi.create.foundation.item.ItemHelper; -//import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; -//import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringBehaviour; -//import com.simibubi.create.foundation.tileEntity.behaviour.inventory.SingleTargetAutoExtractingBehaviour; -//import com.simibubi.create.foundation.utility.VecHelper; -// -//import net.minecraft.item.ItemStack; -//import net.minecraft.nbt.NBTUtil; -//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.world.World; -//import net.minecraftforge.items.IItemHandlerModifiable; -//import net.minecraftforge.items.ItemHandlerHelper; -// -//public class StorageInterfaceMovement extends MovementBehaviour { -// -// private static final String _exporting_ = "Exporting"; -// private static final String _delay_ = "Delay"; -// private static final String _workingPos_ = "WorkingPos"; -// -// @Override -// public Vec3d getActiveAreaOffset(MovementContext context) { -// return new Vec3d(context.state.get(PortableStorageInterfaceBlock.FACING).getDirectionVec()).scale(.85f); -// } -// -// @Override -// public void visitNewPosition(MovementContext context, BlockPos pos) { -// Direction currentFacing = getCurrentFacing(context); -// TransposerTileEntity transposer = getValidTransposer(context.world, pos, currentFacing.getAxis()); -// if (transposer == null) -// return; -// context.data.put(_workingPos_, NBTUtil.writeBlockPos(pos)); -// context.data.putBoolean(_exporting_, -// TransposerBlock.getBlockFacing(transposer.getBlockState()) != currentFacing); -// context.stall = true; -// } -// -// @Override -// public void tick(MovementContext context) { -// if (!context.data.contains(_workingPos_)) -// return; -// if (context.world.isRemote) -// return; -// -// BlockPos pos = NBTUtil.readBlockPos(context.data.getCompound(_workingPos_)); -// TransposerTileEntity transposer = getValidTransposer(context.world, pos, getCurrentFacing(context).getAxis()); -// if (transposer == null) { -// reset(context); -// return; -// } -// -// int nextExtract = context.data.getInt(_delay_); -// if (nextExtract > 0) { -// nextExtract--; -// context.data.putInt(_delay_, nextExtract); -// return; -// } -// -// boolean extract = context.data.getBoolean(_exporting_); -// boolean success = false; -// IItemHandlerModifiable inv = context.contraption.inventory; -// SingleTargetAutoExtractingBehaviour extracting = -// TileEntityBehaviour.get(transposer, SingleTargetAutoExtractingBehaviour.TYPE); -// FilteringBehaviour filtering = TileEntityBehaviour.get(transposer, FilteringBehaviour.TYPE); -// -// if (extract) { -// // Export from Contraption -// Predicate test = extracting.getFilterTest(); -// int exactAmount = extracting.getAmountFromFilter(); -// ItemStack itemExtracted = ItemStack.EMPTY; -// if (exactAmount != -1) -// itemExtracted = ItemHelper.extract(inv, test, exactAmount, false); -// else -// itemExtracted = ItemHelper.extract(inv, test, transposer::amountToExtract, false); -// -// if (!itemExtracted.isEmpty()) { -// transposer.onExtract(itemExtracted); -// success = exactAmount == -1; -// } -// -// } else { -// // Import to Contraption -// if (extracting != null) { -// extracting.setSynchronized(false); -// extracting.withAdditionalFilter(stack -> { -// if (filtering.anyAmount()) -// return true; -// return ItemHandlerHelper.insertItemStacked(inv, stack, true).isEmpty(); -// }); -// -// extracting.withAmountThreshold(stack -> { -// ItemStack tester = stack.copy(); -// tester.setCount(tester.getMaxStackSize()); -// return stack.getCount() - ItemHandlerHelper.insertItemStacked(inv, stack, true).getCount(); -// }); -// -// extracting.setCallback(stack -> { -// ItemHandlerHelper.insertItemStacked(inv, stack, false); -// }); -// -// success = extracting.extract() && filtering.anyAmount(); -// extracting.setSynchronized(true); -// transposer.applyFilteringCallbacks(); -// extracting.setCallback(transposer::onExtract); -// } -// } -// -// if (!success) { -// reset(context); -// return; -// } -// -// context.data.putInt(_delay_, AllConfigs.SERVER.logistics.extractorDelay.get()); -// } -// -// @Override -// public void stopMoving(MovementContext context) { -// reset(context); -// } -// -// public void reset(MovementContext context) { -// context.data.remove(_workingPos_); -// context.data.remove(_delay_); -// context.data.remove(_exporting_); -// context.stall = false; -// } -// -// private TransposerTileEntity getValidTransposer(World world, BlockPos pos, Axis validAxis) { -// TileEntity te = world.getTileEntity(pos); -// if (!(te instanceof TransposerTileEntity)) -// return null; -// if (TransposerBlock.getBlockFacing(world.getBlockState(pos)).getAxis() != validAxis) -// return null; -// if (world.isBlockPowered(pos)) -// return null; -// return (TransposerTileEntity) te; -// } -// -// private Direction getCurrentFacing(MovementContext context) { -// Vec3d directionVec = new Vec3d(context.state.get(PortableStorageInterfaceBlock.FACING).getDirectionVec()); -// directionVec = VecHelper.rotate(directionVec, context.rotation.x, context.rotation.y, context.rotation.z); -// return Direction.getFacingFromVector(directionVec.x, directionVec.y, directionVec.z); -// } -// -//} diff --git a/src/main/java/com/simibubi/create/foundation/config/CLogistics.java b/src/main/java/com/simibubi/create/foundation/config/CLogistics.java index a784769cc..4fa8cc416 100644 --- a/src/main/java/com/simibubi/create/foundation/config/CLogistics.java +++ b/src/main/java/com/simibubi/create/foundation/config/CLogistics.java @@ -4,6 +4,7 @@ public class CLogistics extends ConfigBase { public ConfigInt defaultExtractionLimit = i(64, 1, 64, "defaultExtractionLimit", Comments.defaultExtractionLimit); public ConfigInt defaultExtractionTimer = i(8, 1, "defaultExtractionTimer", Comments.defaultExtractionTimer); + public ConfigInt psiTimeout = i(20, 1, "psiTimeout", Comments.psiTimeout); public ConfigInt mechanicalArmRange = i(5, 1, "mechanicalArmRange", Comments.mechanicalArmRange); public ConfigInt linkRange = i(128, 1, "linkRange", Comments.linkRange); @@ -18,6 +19,7 @@ public class CLogistics extends ConfigBase { static String defaultExtractionTimer = "The amount of ticks a funnel waits between item transferrals, when it is not re-activated by redstone."; static String linkRange = "Maximum possible range in blocks of redstone link connections."; + static String psiTimeout = "The amount of ticks a portable storage interface waits for transfers until letting contraptions move along."; static String mechanicalArmRange = "Maximum distance in blocks a Mechanical Arm can reach across."; } diff --git a/src/main/resources/assets/create/models/block/portable_storage_interface/block.json b/src/main/resources/assets/create/models/block/portable_storage_interface/block.json new file mode 100644 index 000000000..79251958e --- /dev/null +++ b/src/main/resources/assets/create/models/block/portable_storage_interface/block.json @@ -0,0 +1,63 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "create:block/portable_storage_interface", + "1": "create:block/brass_casing", + "particle": "create:block/brass_casing" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 12, 16], + "faces": { + "north": {"uv": [0, 10, 8, 16], "texture": "#0"}, + "east": {"uv": [0, 10, 8, 16], "texture": "#0"}, + "south": {"uv": [0, 10, 8, 16], "texture": "#0"}, + "west": {"uv": [0, 10, 8, 16], "texture": "#0"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "from": [0, 12, 1.9], + "to": [2, 14.1, 14.1], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 20, 10]}, + "faces": { + "north": {"uv": [7, 10, 8, 11], "texture": "#0"}, + "south": {"uv": [0, 10, 1, 11], "texture": "#0"}, + "west": {"uv": [1, 9, 7, 10], "texture": "#0"}, + "up": {"uv": [0, 2, 2, 14], "texture": "#1"} + } + }, + { + "from": [14, 12, 2], + "to": [16, 14, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 20, 6]}, + "faces": { + "north": {"uv": [0, 10, 1, 11], "texture": "#0"}, + "east": {"uv": [1, 9, 7, 10], "texture": "#0"}, + "south": {"uv": [7, 10, 8, 11], "texture": "#0"}, + "up": {"uv": [0, 2, 2, 14], "rotation": 180, "texture": "#1"} + } + }, + { + "from": [2, 12, 0], + "to": [14, 14, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [10, 20, 8]}, + "faces": { + "north": {"uv": [1, 9, 7, 10], "texture": "#0"}, + "east": {"uv": [0, 10, 8, 11], "texture": "#0"}, + "south": {"uv": [1, 9, 7, 10], "texture": "#0"}, + "west": {"uv": [0, 10, 8, 11], "texture": "#0"}, + "up": {"uv": [2, 0, 14, 16], "texture": "#1"} + } + } + ], + "groups": [ + { + "name": "Base", + "origin": [10, 20, 8], + "children": [0, 1, 2, 3] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/portable_storage_interface/block_middle.json b/src/main/resources/assets/create/models/block/portable_storage_interface/block_middle.json new file mode 100644 index 000000000..33d29a3ef --- /dev/null +++ b/src/main/resources/assets/create/models/block/portable_storage_interface/block_middle.json @@ -0,0 +1,28 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "create:block/portable_storage_interface", + "particle": "create:block/portable_storage_interface" + }, + "elements": [ + { + "from": [2, 0, 2], + "to": [14, 9, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [10, 8, 10]}, + "faces": { + "north": {"uv": [1, 3.5, 7, 8], "texture": "#0"}, + "east": {"uv": [1, 3.5, 7, 8], "texture": "#0"}, + "south": {"uv": [1, 3.5, 7, 8], "texture": "#0"}, + "west": {"uv": [1, 3.5, 7, 8], "texture": "#0"}, + "up": {"uv": [1.5, 3.5, 2, 4], "texture": "#0"} + } + } + ], + "groups": [ + { + "name": "Middle", + "origin": [10, 22, 10], + "children": [0] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/portable_storage_interface/block_middle_powered.json b/src/main/resources/assets/create/models/block/portable_storage_interface/block_middle_powered.json new file mode 100644 index 000000000..c64e3e1f3 --- /dev/null +++ b/src/main/resources/assets/create/models/block/portable_storage_interface/block_middle_powered.json @@ -0,0 +1,28 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "create:block/portable_storage_interface", + "particle": "create:block/portable_storage_interface" + }, + "elements": [ + { + "from": [2, 0, 2], + "to": [14, 9, 14], + "rotation": {"angle": 0, "axis": "y", "origin": [10, 8, 10]}, + "faces": { + "north": {"uv": [9, 3.5, 15, 8], "texture": "#0"}, + "east": {"uv": [9, 3.5, 15, 8], "texture": "#0"}, + "south": {"uv": [9, 3.5, 15, 8], "texture": "#0"}, + "west": {"uv": [9, 3.5, 15, 8], "texture": "#0"}, + "up": {"uv": [1.5, 3.5, 2, 4], "texture": "#0"} + } + } + ], + "groups": [ + { + "name": "Middle", + "origin": [10, 22, 10], + "children": [0] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/portable_storage_interface/block_top.json b/src/main/resources/assets/create/models/block/portable_storage_interface/block_top.json new file mode 100644 index 000000000..88f35fcab --- /dev/null +++ b/src/main/resources/assets/create/models/block/portable_storage_interface/block_top.json @@ -0,0 +1,120 @@ +{ + "credit": "Made with Blockbench", + "textures": { + "0": "create:block/portable_storage_interface", + "particle": "create:block/portable_storage_interface" + }, + "elements": [ + { + "from": [3, 7, 3], + "to": [13, 14.1, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [11, 15, 11]}, + "faces": { + "north": {"uv": [1.5, 0, 6.5, 3.5], "texture": "#0"}, + "east": {"uv": [1.5, 0, 6.5, 3.5], "texture": "#0"}, + "south": {"uv": [1.5, 0, 6.5, 3.5], "texture": "#0"}, + "west": {"uv": [1.5, 0, 6.5, 3.5], "texture": "#0"} + } + }, + { + "from": [1, 14, 1], + "to": [15, 16, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 15, 8]}, + "faces": { + "north": {"uv": [8.5, 15, 15.5, 16], "texture": "#0"}, + "east": {"uv": [8.5, 15, 15.5, 16], "texture": "#0"}, + "south": {"uv": [8.5, 15, 15.5, 16], "texture": "#0"}, + "west": {"uv": [8.5, 15, 15.5, 16], "texture": "#0"}, + "up": {"uv": [8.5, 8, 15.5, 15], "texture": "#0"}, + "down": {"uv": [8.5, 8, 15.5, 15], "texture": "#0"} + } + }, + { + "from": [4, 13.1, 13], + "to": [6, 15.1, 14], + "rotation": {"angle": 45, "axis": "x", "origin": [8, 14, 13]}, + "faces": { + "east": {"uv": [7.5, 10, 8, 10.5], "texture": "#0"}, + "south": {"uv": [10, 15, 11, 16], "texture": "#0"}, + "west": {"uv": [7.5, 10, 8, 10.5], "texture": "#0"} + } + }, + { + "from": [10, 13.1, 2], + "to": [12, 15.1, 3], + "rotation": {"angle": -45, "axis": "x", "origin": [8, 14, 3]}, + "faces": { + "north": {"uv": [10, 15, 11, 16], "texture": "#0"}, + "east": {"uv": [7.5, 10, 8, 10.5], "texture": "#0"}, + "west": {"uv": [7.5, 10, 8, 10.5], "texture": "#0"} + } + }, + { + "from": [2, 13.1, 4], + "to": [3, 15.1, 6], + "rotation": {"angle": 45, "axis": "z", "origin": [3, 14, 8]}, + "faces": { + "north": {"uv": [7.5, 10, 8, 10.5], "texture": "#0"}, + "south": {"uv": [7.5, 10, 8, 10.5], "texture": "#0"}, + "west": {"uv": [10, 15, 11, 16], "texture": "#0"} + } + }, + { + "from": [13, 13.1, 10], + "to": [14, 15.1, 12], + "rotation": {"angle": -45, "axis": "z", "origin": [13, 14, 8]}, + "faces": { + "north": {"uv": [7.5, 10, 8, 10.5], "texture": "#0"}, + "east": {"uv": [10, 15, 11, 16], "texture": "#0"}, + "south": {"uv": [7.5, 10, 8, 10.5], "texture": "#0"} + } + }, + { + "from": [10, 13.1, 13], + "to": [12, 15.1, 14], + "rotation": {"angle": 45, "axis": "x", "origin": [8, 14, 13]}, + "faces": { + "east": {"uv": [7.5, 10, 8, 10.5], "texture": "#0"}, + "south": {"uv": [13, 15, 14, 16], "texture": "#0"}, + "west": {"uv": [7.5, 10, 8, 10.5], "texture": "#0"} + } + }, + { + "from": [4, 13.1, 2], + "to": [6, 15.1, 3], + "rotation": {"angle": -45, "axis": "x", "origin": [8, 14, 3]}, + "faces": { + "north": {"uv": [13, 15, 14, 16], "texture": "#0"}, + "east": {"uv": [7.5, 10, 8, 10.5], "texture": "#0"}, + "west": {"uv": [7.5, 10, 8, 10.5], "texture": "#0"} + } + }, + { + "from": [2, 13.1, 10], + "to": [3, 15.1, 12], + "rotation": {"angle": 45, "axis": "z", "origin": [3, 14, 8]}, + "faces": { + "north": {"uv": [7.5, 10, 8, 10.5], "texture": "#0"}, + "south": {"uv": [7.5, 10, 8, 10.5], "texture": "#0"}, + "west": {"uv": [13, 15, 14, 16], "texture": "#0"} + } + }, + { + "from": [13, 13.1, 4], + "to": [14, 15.1, 6], + "rotation": {"angle": -45, "axis": "z", "origin": [13, 14, 8]}, + "faces": { + "north": {"uv": [7.5, 10, 8, 10.5], "texture": "#0"}, + "east": {"uv": [13, 15, 14, 16], "texture": "#0"}, + "south": {"uv": [7.5, 10, 8, 10.5], "texture": "#0"} + } + } + ], + "groups": [ + { + "name": "Top", + "origin": [10, 22, 10], + "children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/portable_storage_interface/brass_casing.png b/src/main/resources/assets/create/models/block/portable_storage_interface/brass_casing.png new file mode 100644 index 0000000000000000000000000000000000000000..fb657ce47b52fd3940f9f47a581da366d3023e64 GIT binary patch literal 432 zcmV;h0Z;ykP)Px#1ZP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q`v`Hv%wCq`im>ZvTE}d6}c&8;$5FcK!PGa(_HVYt7oq zkiD&#)w?iUTm&E}HQz7mJ<=*-nvg;rBk zQKE{Hpz9IJE}`rabUn11+Td<|wP_asSiM{2)==zj?gmkoB~nU+5Uk#9_kp}*ghJ;f z!uQzAD+Yu=y8xTt+BRHVBu!J&G_|zPvn~ce6Oj2YqR?xU zA8JHqZh{j+aPwBocOSL_IDV{eg=bG5G^q@v$0$`~Nls6SMtgNTT%omX#m0Y-Wrw~M zJMCP#Vl$$21uBA$WyRP+6xoH>R)$s+CM724Yb!(AZCd~&6OT_mKKZ{TGpMg%gMPr% zbXM=?gh`^<+ltxV*(XT?pi+90D7JT$orhtCu>r(!N*vE#KF@v`9UOWY%`PL=cj5Mq sVv;Ge?x6MTGkuaNws-a&f0e5L0P#E|0%6t&tN;K207*qoM6N<$g5E>mq5uE@ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/block/portable_storage_interface.png b/src/main/resources/assets/create/textures/block/portable_storage_interface.png new file mode 100644 index 0000000000000000000000000000000000000000..0e9ade6777821ca96b04a5b3c5572d9a36e90dae GIT binary patch literal 4142 zcmV+}5Yg|6P) zaB^>EX>4U6ba`-PAZ2)IW&i+q+O3yqlH)iIh5z#ua|CfGkHa-$ZZOB6?@_Xyl~rBQ z72S5Gtc4<$2Rr~~{qMiq{D+Uf(q%%-CDoKJKB0!{8YkttKkXdt70&T|-1CU*AMTs? z1II1TufH!#dhRdov&cRR%Xs!_+>c*2s_S{se|*rMja+#IJojIMyuAfn&&H-b8+rFg z4)=Ax&AL)8`Kt-zS-+p>#|``&9fHp;#bk5f7~GX}s+<>hg^b^(6y3vBy%+nl(YI^! zTI$frEpPqB(Mdyp|2O_CN5^yBv7CorYeC>7_$fqyBJqQQSUH8_-9L+G2Po1mkgY!N7KP?Ew5e+D~x#1GHyh zPGZ!SeGWP1lyfe* z=4Og7p~R9(E~V7cs;eHxjg@??rPkUSLK{0b-fk>tt-J1f=&`4sd+D{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