From b8490038fd12a0db8a820229ca72c39ca251c6cb Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Fri, 24 Jan 2020 22:55:20 +0100 Subject: [PATCH] Double Crates - FlexCrates -> Adjustable Crates - Adjustable Crates will now connect to adjacent crates and merge inventories --- .../com/simibubi/create/ScreenResources.java | 1 + .../filtering/FilteringBehaviour.java | 2 +- .../inventory/SynchronizedExtraction.java | 7 ++ .../crusher/CrushingWheelBlock.java | 5 +- .../block/inventories/FlexcrateBlock.java | 96 ++++++++++++++++-- .../block/inventories/FlexcrateContainer.java | 13 ++- .../block/inventories/FlexcrateScreen.java | 33 ++++-- .../inventories/FlexcrateTileEntity.java | 69 +++++++++++-- .../assets/create/blockstates/flexcrate.json | 14 ++- .../resources/assets/create/lang/en_us.json | 6 +- .../models/block/flexcrate/double_bottom.json | 22 ++++ .../models/block/flexcrate/double_left.json | 23 +++++ .../models/block/flexcrate/double_right.json | 23 +++++ .../models/block/flexcrate/double_top.json | 22 ++++ .../single.json} | 0 .../assets/create/models/item/flexcrate.json | 2 +- .../block/double_flexcrate_bottom.png | Bin 0 -> 763 bytes .../textures/block/double_flexcrate_side.png | Bin 0 -> 1531 bytes .../create/textures/block/flex_crate.png | Bin 580 -> 561 bytes .../create/textures/gui/double_flexcrate.png | Bin 0 -> 2133 bytes .../gui/flex_crate_and_stockpile_switch.png | Bin 13655 -> 13655 bytes 21 files changed, 298 insertions(+), 40 deletions(-) create mode 100644 src/main/resources/assets/create/models/block/flexcrate/double_bottom.json create mode 100644 src/main/resources/assets/create/models/block/flexcrate/double_left.json create mode 100644 src/main/resources/assets/create/models/block/flexcrate/double_right.json create mode 100644 src/main/resources/assets/create/models/block/flexcrate/double_top.json rename src/main/resources/assets/create/models/block/{flex_crate.json => flexcrate/single.json} (100%) create mode 100644 src/main/resources/assets/create/textures/block/double_flexcrate_bottom.png create mode 100644 src/main/resources/assets/create/textures/block/double_flexcrate_side.png create mode 100644 src/main/resources/assets/create/textures/gui/double_flexcrate.png diff --git a/src/main/java/com/simibubi/create/ScreenResources.java b/src/main/java/com/simibubi/create/ScreenResources.java index 4c83da215..b23056447 100644 --- a/src/main/java/com/simibubi/create/ScreenResources.java +++ b/src/main/java/com/simibubi/create/ScreenResources.java @@ -23,6 +23,7 @@ public enum ScreenResources { SCHEMATICANNON_FUEL("schematicannon.png", 0, 215, 82, 4), FLEXCRATE("flex_crate_and_stockpile_switch.png", 125, 129), + FLEXCRATE_DOUBLE("double_flexcrate.png", 197, 129), FLEXCRATE_LOCKED_SLOT("flex_crate_and_stockpile_switch.png", 138, 0, 18, 18), STOCKSWITCH("flex_crate_and_stockpile_switch.png", 0, 129, 205, 93), diff --git a/src/main/java/com/simibubi/create/foundation/behaviour/filtering/FilteringBehaviour.java b/src/main/java/com/simibubi/create/foundation/behaviour/filtering/FilteringBehaviour.java index ebaaf0c94..1ee10c9f0 100644 --- a/src/main/java/com/simibubi/create/foundation/behaviour/filtering/FilteringBehaviour.java +++ b/src/main/java/com/simibubi/create/foundation/behaviour/filtering/FilteringBehaviour.java @@ -39,7 +39,7 @@ public class FilteringBehaviour extends TileEntityBehaviour { callback = stack -> { }; textShift = Vec3d.ZERO; - count = -1; + count = 0; ticksUntilScrollPacket = -1; } diff --git a/src/main/java/com/simibubi/create/foundation/behaviour/inventory/SynchronizedExtraction.java b/src/main/java/com/simibubi/create/foundation/behaviour/inventory/SynchronizedExtraction.java index 34407b2c9..3aaf30fbd 100644 --- a/src/main/java/com/simibubi/create/foundation/behaviour/inventory/SynchronizedExtraction.java +++ b/src/main/java/com/simibubi/create/foundation/behaviour/inventory/SynchronizedExtraction.java @@ -3,7 +3,9 @@ package com.simibubi.create.foundation.behaviour.inventory; import java.util.ArrayList; import java.util.List; +import com.simibubi.create.AllBlocks; import com.simibubi.create.foundation.behaviour.base.TileEntityBehaviour; +import com.simibubi.create.modules.logistics.block.inventories.FlexcrateBlock; import net.minecraft.block.BlockState; import net.minecraft.block.ChestBlock; @@ -45,6 +47,11 @@ public class SynchronizedExtraction { if (blockState.get(ChestBlock.TYPE) != ChestType.SINGLE) inventoryPositions.add(inventoryPos.offset(ChestBlock.getDirectionToAttached(blockState))); + // Sync across flexcrates + if (AllBlocks.FLEXCRATE.typeOf(blockState)) + if (blockState.get(FlexcrateBlock.DOUBLE)) + inventoryPositions.add(inventoryPos.offset(blockState.get(FlexcrateBlock.FACING))); + for (BlockPos pos : inventoryPositions) { for (Direction direction : Direction.values()) { SingleTargetAutoExtractingBehaviour behaviour = TileEntityBehaviour.get(reader, pos.offset(direction), diff --git a/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingWheelBlock.java b/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingWheelBlock.java index 80c3c026a..82f41e7e5 100644 --- a/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingWheelBlock.java +++ b/src/main/java/com/simibubi/create/modules/contraptions/components/crusher/CrushingWheelBlock.java @@ -72,7 +72,8 @@ public class CrushingWheelBlock extends RotatedPillarKineticBlock { boolean controllerShouldExist = false; boolean controllerShouldBeValid = false; - if (AllBlocks.CRUSHING_WHEEL.typeOf(world.getBlockState(otherWheelPos))) { + BlockState otherState = world.getBlockState(otherWheelPos); + if (AllBlocks.CRUSHING_WHEEL.typeOf(otherState)) { controllerShouldExist = true; KineticTileEntity te = (KineticTileEntity) world.getTileEntity(pos); KineticTileEntity otherTe = (KineticTileEntity) world.getTileEntity(otherWheelPos); @@ -80,6 +81,8 @@ public class CrushingWheelBlock extends RotatedPillarKineticBlock { float signum = Math.signum(te.getSpeed()) * (state.get(AXIS) == Axis.X ? -1 : 1); controllerShouldBeValid = facing.getAxisDirection().getOffset() != signum; } + if (otherState.get(AXIS) != state.get(AXIS)) + controllerShouldExist = false; } if (!controllerShouldExist) { diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/inventories/FlexcrateBlock.java b/src/main/java/com/simibubi/create/modules/logistics/block/inventories/FlexcrateBlock.java index b496f3e71..2d376ebff 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/block/inventories/FlexcrateBlock.java +++ b/src/main/java/com/simibubi/create/modules/logistics/block/inventories/FlexcrateBlock.java @@ -1,5 +1,7 @@ package com.simibubi.create.modules.logistics.block.inventories; +import com.simibubi.create.AllBlocks; +import com.simibubi.create.foundation.block.ProperDirectionalBlock; import com.simibubi.create.foundation.utility.AllShapes; import net.minecraft.block.Block; @@ -7,21 +9,30 @@ import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.ServerPlayerEntity; -import net.minecraft.inventory.InventoryHelper; +import net.minecraft.item.BlockItemUseContext; +import net.minecraft.item.ItemStack; +import net.minecraft.state.BooleanProperty; +import net.minecraft.state.StateContainer.Builder; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.Direction; +import net.minecraft.util.Direction.AxisDirection; import net.minecraft.util.Hand; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockRayTraceResult; 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; import net.minecraftforge.fml.network.NetworkHooks; -public class FlexcrateBlock extends Block { +public class FlexcrateBlock extends ProperDirectionalBlock { + + public static final BooleanProperty DOUBLE = BooleanProperty.create("double"); public FlexcrateBlock() { super(Properties.from(Blocks.ANDESITE)); + setDefaultState(getDefaultState().with(FACING, Direction.UP).with(DOUBLE, false)); } @Override @@ -29,11 +40,75 @@ public class FlexcrateBlock extends Block { return AllShapes.CRATE_BLOCK_SHAPE; } + @Override + protected void fillStateContainer(Builder builder) { + super.fillStateContainer(builder.add(DOUBLE)); + } + @Override public boolean hasTileEntity(BlockState state) { return true; } + @Override + public BlockState getStateForPlacement(BlockItemUseContext context) { + BlockPos pos = context.getPos(); + World world = context.getWorld(); + + if (!context.isPlacerSneaking()) { + for (Direction d : Direction.values()) { + BlockState state = world.getBlockState(pos.offset(d)); + if (AllBlocks.FLEXCRATE.typeOf(state) && !state.get(DOUBLE)) + return getDefaultState().with(FACING, d).with(DOUBLE, true); + } + } + + Direction placedOnFace = context.getFace().getOpposite(); + BlockState state = world.getBlockState(pos.offset(placedOnFace)); + if (AllBlocks.FLEXCRATE.typeOf(state) && !state.get(DOUBLE)) + return getDefaultState().with(FACING, placedOnFace).with(DOUBLE, true); + return getDefaultState(); + } + + @Override + public void onBlockAdded(BlockState state, World worldIn, BlockPos pos, BlockState oldState, boolean isMoving) { + if (oldState.getBlock() != state.getBlock() && state.hasTileEntity() && state.get(DOUBLE) + && state.get(FACING).getAxisDirection() == AxisDirection.POSITIVE) { + FlexcrateTileEntity te = (FlexcrateTileEntity) worldIn.getTileEntity(pos); + FlexcrateTileEntity other = te.getOtherCrate(); + if (other == null) + return; + for (int slot = 0; slot < other.inventory.getSlots(); slot++) { + te.inventory.setStackInSlot(slot, other.inventory.getStackInSlot(slot)); + other.inventory.setStackInSlot(slot, ItemStack.EMPTY); + } + te.allowedAmount = other.allowedAmount; + } + } + + @Override + public BlockState updatePostPlacement(BlockState stateIn, Direction facing, BlockState facingState, IWorld worldIn, + BlockPos currentPos, BlockPos facingPos) { + + boolean isDouble = stateIn.get(DOUBLE); + Direction blockFacing = stateIn.get(FACING); + boolean isFacingOther = AllBlocks.FLEXCRATE.typeOf(facingState) && facingState.get(DOUBLE) + && facingState.get(FACING) == facing.getOpposite(); + + if (!isDouble) { + if (!isFacingOther) + return stateIn; + return stateIn.with(DOUBLE, true).with(FACING, facing); + } + + if (facing != blockFacing) + return stateIn; + if (!isFacingOther) + return stateIn.with(DOUBLE, false); + + return stateIn; + } + @Override public boolean onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { @@ -41,9 +116,12 @@ public class FlexcrateBlock extends Block { if (worldIn.isRemote) { return true; } else { - FlexcrateTileEntity te = (FlexcrateTileEntity) worldIn.getTileEntity(pos); - if (te != null) - NetworkHooks.openGui((ServerPlayerEntity) player, te, te::sendToContainer); + TileEntity te = worldIn.getTileEntity(pos); + if (te instanceof FlexcrateTileEntity) { + FlexcrateTileEntity fte = (FlexcrateTileEntity) te; + fte = fte.getMainCrate(); + NetworkHooks.openGui((ServerPlayerEntity) player, fte, fte::sendToContainer); + } return true; } } @@ -58,13 +136,9 @@ public class FlexcrateBlock extends Block { if (worldIn.getTileEntity(pos) == null) return; - FlexcrateTileEntity te = (FlexcrateTileEntity) worldIn.getTileEntity(pos); - for (int slot = 0; slot < te.inventory.getSlots(); slot++) { - InventoryHelper.spawnItemStack(worldIn, pos.getX(), pos.getY(), pos.getZ(), - te.inventory.getStackInSlot(slot)); - } - if (state.hasTileEntity() && state.getBlock() != newState.getBlock()) { + FlexcrateTileEntity te = (FlexcrateTileEntity) worldIn.getTileEntity(pos); + te.onDestroyed(); worldIn.removeTileEntity(pos); } diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/inventories/FlexcrateContainer.java b/src/main/java/com/simibubi/create/modules/logistics/block/inventories/FlexcrateContainer.java index 55fd0d0eb..8c093cd0b 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/block/inventories/FlexcrateContainer.java +++ b/src/main/java/com/simibubi/create/modules/logistics/block/inventories/FlexcrateContainer.java @@ -16,6 +16,7 @@ public class FlexcrateContainer extends Container { public FlexcrateTileEntity te; public PlayerInventory playerInventory; + public boolean doubleCrate; public FlexcrateContainer(int id, PlayerInventory inv, PacketBuffer extraData) { super(AllContainers.FLEXCRATE.type, id); @@ -34,9 +35,12 @@ public class FlexcrateContainer extends Container { } private void init() { + doubleCrate = te.isDoubleCrate(); + int x = doubleCrate ? 52 : 124; + int maxCol = doubleCrate ? 8 : 4; for (int row = 0; row < 4; ++row) { - for (int col = 0; col < 4; ++col) { - this.addSlot(new SlotItemHandler(te.inventory, col + row * 4, 124 + col * 18, 25 + row * 18)); + for (int col = 0; col < maxCol; ++col) { + this.addSlot(new SlotItemHandler(te.inventory, col + row * maxCol, x + col * 18, 25 + row * 18)); } } @@ -55,7 +59,7 @@ public class FlexcrateContainer extends Container { detectAndSendChanges(); } - + @Override public ItemStack transferStackInSlot(PlayerEntity playerIn, int index) { Slot clickedSlot = getSlot(index); @@ -66,8 +70,7 @@ public class FlexcrateContainer extends Container { if (index < 16) { mergeItemStack(stack, 16, inventorySlots.size(), false); te.inventory.onContentsChanged(index); - } - else + } else mergeItemStack(stack, 0, 15, false); return ItemStack.EMPTY; diff --git a/src/main/java/com/simibubi/create/modules/logistics/block/inventories/FlexcrateScreen.java b/src/main/java/com/simibubi/create/modules/logistics/block/inventories/FlexcrateScreen.java index 7a17c3f3c..5ef02e6fe 100644 --- a/src/main/java/com/simibubi/create/modules/logistics/block/inventories/FlexcrateScreen.java +++ b/src/main/java/com/simibubi/create/modules/logistics/block/inventories/FlexcrateScreen.java @@ -1,6 +1,7 @@ package com.simibubi.create.modules.logistics.block.inventories; import static com.simibubi.create.ScreenResources.FLEXCRATE; +import static com.simibubi.create.ScreenResources.FLEXCRATE_DOUBLE; import static com.simibubi.create.ScreenResources.PLAYER_INVENTORY; import java.util.ArrayList; @@ -47,9 +48,9 @@ public class FlexcrateScreen extends AbstractSimiContainerScreen lastModification = 0); + allowedItems = new ScrollInput(guiLeft + 100 + 65, guiTop + 104, 41, 14).titled(storageSpace) + .withRange(1, (container.doubleCrate ? 2049 : 1025)).writingTo(allowedItemsLabel).withShiftStep(64) + .setState(te.allowedAmount).calling(s -> lastModification = 0); allowedItems.onChanged(); widgets.add(allowedItemsLabel); widgets.add(allowedItems); @@ -67,28 +68,35 @@ public class FlexcrateScreen extends AbstractSimiContainerScreen slot * 64) continue; - int x = crateLeft + 23 + (slot % 4) * 18; - int y = crateTop + 24 + (slot / 4) * 18; + int slotsPerRow = (container.doubleCrate ? 8 : 4); + int x = crateLeft + 23 + (slot % slotsPerRow) * 18; + int y = crateTop + 24 + (slot / slotsPerRow) * 18; ScreenResources.FLEXCRATE_LOCKED_SLOT.draw(this, x, y); } ScreenElementRenderer.renderBlock(this::getRenderedBlock); - //to see or debug the bounds of the extra area uncomment the following lines - //Rectangle2d r = extraAreas.get(0); - //fill(r.getX() + r.getWidth(), r.getY() + r.getHeight(), r.getX(), r.getY(), 0xd3d3d3d3); + // to see or debug the bounds of the extra area uncomment the following lines + // Rectangle2d r = extraAreas.get(0); + // fill(r.getX() + r.getWidth(), r.getY() + r.getHeight(), r.getX(), r.getY(), + // 0xd3d3d3d3); } @Override @@ -106,6 +114,9 @@ public class FlexcrateScreen extends AbstractSimiContainerScreen LazyOptional getCapability(Capability capability, Direction facing) { if (capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) - return invHandler.cast(); + return getMainCrate().invHandler.cast(); return super.getCapability(capability, facing); } diff --git a/src/main/resources/assets/create/blockstates/flexcrate.json b/src/main/resources/assets/create/blockstates/flexcrate.json index 6dfa15028..cb94c53e6 100644 --- a/src/main/resources/assets/create/blockstates/flexcrate.json +++ b/src/main/resources/assets/create/blockstates/flexcrate.json @@ -1,5 +1,17 @@ { "variants": { - "": { "model": "create:block/flex_crate" } + "double=true,facing=up": { "model": "create:block/flexcrate/double_bottom" }, + "double=true,facing=down": { "model": "create:block/flexcrate/double_top" }, + "double=true,facing=west": { "model": "create:block/flexcrate/double_left", "y": 90 }, + "double=true,facing=east": { "model": "create:block/flexcrate/double_right", "y": 90 }, + "double=true,facing=north": { "model": "create:block/flexcrate/double_right" }, + "double=true,facing=south": { "model": "create:block/flexcrate/double_left" }, + + "double=false,facing=up": { "model": "create:block/flexcrate/single" }, + "double=false,facing=down": { "model": "create:block/flexcrate/single" }, + "double=false,facing=west": { "model": "create:block/flexcrate/single" }, + "double=false,facing=east": { "model": "create:block/flexcrate/single" }, + "double=false,facing=north": { "model": "create:block/flexcrate/single" }, + "double=false,facing=south": { "model": "create:block/flexcrate/single" } } } \ 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 e96312743..c5c539543 100644 --- a/src/main/resources/assets/create/lang/en_us.json +++ b/src/main/resources/assets/create/lang/en_us.json @@ -110,7 +110,7 @@ "block.create.contact": "Redstone Contact", "block.create.redstone_bridge": "Redstone Link", "block.create.stockswitch": "Stockpile Switch", - "block.create.flexcrate": "FlexCrate", + "block.create.flexcrate": "Adjustable Crate", "block.create.extractor": "Extractor", "block.create.belt_funnel": "Funnel", "block.create.linked_extractor": "Linked Extractor", @@ -291,7 +291,7 @@ "create.logistics.firstFrequency": "Freq. #1", "create.logistics.secondFrequency": "Freq. #2", - "create.gui.flexcrate.title": "FlexCrate", + "create.gui.flexcrate.title": "Adjustable Crate", "create.gui.flexcrate.storageSpace": "Storage Space", "create.gui.stockswitch.title": "Stockpile Switch", @@ -737,7 +737,7 @@ "block.create.contact.tooltip.condition2": "When moved by Mechanical Piston", "block.create.contact.tooltip.behaviour2": "Triggers all stationary Contacts passing by", - "block.create.flexcrate.tooltip": "FLEXCRATE", + "block.create.flexcrate.tooltip": "ADJUSTABLE CRATE", "block.create.flexcrate.tooltip.summary": "This _Storage_ _Container_ allows Manual control over its capacity. It can hold up to _16_ _Stacks_ of any Item", "block.create.flexcrate.tooltip.control1": "When R-Clicked", "block.create.flexcrate.tooltip.action1": "Opens the _Interface_", diff --git a/src/main/resources/assets/create/models/block/flexcrate/double_bottom.json b/src/main/resources/assets/create/models/block/flexcrate/double_bottom.json new file mode 100644 index 000000000..3d3ec3d4e --- /dev/null +++ b/src/main/resources/assets/create/models/block/flexcrate/double_bottom.json @@ -0,0 +1,22 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "create:block/double_flexcrate_side", + "3": "create:block/brass_casing_14", + "particle": "create:block/flex_crate" + }, + "elements": [ + { + "from": [1, 0, 1], + "to": [15, 16, 15], + "faces": { + "north": {"uv": [8.5, 8, 15.5, 16], "texture": "#0"}, + "east": {"uv": [8.5, 8, 15.5, 16], "texture": "#0"}, + "south": {"uv": [8.5, 8, 15.5, 16], "texture": "#0"}, + "west": {"uv": [8.5, 8, 15.5, 16], "texture": "#0"}, + "down": {"uv": [1, 1, 15, 15], "rotation": 270, "texture": "#3"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/flexcrate/double_left.json b/src/main/resources/assets/create/models/block/flexcrate/double_left.json new file mode 100644 index 000000000..4055d2672 --- /dev/null +++ b/src/main/resources/assets/create/models/block/flexcrate/double_left.json @@ -0,0 +1,23 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "create:block/double_flexcrate_side", + "1": "create:block/double_flexcrate_bottom", + "2": "create:block/flex_crate", + "particle": "create:block/flex_crate" + }, + "elements": [ + { + "from": [1, 0, 1], + "to": [15, 14, 16], + "faces": { + "north": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "east": {"uv": [8, 0.5, 15.5, 7.5], "texture": "#0"}, + "west": {"uv": [0.5, 0.5, 8, 7.5], "texture": "#0"}, + "up": {"uv": [0.5, 0.5, 8, 7.5], "rotation": 90, "texture": "#1"}, + "down": {"uv": [0.5, 0.5, 8, 7.5], "rotation": 270, "texture": "#1"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/flexcrate/double_right.json b/src/main/resources/assets/create/models/block/flexcrate/double_right.json new file mode 100644 index 000000000..92b457020 --- /dev/null +++ b/src/main/resources/assets/create/models/block/flexcrate/double_right.json @@ -0,0 +1,23 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "create:block/double_flexcrate_side", + "1": "create:block/double_flexcrate_bottom", + "2": "create:block/flex_crate", + "particle": "create:block/flex_crate" + }, + "elements": [ + { + "from": [1, 0, 0], + "to": [15, 14, 15], + "faces": { + "east": {"uv": [0.5, 0.5, 8, 7.5], "texture": "#0"}, + "south": {"uv": [1, 1, 15, 15], "texture": "#2"}, + "west": {"uv": [8, 0.5, 15.5, 7.5], "texture": "#0"}, + "up": {"uv": [8, 0.5, 15.5, 7.5], "rotation": 90, "texture": "#1"}, + "down": {"uv": [8, 0.5, 15.5, 7.5], "rotation": 270, "texture": "#1"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/flexcrate/double_top.json b/src/main/resources/assets/create/models/block/flexcrate/double_top.json new file mode 100644 index 000000000..8defc54ef --- /dev/null +++ b/src/main/resources/assets/create/models/block/flexcrate/double_top.json @@ -0,0 +1,22 @@ +{ + "credit": "Made with Blockbench", + "parent": "block/block", + "textures": { + "0": "create:block/double_flexcrate_side", + "3": "create:block/brass_casing_14", + "particle": "create:block/flex_crate" + }, + "elements": [ + { + "from": [1, 0, 1], + "to": [15, 14, 15], + "faces": { + "north": {"uv": [0.5, 8.5, 7.5, 15.5], "texture": "#0"}, + "east": {"uv": [0.5, 8.5, 7.5, 15.5], "texture": "#0"}, + "south": {"uv": [0.5, 8.5, 7.5, 15.5], "texture": "#0"}, + "west": {"uv": [0.5, 8.5, 7.5, 15.5], "texture": "#0"}, + "up": {"uv": [1, 1, 15, 15], "rotation": 90, "texture": "#3"} + } + } + ] +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/block/flex_crate.json b/src/main/resources/assets/create/models/block/flexcrate/single.json similarity index 100% rename from src/main/resources/assets/create/models/block/flex_crate.json rename to src/main/resources/assets/create/models/block/flexcrate/single.json diff --git a/src/main/resources/assets/create/models/item/flexcrate.json b/src/main/resources/assets/create/models/item/flexcrate.json index 8e844dbae..90610cbde 100644 --- a/src/main/resources/assets/create/models/item/flexcrate.json +++ b/src/main/resources/assets/create/models/item/flexcrate.json @@ -1,3 +1,3 @@ { - "parent": "create:block/flex_crate" + "parent": "create:block/flexcrate/single" } \ No newline at end of file diff --git a/src/main/resources/assets/create/textures/block/double_flexcrate_bottom.png b/src/main/resources/assets/create/textures/block/double_flexcrate_bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..9b95e424be52869ecd19b3b2eac603ad46ec52c5 GIT binary patch literal 763 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0+2~WK~z{r?NvRC z6Hyes`It#E`B<}Tz_n083?jI_RyJE&SPB+)Vxy&vwLic{>?{N;e}JWIqq3ES$l9zn z3K2sRGs%4W&V6$yF9XS@OEU)^_vPJt-kdq_=1nO{651wMz~cwkG8L9pPG>|x5T`RW z4`Z^bi`+V(7H}F>jwZ}KU%dWSVgV2DT}|#D-sVMj9_i@LY2pUt)b%Elsi)-flq%&) zww{M&RXEmdl`oZfA7Ji>9Cy#PIKDqRqE~OfYXOh$_mjh$x9HjPcbo)j>TMlcZ|3?D zdFfl3K#f51oA91KxkDen9Mj7;CrY9Mtc605`{!G9{bGkY%_{BhHF#XPpx4aN+p+1= zo=l9_VBQ0T|hZP?__A{vb59L+gm80faKDZQTh;~aP< zmIUCu#7fu)i+i0K+bZk$jhxtv8d$q2FW(bO0tB#5Y#q*gew(UYW;?}d)L;Ox7TAQB z$C7}qV`X;2F4&DtVB6Q9W42SQMuf$vGmqgc9-gt=cG4#r0^GSiSGG$!Jnd%8VWo64 zYQ%2yIPyHKqh1DTR`x&?>;J6S3Jcd+Do21Jzw$qSWSj=5YuQXf6 tSrcvxg@8gpA)pXY2q**;0=6uG=s$#jPfOiWBdGuY002ovPDHLkV1g@}SPK9E literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/block/double_flexcrate_side.png b/src/main/resources/assets/create/textures/block/double_flexcrate_side.png new file mode 100644 index 0000000000000000000000000000000000000000..0a80962358b68730aaed104c9aec530ee1d24bf1 GIT binary patch literal 1531 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!T9Dj@_#s1mnc zkvR3nsYn%2qNE8)8aE+7O;X2>z5dy?xAVRAv&T+L(^9FQG`q8JXXbtL{$@hH@6*!+ z6S(l{*$#_Zy+z@0&^IGNr{T7!)grQ@Vg3&|RgdhL!S9hFlV!l8%>VkQ`4AKM<%jqE z)SyL+w|3NG2_E3OF28GyCJltRtNKv(|NoDtZ91sb>CN{p1q99<8}v_2Bq+b@P~8g{ zMvXAp<^cB{wTQ?C_z(2U1@a%jI{F&WwYXKLxqlA=0x#xLelBA(0lW<}OgqIIjixM~ zAb@N*W>TZ+Q>78?5M#VXi{}7(UkBtnr8*N4U4P_@As#6^#T$!bFcdk}CM%V<=LVr- zDx1d52sexcFh=@#<6C5Cg=&M0NT^2_aL59>3xIy}4cig^24oTazwR3Jb-BoN3v^;& zG-aw?HrPM9IbjjNjs?mf`!5&iGJQT=2CKsNq6;x_*jWm?Ibm)zal^x0B;RQIe2JZY zumxV78SztblQs+09+TbA!~!vOzl#L&AJE6Zg`%tD0>nTvZcwS>(R4P!y8vU|6#xRM zU*7Mc2LWR-A38)=CkuoBNHvima1}5&iidAOf$#FIcu)Z{zFOScVx=SrbDm2bee7~ zZ+6r0aqj~-&(YTjWRhWuTQ=?2i6FDWA^LNEg-jKg6KRX)*BpBJ`4hBsd#4+Ov%h}k z-z_>vz7L!_o~HG!eLl}2M_Qp>jID}I4$y(QPHotp4xqj%^nRhl&fmp3;Hsj z2}s34eO}$E@R7NxOpJ!_U3HULRp&S47=xo!<^Uj{Pyw3F4ALv7kC9JJT3_F!v839* zhRzwnWCNG61m+)z7<6Z^L_-mmvPo6Bs%1(U4H~mNDi%u=Qp@Hhhv|jsNea8&iwgiU zg@X!teu%1dF1W#$xs%?S}?n~K!8I`Hoyd6!l8JK2SOnxIjRXFu>_qxndSb~-xtWX zx;qe5+V!E~c|8iT9xR}5?4azlds+-g8p&JC=Bl6qTgY9tJHT#ROMnfaA+qz^C9>iP zZg*-1r{q{VNkz}3su!hHDoNXSE4?m&0+dXksdT_Z0H<7QfCCFLyRfvza=1dz0&D=c zoXO!BotaAZG+c0`O=esf#e;EILzu!{+9 z!^otbG?Whn8~iWn5;me-QW4q9s~a?uFnjzfxN_+u`sS;5xsMb@L;8YHvC`nTq%X++ z{N0E2#rd~*JTE7^LEypf5JFLwyls}Q< h_;D{Z7cbuo-2;+-Ypt%Gmnr}N002ovPDHLkV1h5Y$p`=d literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/block/flex_crate.png b/src/main/resources/assets/create/textures/block/flex_crate.png index 44d648bd0e4725d690ac44886829365d3f4dff3e..27e78bb3369eb3dbfc35baf2e58d693a88eaaa4e 100644 GIT binary patch delta 485 zcmV(A=nGd#h!6Y7ZEg_go2s9Q~0Nn8qe6VxlCIKr15l{;lt@Mi8uBt_8AI zFG{Txi03;}EqVM7vKP2Aj17##8>>t{I%DY$Bl^8zEIaFl{Mnu86;aG`D1b7p zU27CcfbEPFeShwa6N=f)mcuvn*cnH($b#Ve*Pb*ts|><7RD{;%V*w*Khf?6P1(XTc zvN4meXv&@k1?r(sBFeLwFl|c)Ao~11_!SHAiGDC$0KEfvN6*{KCANZDV9mz@KQln4 ztwzX?mW(5WZ|4GQd;fI`0L~w<)3%~mct>ln0FDAof>7Je$M`timj6%>wHvWd-7r51h z3wQYiKR|G)ApV2@5+xu)z!;1$WZvD?59^#xg_*4$sJgeh?m2butuC)=8vG9=@b>uW zjmjpk;rp#0g{@PV8g&hHV_*BkYF*;pr>~v_zI=Gq4EtT2{(rc{?OT}wj4`sCqC&@$ zYyDFDckiT_FLOM5`LPu^y5Db}>}5E;Sm42^jV_BC_Fy6D`dH)vCW9D7)gZEpj6L}| z_mpECw5if=>JXhEMVw~vqFCei+!Hy7d@Ktivg2q@qmCA|rD^bMy2jPAkUv|NIJ}pM ze0jC8qX4sY9DfO{Y@N>Tj}sASrz<00d+SPK?qtW&DlcnH*M%%kVerY>3`Yk81@Rj* z+8-r5u|zAkgS2Y0{>>4GE0WP(-HZPGYwmnV{(R^Tkdqp_%oty98?| zxMt0dCOwtHUT|#35;r~INe{=VK05NC7sz*gp>?(I+;IXi8Ah_M+fI~&YnDb!@OpVe zM8N6z&2#LHGhF38$lZxy-8q?;Kn_c~qpu?a z!^VE@KZ&di49pAxJ|V6^aXoESb93`(FQd=^bsu+!=n&78Fqf=&|Gdax7fs+9Jo z>hA9DTi3V0diCo6|NlTOqhK@yhDQi|sM>uIlxs?Y{DOgLdn5yf;P33Jz*yxh@Q5sC zVBk9p!i>lBSEK+7i%Xs^jv*CsZ|AUQ*33Xw!>kpIAZl;JeaR?i=OLb$5b+XQCDBo`dU%Y zHa+fc$=cn_NvUF7*PWHB&TVp2Ymhy_vZ7P!2BQyybpvMt`}WR=f0B{L8k24^)iWl1M{^zj2n%(A@)Qn3m@Q1 zV7lVM`-TB*#RleQam%}91++H@>;SoTnyC>ZP|Csg%7+a0Blm8L+#6pM&=ug+3y-6X0{&sI-vt-@kF2-WuzruR51A+FJ@+zecy0+VQb?&^#vz+ zO7<`x+kMaBzVL+vwq5raAID}d_|CavUgNp)0|oY1|2D7q&AH;u{@=0zx9i^v2i*OC zSXQ7qKe%G@;yr>k>5-2Mu7Ceu!Bn&;zvv6lCgb(*UT0mXziz$2^}p@=2DQKT$lgny z{O|X?1~;Y(^$dH)Hw``qG6vy*TZ|jOo4v06 zw7>ko>wmiq*XQlJ#ra_WB`LO5&NCQT6o8@7z`#-?&v^cP{XXMuDi7ZN+I;29pK~`R zG;H6vJLvS!T6QKg(#YIgl7Uc^p*uu)_6+Ij&lcz;Ld4Jh` VX?JJ6vld%F6$taD0e0sx%2<7)r_ literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/gui/flex_crate_and_stockpile_switch.png b/src/main/resources/assets/create/textures/gui/flex_crate_and_stockpile_switch.png index e577df074c8092b508393574bd0f1368242fde9b..b6da1409e1eff6617cd2af4a32252846d85f836c 100644 GIT binary patch delta 21 ccmcbfbvC)Xhc2EId#q8eTe8-rO)0bJ+@Jpcdz delta 21 dcmcbfbvC)Z&H2EN0L$MaXDYz$^G1psC#2zmej