diff --git a/src/main/generated/.cache/19c08d24c255c2719fbb8ac01f9dff290b763461 b/src/main/generated/.cache/19c08d24c255c2719fbb8ac01f9dff290b763461 index b17045ca0..f0c66f73b 100644 --- a/src/main/generated/.cache/19c08d24c255c2719fbb8ac01f9dff290b763461 +++ b/src/main/generated/.cache/19c08d24c255c2719fbb8ac01f9dff290b763461 @@ -1,13 +1,13 @@ -// 1.20.4 2024-04-01T19:45:11.2977587 Oritech/Model Definitions -0ea8315aed10abcf90ec950fee0062aed26075cb assets\oritech\models\item\energy_pipe.json +// 1.20.4 2024-04-01T23:00:46.7476488 Oritech/Model Definitions 8ede0997449fd1c3f65a07df184768a843b473ed assets\oritech\models\item\centrifuge_block.json +0ea8315aed10abcf90ec950fee0062aed26075cb assets\oritech\models\item\energy_pipe.json 90e28b721796ff7ee21c8eefe4525f03a251d2fb assets\oritech\models\block\machine_extender.json 3fcaea2f05319816f7904137763182c4106c91a9 assets\oritech\blockstates\destroyer_block.json e6f197ee5ac22cd68bc502a86d40b65bfe40884a assets\oritech\models\item\target_designator.json 7eb395cd65df72caf43bedc54067cbf53940fd6c assets\oritech\blockstates\centrifuge_block.json 8ef5ff056a3d2fa26393ec9ccb4b6f3b410f8be8 assets\oritech\models\item\item_pipe.json -b91305cbccecb97f9d74e2b92787ae9fa6387786 assets\oritech\blockstates\fluid_pipe.json 7eb395cd65df72caf43bedc54067cbf53940fd6c assets\oritech\blockstates\fragment_forge_block.json +b91305cbccecb97f9d74e2b92787ae9fa6387786 assets\oritech\blockstates\fluid_pipe.json 98d62a615b70fca694eb00c6b8aa9297c4a92b62 assets\oritech\blockstates\energy_pipe_connection.json 7eb395cd65df72caf43bedc54067cbf53940fd6c assets\oritech\blockstates\big_solar_panel_block.json 3ceff0ef4325bb269831205626285bc857c60de8 assets\oritech\models\item\destroyer_block.json @@ -24,17 +24,18 @@ ee822d455f99c8c53c789fdb744979f678ca2729 assets\oritech\blockstates\fertilizer_b 46af77abe62b29d232feadccde429fd59d5603fc assets\oritech\blockstates\placer_block.json 3d37038977380bd685f913e722cc3b1c3a25c35d assets\oritech\models\item\atomic_forge_block.json 7eb395cd65df72caf43bedc54067cbf53940fd6c assets\oritech\blockstates\test_generator_block.json -b5ee97616ae0d2da17dfaecf45aa42f2cf19f691 assets\oritech\blockstates\machine_extender.json eafe84c787830ab2a866e0878e9ed718d58659f5 assets\oritech\blockstates\banana_block.json +b5ee97616ae0d2da17dfaecf45aa42f2cf19f691 assets\oritech\blockstates\machine_extender.json 25864df3cd7786f2bf4fe6fa9855b3cf366c28ca assets\oritech\models\item\banana.json 1fdbeb99862a58436d745edb768b503539ecb295 assets\oritech\models\item\placer_block.json 58b38bcc6c404953490330d4cc797464b6874d88 assets\oritech\models\item\test_generator_block.json b8bc03092cb1eb686ede01daffc7421253af860c assets\oritech\models\item\machine_extender.json -9cd64a2fe3b9a0ee479646d36cc0302bcd7cab4f assets\oritech\models\block\destroyer_block.json 45fbece69084d6df6eaa4ba344d25eef914c63c3 assets\oritech\models\item\small_storage_block.json +9cd64a2fe3b9a0ee479646d36cc0302bcd7cab4f assets\oritech\models\block\destroyer_block.json 63f14855c688ce7ec236097ce232dd381cbc1538 assets\oritech\blockstates\addon_indicator_block.json 7ee14de0149c70d1145dbf338518690b536cc02e assets\oritech\models\item\powered_furnace_block.json 746b98d721e5ae0d96dd769e71b786afa8c2d142 assets\oritech\models\item\banana_block.json +c0a08ce14172e22abd9f55d82686f7e96e74834a assets\oritech\blockstates\large_storage_block.json 230eb8fa77942cdf46509bea8df75b48f82e9e8e assets\oritech\blockstates\machine_frame_block.json 9caec2452545622571a137712307b8e0e669af9e assets\oritech\models\block\block_fertilizer_head.json 7eb395cd65df72caf43bedc54067cbf53940fd6c assets\oritech\blockstates\atomic_forge_block.json @@ -48,9 +49,9 @@ a5afa0ba8780ec08bd0a9284bc08e0c681fe7158 assets\oritech\blockstates\block_placer 5054284e6d5fe0785ac93bdda5101c47337953cf assets\oritech\models\item\machine_frame_block.json 7b3ae67ec28f9b36b96539cd48b92096861d0853 assets\oritech\models\item\oil_bucket.json 56c7ceb5cc86d67913ad95cb4ae5ec192aed926f assets\oritech\models\block\pump_block.json -7eb395cd65df72caf43bedc54067cbf53940fd6c assets\oritech\blockstates\powered_furnace_block.json 1b9cd3719105dc1e03398de41f2cab37337816fe assets\oritech\blockstates\machine_core_good.json ccd7e87c2ba5a5062bb88aa6e103d49d47cd56ff assets\oritech\blockstates\energy_pipe.json +7eb395cd65df72caf43bedc54067cbf53940fd6c assets\oritech\blockstates\powered_furnace_block.json 5462a2453fcdd2f8b99129894aec60f282d29ca9 assets\oritech\models\item\pulverizer_block.json ae8496aa356910304cb7036f1290ca3f7d76437e assets\oritech\models\item\item_filter_block.json a3f9b72f6f36d42af4e5c3a87d7e180b2e36a2ed assets\oritech\models\item\machine_core_good.json @@ -58,6 +59,7 @@ a3f9b72f6f36d42af4e5c3a87d7e180b2e36a2ed assets\oritech\models\item\machine_core 469ea8a66c529fe26bc029c21092e7f062ed0e40 assets\oritech\models\block\banana_block.json d35ecef5df9198b12dc04267780c727c144b1959 assets\oritech\models\item\assembler_block.json f337c5c80895d0c133e8218a41a0915b307cce18 assets\oritech\blockstates\small_storage_block.json +b6ebdae5692a337d52fe49ec327da5cff08540da assets\oritech\models\item\large_storage_block.json d39d7a8eaa54d12c155fb1acd1722e322c0aeac3 assets\oritech\models\block\block_destroyer_head.json 7eb395cd65df72caf43bedc54067cbf53940fd6c assets\oritech\blockstates\foundry_block.json 30525b49546801c90bc77faa6eab332ba288eca5 assets\oritech\models\item\fertilizer_block.json diff --git a/src/main/generated/assets/oritech/blockstates/large_storage_block.json b/src/main/generated/assets/oritech/blockstates/large_storage_block.json new file mode 100644 index 000000000..c57d9d0b0 --- /dev/null +++ b/src/main/generated/assets/oritech/blockstates/large_storage_block.json @@ -0,0 +1,7 @@ +{ + "variants": { + "": { + "model": "oritech:block/large_storage_block" + } + } +} \ No newline at end of file diff --git a/src/main/generated/assets/oritech/models/item/large_storage_block.json b/src/main/generated/assets/oritech/models/item/large_storage_block.json new file mode 100644 index 000000000..ab28c0c90 --- /dev/null +++ b/src/main/generated/assets/oritech/models/item/large_storage_block.json @@ -0,0 +1,3 @@ +{ + "parent": "oritech:block/large_storage_block" +} \ No newline at end of file diff --git a/src/main/java/rearth/oritech/block/base/entity/ExpandableEnergyStorageBlockEntity.java b/src/main/java/rearth/oritech/block/base/entity/ExpandableEnergyStorageBlockEntity.java index 4488e7254..c418d6491 100644 --- a/src/main/java/rearth/oritech/block/base/entity/ExpandableEnergyStorageBlockEntity.java +++ b/src/main/java/rearth/oritech/block/base/entity/ExpandableEnergyStorageBlockEntity.java @@ -1,21 +1,33 @@ package rearth.oritech.block.base.entity; import net.fabricmc.fabric.api.lookup.v1.block.BlockApiCache; +import net.fabricmc.fabric.api.screenhandler.v1.ExtendedScreenHandlerFactory; import net.fabricmc.fabric.api.transfer.v1.transaction.Transaction; import net.minecraft.block.BlockState; import net.minecraft.block.entity.BlockEntity; import net.minecraft.block.entity.BlockEntityTicker; import net.minecraft.block.entity.BlockEntityType; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.inventory.Inventory; import net.minecraft.inventory.SimpleInventory; import net.minecraft.nbt.NbtCompound; +import net.minecraft.network.PacketByteBuf; +import net.minecraft.screen.ScreenHandler; +import net.minecraft.screen.ScreenHandlerType; +import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.server.world.ServerWorld; +import net.minecraft.state.property.Property; +import net.minecraft.text.Text; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Direction; -import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3i; import net.minecraft.world.World; +import org.jetbrains.annotations.Nullable; import rearth.oritech.block.blocks.machines.storage.SmallStorageBlock; -import rearth.oritech.client.init.ParticleContent; +import rearth.oritech.client.init.ModScreens; +import rearth.oritech.client.ui.UpgradableMachineScreenHandler; +import rearth.oritech.network.NetworkContent; import rearth.oritech.util.*; import team.reborn.energy.api.EnergyStorage; import team.reborn.energy.api.base.DelegatingEnergyStorage; @@ -25,7 +37,7 @@ import java.util.List; import java.util.Objects; -public abstract class ExpandableEnergyStorageBlockEntity extends BlockEntity implements EnergyProvider, MachineAddonController, BlockEntityTicker { +public abstract class ExpandableEnergyStorageBlockEntity extends BlockEntity implements EnergyProvider, MachineAddonController, ScreenProvider, ExtendedScreenHandlerFactory, BlockEntityTicker { private final List connectedAddons = new ArrayList<>(); private final List openSlots = new ArrayList<>(); @@ -98,9 +110,6 @@ protected HashMap> getNeighbo var facing = getFacing(); var blockInFront = (BlockPos) Geometry.offsetToWorldPosition(facing, new Vec3i(-1, 0, 0), pos); - System.out.println(blockInFront.toCenterPos()); - ParticleContent.HIGHLIGHT_BLOCK.spawn(world, Vec3d.of(blockInFront)); - var frontCache = BlockApiCache.create(EnergyStorage.SIDED, (ServerWorld) world, blockInFront); res.put(Direction.DOWN, frontCache); @@ -186,4 +195,73 @@ public void setBaseAddonData(BaseAddonData data) { } public abstract long getDefaultExtractionRate(); + + @Override + public void writeScreenOpeningData(ServerPlayerEntity player, PacketByteBuf buf) { + buf.writeBlockPos(this.getPos()); + buf.write(ADDON_UI_ENDEC, getUiData()); + buf.writeFloat(getCoreQuality()); + NetworkContent.MACHINE_CHANNEL.serverHandle(this).send(new NetworkContent.GenericEnergySyncPacket(pos, energyStorage.amount, energyStorage.capacity)); + } + + @Override + public Text getDisplayName() { + return Text.literal("invalid"); + } + + @Nullable + @Override + public ScreenHandler createMenu(int syncId, PlayerInventory playerInventory, PlayerEntity player) { + return new UpgradableMachineScreenHandler(syncId, playerInventory, this, getUiData(), getCoreQuality()); + } + + @Override + public List getGuiSlots() { + return List.of(); + } + + @Override + public float getDisplayedEnergyUsage() { + return 0; + } + + @Override + public float getProgress() { + return 0; + } + + @Override + public InventoryInputMode getInventoryInputMode() { + return InventoryInputMode.FILL_LEFT_TO_RIGHT; + } + + @Override + public boolean inputOptionsEnabled() { + return false; + } + + @Override + public Inventory getDisplayedInventory() { + return new SimpleInventory(); + } + + @Override + public ScreenHandlerType getScreenHandlerType() { + return ModScreens.STORAGE_SCREEN; + } + + @Override + public BarConfiguration getEnergyConfiguration() { + return new BarConfiguration(80, 26, 15, 54); + } + + @Override + public boolean showProgress() { + return false; + } + + @Override + public Property getBlockFacingProperty() { + return SmallStorageBlock.TARGET_DIR; + } } diff --git a/src/main/java/rearth/oritech/block/blocks/MachineCoreBlock.java b/src/main/java/rearth/oritech/block/blocks/MachineCoreBlock.java index 16456c06e..a289d486a 100644 --- a/src/main/java/rearth/oritech/block/blocks/MachineCoreBlock.java +++ b/src/main/java/rearth/oritech/block/blocks/MachineCoreBlock.java @@ -15,10 +15,9 @@ import net.minecraft.world.World; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import rearth.oritech.block.base.block.MachineBlock; -import rearth.oritech.block.base.block.MultiblockFrameInteractionBlock; import rearth.oritech.block.entity.machines.MachineCoreEntity; import rearth.oritech.util.MultiblockMachineController; +import rearth.oritech.util.ScreenProvider; import java.util.Objects; @@ -81,11 +80,8 @@ public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEnt if (!world.isClient) { var controllerPos = getControllerPos(world, pos); var controllerBlock = world.getBlockState(controllerPos); - if (Objects.requireNonNull(controllerBlock).getBlock() instanceof MachineBlock) { - return controllerBlock.getBlock().onUse(controllerBlock, world, controllerPos, player, hand, hit); - } - - if (Objects.requireNonNull(controllerBlock).getBlock() instanceof MultiblockFrameInteractionBlock) { + var controllerEntity = world.getBlockEntity(controllerPos); + if (controllerEntity instanceof ScreenProvider) { return controllerBlock.getBlock().onUse(controllerBlock, world, controllerPos, player, hand, hit); } } diff --git a/src/main/java/rearth/oritech/block/blocks/machines/storage/LargeStorageBlock.java b/src/main/java/rearth/oritech/block/blocks/machines/storage/LargeStorageBlock.java new file mode 100644 index 000000000..eaedf116e --- /dev/null +++ b/src/main/java/rearth/oritech/block/blocks/machines/storage/LargeStorageBlock.java @@ -0,0 +1,89 @@ +package rearth.oritech.block.blocks.machines.storage; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemPlacementContext; +import net.minecraft.state.StateManager; +import net.minecraft.text.Text; +import net.minecraft.util.ActionResult; +import net.minecraft.util.Hand; +import net.minecraft.util.hit.BlockHitResult; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import org.jetbrains.annotations.Nullable; +import rearth.oritech.block.entity.machines.storage.LargeStorageBlockEntity; +import rearth.oritech.util.MultiblockMachineController; + +import java.util.Objects; + +import static rearth.oritech.block.base.block.MultiblockMachine.ASSEMBLED; + +public class LargeStorageBlock extends SmallStorageBlock { + + public LargeStorageBlock(Settings settings) { + super(settings); + setDefaultState(getDefaultState().with(ASSEMBLED, false)); + } + + @Override + protected void appendProperties(StateManager.Builder builder) { + super.appendProperties(builder); + builder.add(ASSEMBLED); + } + + @Override + public @Nullable BlockEntity createBlockEntity(BlockPos pos, BlockState state) { + return new LargeStorageBlockEntity(pos, state); + } + + @Override + public @Nullable BlockState getPlacementState(ItemPlacementContext ctx) { + return Objects.requireNonNull(super.getPlacementState(ctx)).with(SmallStorageBlock.TARGET_DIR, ctx.getHorizontalPlayerFacing().getOpposite()); + } + + @Override + public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) { + + if (!world.isClient) { + + var entity = world.getBlockEntity(pos); + if (!(entity instanceof MultiblockMachineController machineEntity)) { + return ActionResult.SUCCESS; + } + + var wasAssembled = state.get(ASSEMBLED); + + var isAssembled = machineEntity.initMultiblock(state); + + // first time created + if (isAssembled && !wasAssembled) { + // NetworkContent.MACHINE_CHANNEL.serverHandle(machineEntity).send(new NetworkContent.MachineSetupEventPacket(pos)); + return ActionResult.SUCCESS; + } + + if (!isAssembled) { + player.sendMessage(Text.literal("Machine is not assembled. Please add missing core blocks")); + return ActionResult.SUCCESS; + } + + } + + return super.onUse(state, world, pos, player, hand, hit); + } + + @Override + public BlockState onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player) { + + if (!world.isClient() && state.get(ASSEMBLED)) { + + var entity = world.getBlockEntity(pos); + if (entity instanceof MultiblockMachineController machineEntity) { + machineEntity.onControllerBroken(); + } + } + + return super.onBreak(world, pos, state, player); + } +} \ No newline at end of file diff --git a/src/main/java/rearth/oritech/block/blocks/machines/storage/SmallStorageBlock.java b/src/main/java/rearth/oritech/block/blocks/machines/storage/SmallStorageBlock.java index 90d977b71..2031c9978 100644 --- a/src/main/java/rearth/oritech/block/blocks/machines/storage/SmallStorageBlock.java +++ b/src/main/java/rearth/oritech/block/blocks/machines/storage/SmallStorageBlock.java @@ -1,5 +1,6 @@ package rearth.oritech.block.blocks.machines.storage; +import net.fabricmc.fabric.api.screenhandler.v1.ExtendedScreenHandlerFactory; import net.minecraft.block.Block; import net.minecraft.block.BlockEntityProvider; import net.minecraft.block.BlockRenderType; @@ -66,9 +67,12 @@ public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEnt machineEntity.initAddons(); + var handler = (ExtendedScreenHandlerFactory) world.getBlockEntity(pos); + player.openHandledScreen(handler); + } - return super.onUse(state, world, pos, player, hand, hit); + return ActionResult.SUCCESS; } @Override diff --git a/src/main/java/rearth/oritech/block/entity/machines/storage/LargeStorageBlockEntity.java b/src/main/java/rearth/oritech/block/entity/machines/storage/LargeStorageBlockEntity.java new file mode 100644 index 000000000..8492bf02f --- /dev/null +++ b/src/main/java/rearth/oritech/block/entity/machines/storage/LargeStorageBlockEntity.java @@ -0,0 +1,114 @@ +package rearth.oritech.block.entity.machines.storage; + +import net.fabricmc.fabric.api.lookup.v1.block.BlockApiCache; +import net.minecraft.block.BlockState; +import net.minecraft.nbt.NbtCompound; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.util.math.Vec3i; +import net.minecraft.world.World; +import rearth.oritech.block.base.entity.ExpandableEnergyStorageBlockEntity; +import rearth.oritech.init.BlockEntitiesContent; +import rearth.oritech.util.InventoryProvider; +import rearth.oritech.util.MultiblockMachineController; +import team.reborn.energy.api.EnergyStorage; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +public class LargeStorageBlockEntity extends ExpandableEnergyStorageBlockEntity implements MultiblockMachineController { + + private final ArrayList coreBlocksConnected = new ArrayList<>(); + + private float coreQuality = 1f; + public LargeStorageBlockEntity(BlockPos pos, BlockState state) { + super(BlockEntitiesContent.LARGE_STORAGE_ENTITY, pos, state); + } + + @Override + protected HashMap> getNeighborCaches(BlockPos pos, World world) { + return super.getNeighborCaches(pos, world); + } + + @Override + public void writeNbt(NbtCompound nbt) { + super.writeNbt(nbt); + addMultiblockToNbt(nbt); + } + + @Override + public void readNbt(NbtCompound nbt) { + super.readNbt(nbt); + loadMultiblockNbtData(nbt); + } + + @Override + public List getAddonSlots() { + return List.of( + new Vec3i(0, 0,-1), + new Vec3i(0, 0,1), + new Vec3i(0, 1,-1), + new Vec3i(0, 1,1), + new Vec3i(1, 0,-1), + new Vec3i(1, 0,1), + new Vec3i(1, 1,-1), + new Vec3i(1, 1,1) + ); + } + + @Override + public long getDefaultCapacity() { + return 500000; + } + + @Override + public long getDefaultInsertRate() { + return 5000; + } + + @Override + public long getDefaultExtractionRate() { + return 5000; + } + + @Override + public List getCorePositions() { + return List.of( + new Vec3i(0, 1,0), + new Vec3i(1, 0,0), + new Vec3i(1, 1,0) + ); + } + + @Override + public Direction getFacingForMultiblock() { + return super.getFacingForAddon(); + } + + @Override + public ArrayList getConnectedCores() { + return coreBlocksConnected; + } + + @Override + public void setCoreQuality(float quality) { + this.coreQuality = quality; + } + + @Override + public float getCoreQuality() { + return this.coreQuality; + } + + @Override + public InventoryProvider getInventoryForLink() { + return null; + } + + @Override + public EnergyStorage getEnergyStorageForLink() { + return energyStorage; + } + +} diff --git a/src/main/java/rearth/oritech/block/entity/machines/storage/SmallStorageBlockEntity.java b/src/main/java/rearth/oritech/block/entity/machines/storage/SmallStorageBlockEntity.java index b055d16d8..4a9fbf9b4 100644 --- a/src/main/java/rearth/oritech/block/entity/machines/storage/SmallStorageBlockEntity.java +++ b/src/main/java/rearth/oritech/block/entity/machines/storage/SmallStorageBlockEntity.java @@ -36,4 +36,9 @@ public long getDefaultInsertRate() { public long getDefaultExtractionRate() { return 1000; } + + @Override + public float getCoreQuality() { + return 3; + } } diff --git a/src/main/java/rearth/oritech/block/entity/pipes/EnergyPipeInterfaceEntity.java b/src/main/java/rearth/oritech/block/entity/pipes/EnergyPipeInterfaceEntity.java index b9311ca12..2fcb34a46 100644 --- a/src/main/java/rearth/oritech/block/entity/pipes/EnergyPipeInterfaceEntity.java +++ b/src/main/java/rearth/oritech/block/entity/pipes/EnergyPipeInterfaceEntity.java @@ -21,7 +21,7 @@ public class EnergyPipeInterfaceEntity extends GenericPipeInterfaceEntity implements EnergyProvider { - private final SimpleEnergyStorage energyStorage = new SimpleEnergyStorage(50000, 50000, 50000); + private final SimpleEnergyStorage energyStorage = new SimpleEnergyStorage(5000, 5000, 5000); private final HashMap> lookupCache = new HashMap<>(); public EnergyPipeInterfaceEntity(BlockPos pos, BlockState state) { diff --git a/src/main/java/rearth/oritech/client/init/ModScreens.java b/src/main/java/rearth/oritech/client/init/ModScreens.java index eeec08721..cf3648866 100644 --- a/src/main/java/rearth/oritech/client/init/ModScreens.java +++ b/src/main/java/rearth/oritech/client/init/ModScreens.java @@ -16,6 +16,7 @@ public class ModScreens implements AutoRegistryContainer> { public static final ExtendedScreenHandlerType FOUNDRY_SCREEN = new ExtendedScreenHandlerType<>(UpgradableMachineScreenHandler::new); public static final ExtendedScreenHandlerType CENTRIFUGE_SCREEN = new ExtendedScreenHandlerType<>(CentrifugeScreenHandler::new); public static final ExtendedScreenHandlerType ATOMIC_FORGE_SCREEN = new ExtendedScreenHandlerType<>(BasicMachineScreenHandler::new); + public static final ExtendedScreenHandlerType STORAGE_SCREEN = new ExtendedScreenHandlerType<>(UpgradableMachineScreenHandler::new); public static final ExtendedScreenHandlerType POWERED_FURNACE_SCREEN = new ExtendedScreenHandlerType<>(UpgradableMachineScreenHandler::new); public static final ExtendedScreenHandlerType TEST_GENERATOR_SCREEN = new ExtendedScreenHandlerType<>(UpgradableMachineScreenHandler::new); public static final ExtendedScreenHandlerType BASIC_GENERATOR_SCREEN = new ExtendedScreenHandlerType<>(UpgradableMachineScreenHandler::new); @@ -35,6 +36,7 @@ public static void assignScreens() { HandledScreens.register(TEST_GENERATOR_SCREEN, UpgradableMachineScreen::new); HandledScreens.register(BASIC_GENERATOR_SCREEN, UpgradableMachineScreen::new); HandledScreens.register(ATOMIC_FORGE_SCREEN, BasicMachineScreen::new); + HandledScreens.register(STORAGE_SCREEN, UpgradableMachineScreen::new); HandledScreens.register(INVENTORY_PROXY_SCREEN, InventoryProxyScreen::new); HandledScreens.register(ITEM_FILTER_SCREEN, ItemFilterScreen::new); HandledScreens.register(DESTROYER_SCREEN, UpgradableMachineScreen::new); diff --git a/src/main/java/rearth/oritech/client/ui/BasicMachineScreen.java b/src/main/java/rearth/oritech/client/ui/BasicMachineScreen.java index a08069b0f..aca4fe312 100644 --- a/src/main/java/rearth/oritech/client/ui/BasicMachineScreen.java +++ b/src/main/java/rearth/oritech/client/ui/BasicMachineScreen.java @@ -82,8 +82,13 @@ protected void build(FlowLayout rootComponent) { @Override protected void handledScreenTick() { super.handledScreenTick(); - updateEnergyBar(); - updateProgressBar(); + + if (handler.screenData.showEnergy()) + updateEnergyBar(); + + if (handler.screenData.showProgress()) + updateProgressBar(); + updateSettingsButtons(); if (handler.fluidProvider != null) @@ -184,8 +189,10 @@ public void fillOverlay(FlowLayout overlay) { updateEnergyBar(); } - addProgressArrow(overlay); - updateProgressBar(); + if (handler.screenData.showProgress()) { + addProgressArrow(overlay); + updateProgressBar(); + } } protected void updateFluidBar() { diff --git a/src/main/java/rearth/oritech/client/ui/UpgradableMachineScreen.java b/src/main/java/rearth/oritech/client/ui/UpgradableMachineScreen.java index cb77f37cc..468219c01 100644 --- a/src/main/java/rearth/oritech/client/ui/UpgradableMachineScreen.java +++ b/src/main/java/rearth/oritech/client/ui/UpgradableMachineScreen.java @@ -6,7 +6,6 @@ import io.wispforest.owo.ui.container.OverlayContainer; import io.wispforest.owo.ui.core.*; import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.state.property.Properties; import net.minecraft.text.Text; import net.minecraft.util.Identifier; import net.minecraft.util.math.Vec3i; @@ -139,7 +138,7 @@ public void remove() { var addonBlock = handler.worldAccess.getBlockState(addonBlockPos); var addonBlockEntity = handler.worldAccess.getBlockEntity(addonBlockPos); - var relativePos = MultiblockMachineEntity.worldToRelativePos(handler.blockPos, addonBlockPos, handler.machineBlock.get(Properties.HORIZONTAL_FACING)); + var relativePos = MultiblockMachineEntity.worldToRelativePos(handler.blockPos, addonBlockPos, handler.machineBlock.get(handler.screenData.getBlockFacingProperty())); holoPreviewContainer.child( new BlockPreviewComponent(addonBlock, addonBlockEntity, relativePos, rotationSpeed) @@ -183,7 +182,7 @@ public void remove() { for (var openPos : handler.addonUiData.openSlots()) { - var relativePos = MultiblockMachineEntity.worldToRelativePos(handler.blockPos, openPos, handler.machineBlock.get(Properties.HORIZONTAL_FACING)); + var relativePos = MultiblockMachineEntity.worldToRelativePos(handler.blockPos, openPos, handler.machineBlock.get(handler.screenData.getBlockFacingProperty())); var dummyBlock = BlockContent.ADDON_INDICATOR_BLOCK.getDefaultState(); holoPreviewContainer.child( diff --git a/src/main/java/rearth/oritech/init/BlockContent.java b/src/main/java/rearth/oritech/init/BlockContent.java index a70e013d6..f4dd13036 100644 --- a/src/main/java/rearth/oritech/init/BlockContent.java +++ b/src/main/java/rearth/oritech/init/BlockContent.java @@ -20,6 +20,7 @@ import rearth.oritech.block.blocks.machines.generators.TestGeneratorBlock; import rearth.oritech.block.blocks.machines.interaction.*; import rearth.oritech.block.blocks.machines.processing.*; +import rearth.oritech.block.blocks.machines.storage.LargeStorageBlock; import rearth.oritech.block.blocks.machines.storage.SmallStorageBlock; import rearth.oritech.block.blocks.pipes.*; import rearth.oritech.util.item.OritechGeoItem; @@ -89,6 +90,7 @@ public class BlockContent implements BlockRegistryContainer { public static final Block LASER_ARM_BLOCK = new LaserArmBlock(FabricBlockSettings.copyOf(Blocks.IRON_BLOCK).nonOpaque()); public static final Block SMALL_STORAGE_BLOCK = new SmallStorageBlock(FabricBlockSettings.copyOf(Blocks.IRON_BLOCK).nonOpaque()); + public static final Block LARGE_STORAGE_BLOCK = new LargeStorageBlock(FabricBlockSettings.copyOf(Blocks.IRON_BLOCK).nonOpaque()); public static final Block PLACER_BLOCK = new PlacerBlock(FabricBlockSettings.copyOf(Blocks.IRON_BLOCK).nonOpaque()); public static final Block DESTROYER_BLOCK = new DestroyerBlock(FabricBlockSettings.copyOf(Blocks.IRON_BLOCK).nonOpaque()); diff --git a/src/main/java/rearth/oritech/init/BlockEntitiesContent.java b/src/main/java/rearth/oritech/init/BlockEntitiesContent.java index 34c49e4ff..34d86ab12 100644 --- a/src/main/java/rearth/oritech/init/BlockEntitiesContent.java +++ b/src/main/java/rearth/oritech/init/BlockEntitiesContent.java @@ -16,6 +16,7 @@ import rearth.oritech.block.entity.machines.generators.TestGeneratorEntity; import rearth.oritech.block.entity.machines.interaction.*; import rearth.oritech.block.entity.machines.processing.*; +import rearth.oritech.block.entity.machines.storage.LargeStorageBlockEntity; import rearth.oritech.block.entity.machines.storage.SmallStorageBlockEntity; import rearth.oritech.block.entity.pipes.EnergyPipeInterfaceEntity; import rearth.oritech.block.entity.pipes.FluidPipeInterfaceEntity; @@ -102,6 +103,8 @@ public class BlockEntitiesContent implements AutoRegistryContainer SMALL_STORAGE_ENTITY = FabricBlockEntityTypeBuilder.create(SmallStorageBlockEntity::new, BlockContent.SMALL_STORAGE_BLOCK).build(); + @AssignSidedEnergy + public static final BlockEntityType LARGE_STORAGE_ENTITY = FabricBlockEntityTypeBuilder.create(LargeStorageBlockEntity::new, BlockContent.LARGE_STORAGE_BLOCK).build(); @AssignSidedFluid public static final BlockEntityType FLUID_PIPE_ENTITY = FabricBlockEntityTypeBuilder.create(FluidPipeInterfaceEntity::new, BlockContent.FLUID_PIPE_CONNECTION).build(); diff --git a/src/main/java/rearth/oritech/init/datagen/ModelGenerator.java b/src/main/java/rearth/oritech/init/datagen/ModelGenerator.java index 0a51a0df6..75472def2 100644 --- a/src/main/java/rearth/oritech/init/datagen/ModelGenerator.java +++ b/src/main/java/rearth/oritech/init/datagen/ModelGenerator.java @@ -27,6 +27,7 @@ public void generateBlockStateModels(BlockStateModelGenerator blockStateModelGen blockStateModelGenerator.registerSimpleState(BlockContent.ITEM_PIPE_CONNECTION); blockStateModelGenerator.registerSimpleState(BlockContent.ITEM_FILTER_BLOCK); blockStateModelGenerator.registerSimpleState(BlockContent.SMALL_STORAGE_BLOCK); + blockStateModelGenerator.registerSimpleState(BlockContent.LARGE_STORAGE_BLOCK); blockStateModelGenerator.registerSimpleCubeAll(BlockContent.PLACER_BLOCK); blockStateModelGenerator.registerSimpleCubeAll(BlockContent.DESTROYER_BLOCK); diff --git a/src/main/java/rearth/oritech/network/NetworkContent.java b/src/main/java/rearth/oritech/network/NetworkContent.java index a559a148c..0db53d715 100644 --- a/src/main/java/rearth/oritech/network/NetworkContent.java +++ b/src/main/java/rearth/oritech/network/NetworkContent.java @@ -21,6 +21,7 @@ import rearth.oritech.init.recipes.OritechRecipeType; import rearth.oritech.util.FluidProvider; import rearth.oritech.util.InventoryInputMode; +import rearth.oritech.util.MachineAddonController; import rearth.oritech.util.ScreenProvider; import java.util.List; @@ -56,6 +57,9 @@ public record MachineFrameMovementPacket(BlockPos position, BlockPos currentTarg public record MachineFrameGuiPacket(BlockPos position, long currentEnergy, long maxEnergy, int progress) { } + // for use with addon providers to sync energy state + public record GenericEnergySyncPacket(BlockPos position, long currentEnergy, long maxEnergy) {} + public record ItemFilterSyncPacket(BlockPos position, ItemFilterBlockEntity.FilterData data) { } // this goes both ways @@ -125,6 +129,18 @@ public static void registerChannels() { })); + MACHINE_CHANNEL.registerClientbound(GenericEnergySyncPacket.class, ((message, access) -> { + + var entity = access.player().clientWorld.getBlockEntity(message.position); + + if (entity instanceof MachineAddonController addonController) { + var storage = addonController.getStorageForAddon(); + storage.capacity = message.maxEnergy; + storage.amount = message.currentEnergy; + } + + })); + MACHINE_CHANNEL.registerClientbound(SingleVariantFluidSyncPacket.class, ((message, access) -> { var entity = access.player().clientWorld.getBlockEntity(message.position); diff --git a/src/main/java/rearth/oritech/util/ScreenProvider.java b/src/main/java/rearth/oritech/util/ScreenProvider.java index 6625a6a5a..98cd2f168 100644 --- a/src/main/java/rearth/oritech/util/ScreenProvider.java +++ b/src/main/java/rearth/oritech/util/ScreenProvider.java @@ -2,13 +2,16 @@ import net.minecraft.inventory.Inventory; import net.minecraft.screen.ScreenHandlerType; +import net.minecraft.state.property.Properties; +import net.minecraft.state.property.Property; import net.minecraft.util.Identifier; +import net.minecraft.util.math.Direction; import rearth.oritech.Oritech; import java.util.List; public interface ScreenProvider { - + record GuiSlot (int index, int x, int y) {} record BarConfiguration(int x, int y, int width, int height) {} @@ -31,6 +34,14 @@ default boolean showEnergy() { ScreenHandlerType getScreenHandlerType(); default boolean inputOptionsEnabled() {return true;} + + default Property getBlockFacingProperty() { + return Properties.HORIZONTAL_FACING; + } + + default boolean showProgress() { + return true; + } default BarConfiguration getEnergyConfiguration() { return new BarConfiguration(7, 24, 15, 54); diff --git a/src/main/resources/assets/oritech/blockstates/large_storage_block.json b/src/main/resources/assets/oritech/blockstates/large_storage_block.json new file mode 100644 index 000000000..3e1f3374a --- /dev/null +++ b/src/main/resources/assets/oritech/blockstates/large_storage_block.json @@ -0,0 +1,42 @@ +{ + "variants": { + "machine_assembled=false,target_dir=south": { + "model": "oritech:block/large_storage_block_packaged", + "y": 180 + }, + "machine_assembled=false,target_dir=east": { + "model": "oritech:block/large_storage_block_packaged", + "y": 90 + }, + "machine_assembled=false,target_dir=north": { + "model": "oritech:block/large_storage_block_packaged" + }, + "machine_assembled=false,target_dir=west": { + "model": "oritech:block/large_storage_block_packaged", + "y": 270 + }, + "machine_assembled=true,target_dir=south": { + "model": "oritech:block/large_storage_block", + "y": 180 + }, + "machine_assembled=true,target_dir=east": { + "model": "oritech:block/large_storage_block", + "y": 90 + }, + "machine_assembled=true,target_dir=north": { + "model": "oritech:block/large_storage_block" + }, + "machine_assembled=true,target_dir=west": { + "model": "oritech:block/large_storage_block", + "y": 270 + }, + "target_dir=up": { + "model": "oritech:block/large_storage_block", + "x": -90 + }, + "target_dir=down": { + "model": "oritech:block/large_storage_block", + "x": 90 + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/oritech/models/block/large_storage_block.json b/src/main/resources/assets/oritech/models/block/large_storage_block.json new file mode 100644 index 000000000..659e6ba97 --- /dev/null +++ b/src/main/resources/assets/oritech/models/block/large_storage_block.json @@ -0,0 +1,188 @@ +{ + "credit": "Made with Blockbench", + "texture_size": [128, 128], + "textures": { + "1": "oritech:block/large_storage_block", + "particle": "oritech:block/machine_particle_texture" + }, + "elements": [ + { + "name": "sides", + "from": [0, 0, 0], + "to": [2, 32, 32], + "faces": { + "north": {"uv": [5.25, 11.5, 5.5, 15.5], "texture": "#1"}, + "east": {"uv": [0, 0, 4, 4], "texture": "#1"}, + "south": {"uv": [5.5, 11.5, 5.75, 15.5], "texture": "#1"}, + "west": {"uv": [0, 4, 4, 8], "texture": "#1"}, + "up": {"uv": [6, 15.5, 5.75, 11.5], "texture": "#1"}, + "down": {"uv": [6.25, 11.5, 6, 15.5], "texture": "#1"} + } + }, + { + "name": "sides", + "from": [14, 0, 0], + "to": [16, 32, 32], + "rotation": {"angle": 0, "axis": "y", "origin": [15, 16, 16]}, + "faces": { + "north": {"uv": [6.25, 11.5, 6.5, 15.5], "texture": "#1"}, + "east": {"uv": [4, 0, 8, 4], "texture": "#1"}, + "south": {"uv": [6.5, 11.5, 6.75, 15.5], "texture": "#1"}, + "west": {"uv": [4, 4, 8, 8], "texture": "#1"}, + "up": {"uv": [7, 15.5, 6.75, 11.5], "texture": "#1"}, + "down": {"uv": [7.25, 11.5, 7, 15.5], "texture": "#1"} + } + }, + { + "name": "inner", + "from": [2, 2, 2], + "to": [14, 30, 30], + "faces": { + "north": {"uv": [3.5, 8, 5, 11.5], "texture": "#1"}, + "east": {"uv": [0, 8, 3.5, 11.5], "texture": "#1"}, + "south": {"uv": [8, 3.5, 9.5, 7], "texture": "#1"}, + "west": {"uv": [8, 0, 11.5, 3.5], "texture": "#1"}, + "up": {"uv": [6.5, 11.5, 5, 8], "texture": "#1"}, + "down": {"uv": [8, 8, 6.5, 11.5], "texture": "#1"} + } + }, + { + "name": "edge", + "from": [2, 1, 1], + "to": [14, 3, 3], + "faces": { + "north": {"uv": [9.5, 6.5, 11, 6.75], "texture": "#1"}, + "east": {"uv": [7.25, 11.5, 7.5, 11.75], "texture": "#1"}, + "south": {"uv": [9.5, 6.75, 11, 7], "texture": "#1"}, + "west": {"uv": [7.5, 11.5, 7.75, 11.75], "texture": "#1"}, + "up": {"uv": [12.5, 6.75, 11, 6.5], "texture": "#1"}, + "down": {"uv": [12.5, 6.75, 11, 7], "texture": "#1"} + } + }, + { + "name": "edge", + "from": [2, 29, 1], + "to": [14, 31, 3], + "faces": { + "north": {"uv": [11.5, 1.5, 13, 1.75], "texture": "#1"}, + "east": {"uv": [7.75, 11.5, 8, 11.75], "texture": "#1"}, + "south": {"uv": [11.5, 1.75, 13, 2], "texture": "#1"}, + "west": {"uv": [11.75, 6, 12, 6.25], "texture": "#1"}, + "up": {"uv": [13, 2.25, 11.5, 2], "texture": "#1"}, + "down": {"uv": [13, 2.25, 11.5, 2.5], "texture": "#1"} + } + }, + { + "name": "edge", + "from": [2, 29, 29], + "to": [14, 31, 31], + "faces": { + "north": {"uv": [11.75, 5, 13.25, 5.25], "texture": "#1"}, + "east": {"uv": [7.5, 11.75, 7.75, 12], "texture": "#1"}, + "south": {"uv": [11.75, 5.25, 13.25, 5.5], "texture": "#1"}, + "west": {"uv": [7.75, 11.75, 8, 12], "texture": "#1"}, + "up": {"uv": [13.25, 5.75, 11.75, 5.5], "texture": "#1"}, + "down": {"uv": [13.25, 5.75, 11.75, 6], "texture": "#1"} + } + }, + { + "name": "edge", + "from": [2, 1, 29], + "to": [14, 3, 31], + "faces": { + "north": {"uv": [11.5, 2.5, 13, 2.75], "texture": "#1"}, + "east": {"uv": [11.75, 6.25, 12, 6.5], "texture": "#1"}, + "south": {"uv": [11.5, 2.75, 13, 3], "texture": "#1"}, + "west": {"uv": [7.25, 11.75, 7.5, 12], "texture": "#1"}, + "up": {"uv": [13, 3.25, 11.5, 3], "texture": "#1"}, + "down": {"uv": [13, 3.25, 11.5, 3.5], "texture": "#1"} + } + }, + { + "name": "cable", + "from": [5, 5, 0], + "to": [11, 11, 32], + "faces": { + "north": {"uv": [9.5, 5, 10.25, 5.75], "texture": "#1"}, + "east": {"uv": [8, 7, 12, 7.75], "texture": "#1"}, + "south": {"uv": [9.5, 5.75, 10.25, 6.5], "texture": "#1"}, + "west": {"uv": [8, 7.75, 12, 8.5], "texture": "#1"}, + "up": {"uv": [8.75, 12.5, 8, 8.5], "texture": "#1"}, + "down": {"uv": [9.5, 8.5, 8.75, 12.5], "texture": "#1"} + } + }, + { + "name": "cable", + "from": [5, 21, 0], + "to": [11, 27, 32], + "faces": { + "north": {"uv": [10.25, 5, 11, 5.75], "texture": "#1"}, + "east": {"uv": [9.5, 3.5, 13.5, 4.25], "texture": "#1"}, + "south": {"uv": [10.25, 5.75, 11, 6.5], "texture": "#1"}, + "west": {"uv": [9.5, 4.25, 13.5, 5], "texture": "#1"}, + "up": {"uv": [10.25, 12.5, 9.5, 8.5], "texture": "#1"}, + "down": {"uv": [11, 8.5, 10.25, 12.5], "texture": "#1"} + } + }, + { + "name": "cable", + "from": [5, 0, 5], + "to": [11, 32, 11], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 24, 16]}, + "faces": { + "north": {"uv": [11, 8.5, 11.75, 12.5], "texture": "#1"}, + "east": {"uv": [0, 11.5, 0.75, 15.5], "texture": "#1"}, + "south": {"uv": [0.75, 11.5, 1.5, 15.5], "texture": "#1"}, + "west": {"uv": [1.5, 11.5, 2.25, 15.5], "texture": "#1"}, + "up": {"uv": [11.75, 5.75, 11, 5], "texture": "#1"}, + "down": {"uv": [11.75, 5.75, 11, 6.5], "texture": "#1"} + } + }, + { + "name": "cable", + "from": [5, 0, 21], + "to": [11, 32, 27], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 24, 16]}, + "faces": { + "north": {"uv": [2.25, 11.5, 3, 15.5], "texture": "#1"}, + "east": {"uv": [3, 11.5, 3.75, 15.5], "texture": "#1"}, + "south": {"uv": [3.75, 11.5, 4.5, 15.5], "texture": "#1"}, + "west": {"uv": [4.5, 11.5, 5.25, 15.5], "texture": "#1"}, + "up": {"uv": [12.25, 0.75, 11.5, 0], "texture": "#1"}, + "down": {"uv": [12.25, 0.75, 11.5, 1.5], "texture": "#1"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "thirdperson_lefthand": { + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "firstperson_righthand": { + "rotation": [0, 45, 0], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_lefthand": { + "rotation": [0, 225, 0], + "scale": [0.23, 0.25, 0.19] + }, + "ground": { + "scale": [0.25, 0.25, 0.25] + }, + "gui": { + "rotation": [30, 225, 0], + "translation": [2, -3.75, 0], + "scale": [0.4, 0.35, 0.4] + }, + "fixed": { + "translation": [0, -3.5, 0], + "scale": [0.5, 0.5, 0.5] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/oritech/models/block/large_storage_block_packaged.json b/src/main/resources/assets/oritech/models/block/large_storage_block_packaged.json new file mode 100644 index 000000000..05611b652 --- /dev/null +++ b/src/main/resources/assets/oritech/models/block/large_storage_block_packaged.json @@ -0,0 +1,54 @@ +{ + "credit": "Made with Blockbench", + "texture_size": [64, 64], + "textures": { + "1": "oritech:block/large_storage_block_packaged", + "particle": "oritech:block/machine_particle_texture" + }, + "elements": [ + { + "from": [0, 0, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, + "faces": { + "north": {"uv": [4, 4, 8, 8], "texture": "#1"}, + "east": {"uv": [0, 0, 4, 4], "texture": "#1"}, + "south": {"uv": [0, 4, 4, 8], "texture": "#1"}, + "west": {"uv": [4, 0, 8, 4], "texture": "#1"}, + "up": {"uv": [4, 12, 0, 8], "rotation": 90, "texture": "#1"}, + "down": {"uv": [12, 0, 8, 4], "rotation": 270, "texture": "#1"} + } + } + ], + "display": { + "thirdperson_righthand": { + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "thirdperson_lefthand": { + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "firstperson_righthand": { + "rotation": [0, 45, 0], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_lefthand": { + "rotation": [0, 225, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "translation": [0, 3, 0], + "scale": [0.25, 0.25, 0.25] + }, + "gui": { + "rotation": [30, 225, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "scale": [0.5, 0.5, 0.5] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/oritech/models/block/small_storage_block.json b/src/main/resources/assets/oritech/models/block/small_storage_block.json index 07302124c..739cc1c4b 100644 --- a/src/main/resources/assets/oritech/models/block/small_storage_block.json +++ b/src/main/resources/assets/oritech/models/block/small_storage_block.json @@ -126,5 +126,35 @@ } } ], - "display": {} + "display": { + "thirdperson_righthand": { + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "thirdperson_lefthand": { + "rotation": [75, 45, 0], + "translation": [0, 2.5, 0], + "scale": [0.375, 0.375, 0.375] + }, + "firstperson_righthand": { + "rotation": [0, 45, 0], + "scale": [0.4, 0.4, 0.4] + }, + "firstperson_lefthand": { + "rotation": [0, 225, 0], + "scale": [0.4, 0.4, 0.4] + }, + "ground": { + "translation": [0, 3, 0], + "scale": [0.25, 0.25, 0.25] + }, + "gui": { + "rotation": [30, 225, 0], + "scale": [0.625, 0.625, 0.625] + }, + "fixed": { + "scale": [0.5, 0.5, 0.5] + } + } } \ No newline at end of file diff --git a/src/main/resources/assets/oritech/textures/block/large_storage_block.png b/src/main/resources/assets/oritech/textures/block/large_storage_block.png new file mode 100644 index 000000000..b39c5d75a Binary files /dev/null and b/src/main/resources/assets/oritech/textures/block/large_storage_block.png differ diff --git a/src/main/resources/assets/oritech/textures/block/large_storage_block_packaged.png b/src/main/resources/assets/oritech/textures/block/large_storage_block_packaged.png new file mode 100644 index 000000000..cdbe99653 Binary files /dev/null and b/src/main/resources/assets/oritech/textures/block/large_storage_block_packaged.png differ