From 8654cfd92d6eebe9b37729e7113815f0a2ca6285 Mon Sep 17 00:00:00 2001 From: Vaern Date: Sun, 25 Sep 2022 21:34:44 -0700 Subject: [PATCH] BlockDecoContainer, filing cabinet --- src/main/java/com/hbm/blocks/ModBlocks.java | 10 +- .../blocks/generic/BlockDecoContainer.java | 106 ++++ .../hbm/blocks/generic/BlockDecoModel.java | 53 +- .../container/ContainerFileCabinet.java | 76 +++ .../com/hbm/inventory/gui/GUIFileCabinet.java | 42 ++ .../inventory/recipes/anvil/AnvilRecipes.java | 10 + src/main/java/com/hbm/main/ClientProxy.java | 2 + .../java/com/hbm/main/ResourceManager.java | 6 + .../render/block/RenderBlockDecoModel.java | 3 +- .../render/tileentity/RenderFileCabinet.java | 80 +++ .../java/com/hbm/tileentity/TileMappings.java | 2 + .../storage/TileEntityFileCabinet.java | 145 +++++ src/main/resources/assets/hbm/lang/en_US.lang | 2 + .../assets/hbm/models/file_cabinet.obj | 530 ++++++++++++++++++ ...{deco_computer_0.png => deco_computer.png} | Bin .../textures/gui/storage/gui_file_cabinet.png | Bin 0 -> 850 bytes .../hbm/textures/models/file_cabinet.png | Bin 0 -> 5292 bytes 17 files changed, 1062 insertions(+), 5 deletions(-) create mode 100644 src/main/java/com/hbm/blocks/generic/BlockDecoContainer.java create mode 100644 src/main/java/com/hbm/inventory/container/ContainerFileCabinet.java create mode 100644 src/main/java/com/hbm/inventory/gui/GUIFileCabinet.java create mode 100644 src/main/java/com/hbm/render/tileentity/RenderFileCabinet.java create mode 100644 src/main/java/com/hbm/tileentity/machine/storage/TileEntityFileCabinet.java create mode 100644 src/main/resources/assets/hbm/models/file_cabinet.obj rename src/main/resources/assets/hbm/textures/blocks/{deco_computer_0.png => deco_computer.png} (100%) create mode 100644 src/main/resources/assets/hbm/textures/gui/storage/gui_file_cabinet.png create mode 100644 src/main/resources/assets/hbm/textures/models/file_cabinet.png diff --git a/src/main/java/com/hbm/blocks/ModBlocks.java b/src/main/java/com/hbm/blocks/ModBlocks.java index 87480424e..cbddf79bc 100644 --- a/src/main/java/com/hbm/blocks/ModBlocks.java +++ b/src/main/java/com/hbm/blocks/ModBlocks.java @@ -20,6 +20,7 @@ import com.hbm.lib.ModDamageSource; import com.hbm.lib.RefStrings; import com.hbm.main.MainRegistry; import com.hbm.tileentity.DoorDecl; +import com.hbm.tileentity.machine.storage.TileEntityFileCabinet; import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.block.Block; @@ -410,7 +411,9 @@ public class ModBlocks { public static Block brick_forgotten; public static Block deco_computer; - + + public static Block filing_cabinet; + public static Block tape_recorder; public static Block steel_poles; public static Block pole_top; @@ -1673,7 +1676,9 @@ public class ModBlocks { brick_forgotten = new BlockGeneric(Material.rock).setBlockName("brick_forgotten").setCreativeTab(MainRegistry.blockTab).setBlockUnbreakable().setResistance(1000000).setBlockTextureName(RefStrings.MODID + ":brick_forgotten"); - deco_computer = new BlockDecoModel(Material.iron, 1).setBlockName("deco_computer").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_computer"); + deco_computer = new BlockDecoModel(Material.iron, 1).setBlockBoundsTo(.160749F, 0F, 0F, .839251F, .867849F, .622184F).setBlockName("deco_computer").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":deco_computer"); + + filing_cabinet = new BlockDecoContainer(Material.iron, 1, TileEntityFileCabinet.class).setBlockBoundsTo(.1875F, 0F, 0F, .8125F, 1F, .75F).setBlockName("filing_cabinet").setCreativeTab(MainRegistry.blockTab).setHardness(10.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":block_steel"); tape_recorder = new DecoTapeRecorder(Material.iron).setBlockName("tape_recorder").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":deco_tape_recorder"); steel_poles = new DecoSteelPoles(Material.iron).setBlockName("steel_poles").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":steel_beam"); @@ -2788,6 +2793,7 @@ public class ModBlocks { GameRegistry.registerBlock(brick_dungeon_circle, brick_dungeon_circle.getUnlocalizedName()); GameRegistry.registerBlock(brick_forgotten, brick_forgotten.getUnlocalizedName()); GameRegistry.registerBlock(deco_computer, ItemBlockMeta.class, deco_computer.getUnlocalizedName()); + GameRegistry.registerBlock(filing_cabinet, filing_cabinet.getUnlocalizedName()); GameRegistry.registerBlock(tape_recorder, tape_recorder.getUnlocalizedName()); GameRegistry.registerBlock(steel_poles, steel_poles.getUnlocalizedName()); GameRegistry.registerBlock(pole_top, pole_top.getUnlocalizedName()); diff --git a/src/main/java/com/hbm/blocks/generic/BlockDecoContainer.java b/src/main/java/com/hbm/blocks/generic/BlockDecoContainer.java new file mode 100644 index 000000000..d2dafd4ea --- /dev/null +++ b/src/main/java/com/hbm/blocks/generic/BlockDecoContainer.java @@ -0,0 +1,106 @@ +package com.hbm.blocks.generic; + +import java.util.Random; + +import com.hbm.main.MainRegistry; + +import cpw.mods.fml.common.network.internal.FMLNetworkHandler; +import net.minecraft.block.Block; +import net.minecraft.block.ITileEntityProvider; +import net.minecraft.block.material.Material; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +public class BlockDecoContainer extends BlockDecoModel implements ITileEntityProvider { + + Class tile; + + public BlockDecoContainer(Material mat, int types, Class tile) { + super(mat, types); + this.tile = tile; + } + + @Override + public TileEntity createNewTileEntity(World world, int metadata) { + try { + return tile.newInstance(); + } catch (Exception e) { + System.out.println("BlockDecoContainer attempted to create a TE, but couldn't. How does that even happen?"); + return null; + } + } + + @Override + public boolean onBlockEventReceived(World world, int x, int y, int z, int eventNo, int eventArg) { + super.onBlockEventReceived(world, x, y, z, eventNo, eventArg); + TileEntity tileentity = world.getTileEntity(x, y, z); + return tileentity != null ? tileentity.receiveClientEvent(eventNo, eventArg) : false; + } + + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) { + + if(world.isRemote) { + return true; + } else if(!player.isSneaking()) { + + FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z); + return true; + } else { + return true; + } + } + + @Override + public int getRenderType() { + return -1; + } + + @Override + public void breakBlock(World world, int x, int y, int z, Block block, int meta) { + IInventory inventory = (IInventory) world.getTileEntity(x, y, z); + Random rand = world.rand; + + if(inventory != null) { + for(int i1 = 0; i1 < inventory.getSizeInventory(); ++i1) { + ItemStack itemstack = inventory.getStackInSlot(i1); + + if (itemstack != null) { + float f = rand.nextFloat() * 0.8F + 0.1F; + float f1 = rand.nextFloat() * 0.8F + 0.1F; + float f2 = rand.nextFloat() * 0.8F + 0.1F; + + while(itemstack.stackSize > 0) { + int j1 = rand.nextInt(21) + 10; + + if (j1 > itemstack.stackSize) { + j1 = itemstack.stackSize; + } + + itemstack.stackSize -= j1; + EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage())); + + if(itemstack.hasTagCompound()) { + entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy()); + + float f3 = 0.05F; + entityitem.motionX = (float) rand.nextGaussian() * f3; + entityitem.motionY = (float) rand.nextGaussian() * f3 + 0.2F; + entityitem.motionZ = (float) rand.nextGaussian() * f3; + world.spawnEntityInWorld(entityitem); + } + } + } + + world.func_147453_f(x, y, z, block); + } + + super.breakBlock(world, x, y, z, block, meta); + } + } +} diff --git a/src/main/java/com/hbm/blocks/generic/BlockDecoModel.java b/src/main/java/com/hbm/blocks/generic/BlockDecoModel.java index d62ae2d39..6b836510d 100644 --- a/src/main/java/com/hbm/blocks/generic/BlockDecoModel.java +++ b/src/main/java/com/hbm/blocks/generic/BlockDecoModel.java @@ -14,8 +14,10 @@ import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.IIcon; import net.minecraft.util.MathHelper; +import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; public class BlockDecoModel extends Block { @@ -57,7 +59,10 @@ public class BlockDecoModel extends Block { @Override @SideOnly(Side.CLIENT) public IIcon getIcon(int side, int meta) { - return this.icons[(meta >> 2) % this.icons.length]; + if(subTypes > 1) + return this.icons[(meta >> 2) % this.icons.length]; + + return this.blockIcon; } public static int renderID = RenderingRegistry.getNextAvailableRenderId(); @@ -99,4 +104,48 @@ public class BlockDecoModel extends Block { world.setBlockMetadataWithNotify(x, y, z, meta, 2); } -} + + //These are separate because they have to be constant + private float mnX = 0.0F; //min + private float mnY = 0.0F; + private float mnZ = 0.0F; + private float mxX = 1.0F; //max + private float mxY = 1.0F; + private float mxZ = 1.0F; + + public BlockDecoModel setBlockBoundsTo(float minX, float minY, float minZ, float maxX, float maxY, float maxZ) { + mnX = minX; + mnY = minY; + mnZ = minZ; + mxX = maxX; + mxY = maxY; + mxZ = maxZ; + + return this; + } + + @Override + public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) { + switch(world.getBlockMetadata(x, y, z) & 3) { + case 0://North + this.setBlockBounds(1 - mxX, mnY, 1 - mxZ, 1 - mnX, mxY, 1 - mnZ); + break; + case 1://South + this.setBlockBounds(mnX, mnY, mnZ, mxX, mxY, mxZ); + break; + case 2://West + this.setBlockBounds(1 - mxZ, mnY, mnX, 1 - mnZ, mxY, mxX); + break; + case 3://East + this.setBlockBounds(mnZ, mnY, 1 - mxX, mxZ, mxY, 1 - mnX); + break; + } + } + + @Override + public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) { + this.setBlockBoundsBasedOnState(world, x, y, z); + return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ); + } + +} \ No newline at end of file diff --git a/src/main/java/com/hbm/inventory/container/ContainerFileCabinet.java b/src/main/java/com/hbm/inventory/container/ContainerFileCabinet.java new file mode 100644 index 000000000..764d4226e --- /dev/null +++ b/src/main/java/com/hbm/inventory/container/ContainerFileCabinet.java @@ -0,0 +1,76 @@ +package com.hbm.inventory.container; + +import com.hbm.tileentity.machine.storage.TileEntityFileCabinet; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class ContainerFileCabinet extends Container { + + protected TileEntityFileCabinet cabinet; + + public ContainerFileCabinet(InventoryPlayer invPlayer, TileEntityFileCabinet tile) { + this.cabinet = tile; + this.cabinet.openInventory(); + + for(int i = 0; i < 2; i++) { + for(int j = 0; j < 4; j++) { + this.addSlotToContainer(new Slot(tile, j + i * 4, 53 + j * 18, 18 + i * 36)); + } + } + + for(int i = 0; i < 3; i++) { + for(int j = 0; j < 9; j++) { + this.addSlotToContainer(new Slot(invPlayer, j + i * 9 + 9, 8 + j * 18, 88 + i * 18)); + } + } + + for(int i = 0; i < 9; i++) { + this.addSlotToContainer(new Slot(invPlayer, i, 8 + i * 18, 146)); + } + } + + @Override + public ItemStack transferStackInSlot(EntityPlayer player, int index) { + ItemStack returnStack = null; + Slot slot = (Slot) this.inventorySlots.get(index); + + if(slot != null && slot.getHasStack()) { + ItemStack originalStack = slot.getStack(); + returnStack = originalStack.copy(); + + if(index <= 7) { + if(!this.mergeItemStack(originalStack, 8, this.inventorySlots.size(), true)) { + return null; + } + + slot.onSlotChange(originalStack, returnStack); + + } else if(!this.mergeItemStack(originalStack, 0, 8, false)) { + return null; + } + + if(originalStack.stackSize == 0) { + slot.putStack((ItemStack) null); + } else { + slot.onSlotChanged(); + } + } + + return returnStack; + } + + @Override + public boolean canInteractWith(EntityPlayer player) { + return cabinet.isUseableByPlayer(player); + } + + @Override + public void onContainerClosed(EntityPlayer player) { + super.onContainerClosed(player); + this.cabinet.closeInventory(); + } +} diff --git a/src/main/java/com/hbm/inventory/gui/GUIFileCabinet.java b/src/main/java/com/hbm/inventory/gui/GUIFileCabinet.java new file mode 100644 index 000000000..41d83fb6e --- /dev/null +++ b/src/main/java/com/hbm/inventory/gui/GUIFileCabinet.java @@ -0,0 +1,42 @@ +package com.hbm.inventory.gui; + +import org.lwjgl.opengl.GL11; + +import com.hbm.inventory.container.ContainerFileCabinet; +import com.hbm.lib.RefStrings; +import com.hbm.tileentity.machine.storage.TileEntityFileCabinet; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; + +public class GUIFileCabinet extends GuiContainer { + + private static ResourceLocation texture = new ResourceLocation(RefStrings.MODID + ":textures/gui/storage/gui_file_cabinet.png"); + private TileEntityFileCabinet cabinet; + + public GUIFileCabinet(InventoryPlayer invPlayer, TileEntityFileCabinet tile) { + super(new ContainerFileCabinet(invPlayer, tile)); + cabinet = tile; + + this.xSize = 176; + this.ySize = 170; + } + + @Override + protected void drawGuiContainerForegroundLayer(int i, int j) { + String name = this.cabinet.hasCustomInventoryName() ? this.cabinet.getInventoryName() : I18n.format(this.cabinet.getInventoryName()); + + this.fontRendererObj.drawString(name, this.xSize / 2 - this.fontRendererObj.getStringWidth(name) / 2, 6, 4210752); + this.fontRendererObj.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752); + } + + @Override + protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + Minecraft.getMinecraft().getTextureManager().bindTexture(texture); + drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); + } +} diff --git a/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java b/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java index c409e2f84..caad579ec 100644 --- a/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java @@ -591,6 +591,16 @@ public class AnvilRecipes { } ).setTier(2)); + constructionRecipes.add(new AnvilConstructionRecipe( + new ComparableStack(ModBlocks.filing_cabinet), + new AnvilOutput[] { + new AnvilOutput(new ItemStack(ModItems.plate_steel, 2)), + new AnvilOutput(new ItemStack(ModItems.plate_steel, 2), 0.5F), + new AnvilOutput(new ItemStack(ModItems.plate_polymer, 2), 0.25F), + new AnvilOutput(new ItemStack(ModItems.scrap, 1)) + + } + ).setTier(1)); constructionRecipes.add(new AnvilConstructionRecipe( new ComparableStack(ModItems.circuit_raw), diff --git a/src/main/java/com/hbm/main/ClientProxy.java b/src/main/java/com/hbm/main/ClientProxy.java index fa3edc51d..e64cc42dd 100644 --- a/src/main/java/com/hbm/main/ClientProxy.java +++ b/src/main/java/com/hbm/main/ClientProxy.java @@ -286,6 +286,8 @@ public class ClientProxy extends ServerProxy { ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySubstation.class, new RenderSubstation()); //chargers ClientRegistry.bindTileEntitySpecialRenderer(TileEntityCharger.class, new RenderCharger()); + //DecoContainer + ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFileCabinet.class, new RenderFileCabinet()); //multiblocks ClientRegistry.bindTileEntitySpecialRenderer(TileEntityStructureMarker.class, new RenderStructureMaker()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMultiblock.class, new RenderMultiblock()); diff --git a/src/main/java/com/hbm/main/ResourceManager.java b/src/main/java/com/hbm/main/ResourceManager.java index 26e6ee247..557493c5d 100644 --- a/src/main/java/com/hbm/main/ResourceManager.java +++ b/src/main/java/com/hbm/main/ResourceManager.java @@ -319,6 +319,9 @@ public class ResourceManager { //Belt public static final IModelCustom charger = new HFRWavefrontObject(new ResourceLocation(RefStrings.MODID, "models/blocks/charger.obj")); + //DecoContainer (File Cabinet for now) + public static final IModelCustom file_cabinet = AdvancedModelLoader.loadModel(new ResourceLocation(RefStrings.MODID, "models/file_cabinet.obj")); + ////Textures TEs public static final ResourceLocation universal = new ResourceLocation(RefStrings.MODID, "textures/models/TheGadget3_.png"); @@ -655,6 +658,9 @@ public class ResourceManager { //Charger public static final ResourceLocation charger_tex = new ResourceLocation(RefStrings.MODID, "textures/models/machines/charger.png"); + //DecoContainer + public static final ResourceLocation file_cabinet_tex = new ResourceLocation(RefStrings.MODID, "textures/models/file_cabinet.png"); + ////Obj Items //Shimmer Sledge diff --git a/src/main/java/com/hbm/render/block/RenderBlockDecoModel.java b/src/main/java/com/hbm/render/block/RenderBlockDecoModel.java index 769c53838..660cf8f13 100644 --- a/src/main/java/com/hbm/render/block/RenderBlockDecoModel.java +++ b/src/main/java/com/hbm/render/block/RenderBlockDecoModel.java @@ -35,7 +35,8 @@ public class RenderBlockDecoModel implements ISimpleBlockRenderingHandler { iicon = renderer.overrideBlockTexture; } - GL11.glRotated(-15, 0, 1, 0); + GL11.glTranslated(0, 0.1D, 0); + GL11.glScaled(1.2D, 1.2D, 1.2D); tessellator.startDrawingQuads(); ObjUtil.renderWithIcon((WavefrontObject) model, iicon, tessellator, modelId, false); diff --git a/src/main/java/com/hbm/render/tileentity/RenderFileCabinet.java b/src/main/java/com/hbm/render/tileentity/RenderFileCabinet.java new file mode 100644 index 000000000..156562a15 --- /dev/null +++ b/src/main/java/com/hbm/render/tileentity/RenderFileCabinet.java @@ -0,0 +1,80 @@ +package com.hbm.render.tileentity; + +import org.lwjgl.opengl.GL11; + +import com.hbm.blocks.ModBlocks; +import com.hbm.main.ResourceManager; +import com.hbm.render.item.ItemRenderBase; +import com.hbm.tileentity.machine.storage.TileEntityFileCabinet; + +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.item.Item; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.client.IItemRenderer; + +public class RenderFileCabinet extends TileEntitySpecialRenderer implements IItemRendererProvider { + + @Override + public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float interp) { + + GL11.glPushMatrix(); + GL11.glTranslated(x + 0.5, y, z + 0.5); + GL11.glEnable(GL11.GL_LIGHTING); + GL11.glEnable(GL11.GL_CULL_FACE); + + switch(tile.getBlockMetadata() & 3) { //rotation + case 0: + GL11.glRotatef(180, 0F, 1F, 0F); + break; + case 1: + GL11.glRotatef(0, 0F, 1F, 0F); + break; + case 2: + GL11.glRotatef(270, 0F, 1F, 0F); + break; + case 3: + GL11.glRotatef(90, 0F, 1F, 0F); + break; + } + + TileEntityFileCabinet cabinet = (TileEntityFileCabinet) tile; + + bindTexture(ResourceManager.file_cabinet_tex); + ResourceManager.file_cabinet.renderPart("Cabinet"); + + GL11.glPushMatrix(); + float lower = cabinet.prevLowerExtent + (cabinet.lowerExtent - cabinet.prevLowerExtent) * interp; + GL11.glTranslated(0F, 0F, 0.6875F * lower); + ResourceManager.file_cabinet.renderPart("LowerDrawer"); + GL11.glPopMatrix(); + + GL11.glPushMatrix(); + float upper = cabinet.prevUpperExtent + (cabinet.upperExtent - cabinet.prevUpperExtent) * interp; + GL11.glTranslated(0F, 0F, 0.6875F * upper); + ResourceManager.file_cabinet.renderPart("UpperDrawer"); + GL11.glPopMatrix(); + + GL11.glPopMatrix(); + } + + @Override + public Item getItemForRenderer() { + return Item.getItemFromBlock(ModBlocks.filing_cabinet); + } + + @Override + public IItemRenderer getRenderer() { + return new ItemRenderBase() { + public void renderInventory() { + GL11.glTranslated(-1D, 0.5D, -1D); + GL11.glRotatef(180F, 0, 1F, 0); + GL11.glScalef(4F, 4F, 4F); + } + public void renderCommon() { + GL11.glTranslated(0, -1.25D, 0); + GL11.glScaled(2.75D, 2.75D, 2.75D); + bindTexture(ResourceManager.file_cabinet_tex); + ResourceManager.file_cabinet.renderAll(); + }}; + } +} diff --git a/src/main/java/com/hbm/tileentity/TileMappings.java b/src/main/java/com/hbm/tileentity/TileMappings.java index 5c2f87d3a..9809fbf68 100644 --- a/src/main/java/com/hbm/tileentity/TileMappings.java +++ b/src/main/java/com/hbm/tileentity/TileMappings.java @@ -185,6 +185,8 @@ public class TileMappings { put(TileEntityCharger.class, "tileentity_ntm_charger"); + put(TileEntityFileCabinet.class, "tileentity_file_cabinet"); + put(TileEntityProxyInventory.class, "tileentity_proxy_inventory"); put(TileEntityProxyEnergy.class, "tileentity_proxy_power"); put(TileEntityProxyCombo.class, "tileentity_proxy_combo"); diff --git a/src/main/java/com/hbm/tileentity/machine/storage/TileEntityFileCabinet.java b/src/main/java/com/hbm/tileentity/machine/storage/TileEntityFileCabinet.java new file mode 100644 index 000000000..958ad13de --- /dev/null +++ b/src/main/java/com/hbm/tileentity/machine/storage/TileEntityFileCabinet.java @@ -0,0 +1,145 @@ +package com.hbm.tileentity.machine.storage; + +import com.hbm.inventory.container.ContainerFileCabinet; +import com.hbm.inventory.gui.GUIFileCabinet; +import com.hbm.packet.NBTPacket; +import com.hbm.packet.PacketDispatcher; +import com.hbm.tileentity.IGUIProvider; +import com.hbm.tileentity.INBTPacketReceiver; + +import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; + +public class TileEntityFileCabinet extends TileEntityCrateBase implements IGUIProvider, INBTPacketReceiver { + + private int timer = 0; + private int playersUsing = 0; + //meh, it's literally just two extra variables + public float lowerExtent = 0; //i don't know a term for how 'open' something is + public float prevLowerExtent = 0; + public float upperExtent = 0; + public float prevUpperExtent = 0; + + public TileEntityFileCabinet() { + super(8); + } + + @Override + public String getInventoryName() { + return "container.fileCabinet"; + } + + @Override + public void openInventory() { + if(!worldObj.isRemote) this.playersUsing++; + //somehow guarentee that playersUsing is synced up when this method is called, to allow for sounds upon *actually* opening/closing? + //this.worldObj.playSoundEffect(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, "hbm:block.crateOpen", 1.0F, 1.0F); + } + + @Override + public void closeInventory() { + if(!worldObj.isRemote) this.playersUsing--; + } + + @Override + public void updateEntity() { + + if(!worldObj.isRemote) { + + if(this.playersUsing > 0) { + if(timer < 10) { + timer++; + } + } else + timer = 0; + + NBTTagCompound data = new NBTTagCompound(); + data.setInteger("timer", timer); + data.setInteger("playersUsing", this.playersUsing); + PacketDispatcher.wrapper.sendToAllAround(new NBTPacket(data, xCoord, yCoord, zCoord), new TargetPoint(this.worldObj.provider.dimensionId, xCoord, yCoord, zCoord, 25)); + } else { + this.prevLowerExtent = lowerExtent; + this.prevUpperExtent = upperExtent; + float openSpeed = 1F / 25F; + + if(this.playersUsing > 0) { + this.lowerExtent += openSpeed; + + if(timer >= 10) + this.upperExtent += openSpeed; + } else { + this.lowerExtent -= openSpeed; + this.upperExtent -= openSpeed; + } + + this.lowerExtent = MathHelper.clamp_float(lowerExtent, 0F, 0.8F); + this.upperExtent = MathHelper.clamp_float(upperExtent, 0F, 0.8F); + } + } + + @Override + public void networkUnpack(NBTTagCompound nbt) { + this.timer = nbt.getInteger("timer"); + this.playersUsing = nbt.getInteger("playersUsing"); + } + + @Override + public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) { + return new ContainerFileCabinet(player.inventory, this); + } + + @Override + public GuiScreen provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) { + return new GUIFileCabinet(player.inventory, this); + } + + //No automation, it's a filing cabinet. + @Override + public boolean isItemValidForSlot(int i, ItemStack stack) { + return false; + } + + @Override + public boolean canInsertItem(int i, ItemStack itemStack, int j) { + return false; + } + + @Override + public boolean canExtractItem(int i, ItemStack itemStack, int j) { + return false; + } + + AxisAlignedBB bb = null; + + @Override + public AxisAlignedBB getRenderBoundingBox() { + + if(bb == null) { + bb = AxisAlignedBB.getBoundingBox( + xCoord - 1, + yCoord, + zCoord - 1, + xCoord + 1, + yCoord + 1, + zCoord + 1 + ); + } + + return bb; + } + + @Override + @SideOnly(Side.CLIENT) + public double getMaxRenderDistanceSquared() { + return 65536.0D; + } +} diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index d6ecaf4dd..1d7c1ca58 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -485,6 +485,7 @@ container.epress=Electric Press container.factoryAdvanced=Advanced Factory container.factoryTitanium=Basic Factory container.fluidtank=Tank +container.fileCabinet=Filing Cabinet container.forceField=Forcefield Emitter container.frackingTower=Hydraulic Fracking Tower container.furnaceIron=Iron Furnace @@ -3912,6 +3913,7 @@ tile.factory_titanium_hull.name=Factory Block tile.fallout.name=Fallout tile.fence_metal.name=Chainlink Fence tile.field_disturber.name=High Energy Field Jammer +tile.filing_cabinet.name=Filing Cabinet tile.fire_digamma.name=Lingering Digamma tile.fire_door.name=Fire Door tile.fireworks.name=Firework Battery diff --git a/src/main/resources/assets/hbm/models/file_cabinet.obj b/src/main/resources/assets/hbm/models/file_cabinet.obj new file mode 100644 index 000000000..dce12e226 --- /dev/null +++ b/src/main/resources/assets/hbm/models/file_cabinet.obj @@ -0,0 +1,530 @@ +# Blender 3.2.0 +# www.blender.org +o Cabinet +v -0.312500 0.000000 0.250000 +v -0.312500 1.000000 0.250000 +v -0.312500 0.000000 -0.500000 +v -0.312500 1.000000 -0.500000 +v 0.312500 0.000000 0.250000 +v 0.312500 1.000000 0.250000 +v 0.312500 0.000000 -0.500000 +v 0.312500 1.000000 -0.500000 +v -0.312500 0.000000 0.250000 +v -0.312500 1.000000 0.250000 +v 0.312500 1.000000 0.250000 +v 0.312500 0.000000 0.250000 +v -0.250000 0.062500 -0.437500 +v 0.250000 0.062500 -0.437500 +v 0.250000 0.937500 -0.437500 +v -0.250000 0.937500 -0.437500 +v -0.250000 0.531250 -0.437500 +v 0.250000 0.531250 -0.437500 +v 0.312500 0.500000 0.250000 +v 0.250000 0.468750 -0.437500 +v -0.250000 0.468750 -0.437500 +v -0.312500 0.500000 0.250000 +v 0.250000 0.937500 0.250000 +v -0.250000 0.937500 0.250000 +v -0.250000 0.531250 0.250000 +v 0.250000 0.531250 0.250000 +v -0.250000 0.062500 0.250000 +v 0.250000 0.062500 0.250000 +v 0.250000 0.468750 0.250000 +v -0.250000 0.468750 0.250000 +vn -1.0000 -0.0000 -0.0000 +vn -0.0000 -0.0000 -1.0000 +vn 1.0000 -0.0000 -0.0000 +vn -0.0000 -0.0000 1.0000 +vn -0.0000 -1.0000 -0.0000 +vn -0.0000 1.0000 -0.0000 +vt 0.750000 0.640625 +vt 1.000000 0.640625 +vt 0.234375 0.828125 +vt 0.484375 0.828125 +vt 0.750000 0.484375 +vt 1.000000 0.484375 +vt 0.890625 0.828125 +vt 0.234375 0.984375 +vt 0.078125 0.828125 +vt 0.484375 0.984375 +vt 0.640625 0.828125 +vt 0.234375 0.640625 +vt 0.484375 0.640625 +vt 0.640625 0.640625 +vt 0.890625 0.640625 +vt 0.078125 0.640625 +vt 0.890625 0.828125 +vt 0.890625 0.703125 +vt 0.765625 0.828125 +vt 1.000000 0.703125 +vt 0.656250 0.828125 +vt 0.531250 0.828125 +vt 1.000000 0.828125 +vt 0.890625 0.828125 +vt 0.890625 0.703125 +vt 0.765625 0.828125 +vt 0.875000 0.484375 +vt 1.000000 0.703125 +vt 0.656250 0.828125 +vt 0.531250 0.828125 +vt 1.000000 0.828125 +vt 0.875000 0.640625 +vt 0.984375 0.500000 +vt 0.656250 1.000000 +vt 0.984375 0.625000 +vt 0.531250 1.000000 +vt 1.000000 1.000000 +vt 0.882812 0.625000 +vt 0.875000 0.500000 +vt 0.890625 1.000000 +vt 0.882812 0.500000 +vt 0.875000 0.625000 +vt 0.765625 1.000000 +vt 0.765625 0.625000 +vt 0.890625 1.000000 +vt 0.765625 0.500000 +vt 0.765625 1.000000 +vt 0.890625 0.625000 +vt 0.867188 0.500000 +vt 0.656250 1.000000 +vt 0.890625 0.500000 +vt 0.867188 0.625000 +vt 1.000000 1.000000 +vt 0.531250 1.000000 +s 0 +f 10/13/1 3/3/1 9/12/1 +f 4/4/2 7/8/2 3/3/2 +f 8/11/3 12/15/3 7/7/3 +f 15/20/4 17/24/4 18/25/4 +f 7/9/5 9/12/5 3/3/5 +f 4/4/6 11/14/6 8/11/6 +f 27/44/4 5/5/4 28/46/4 +f 23/33/4 2/2/4 24/35/4 +f 24/35/4 22/32/4 25/38/4 +f 28/46/4 19/27/4 29/49/4 +f 23/33/4 19/27/4 6/6/4 +f 30/52/4 25/38/4 22/32/4 +f 26/42/4 30/51/4 29/48/4 +f 20/28/4 13/17/4 14/18/4 +f 27/44/4 22/32/4 1/1/4 +f 26/41/4 29/49/4 19/27/4 +f 15/21/5 24/36/5 16/22/5 +f 16/23/3 25/40/3 17/24/3 +f 18/26/1 23/34/1 15/21/1 +f 17/24/6 26/43/6 18/26/6 +f 13/17/6 28/47/6 14/19/6 +f 14/19/1 29/50/1 20/29/1 +f 21/31/3 27/45/3 13/17/3 +f 20/29/5 30/54/5 21/30/5 +f 10/13/1 4/4/1 3/3/1 +f 4/4/2 8/10/2 7/8/2 +f 8/11/3 11/14/3 12/15/3 +f 15/20/4 16/23/4 17/24/4 +f 7/9/5 12/16/5 9/12/5 +f 4/4/6 10/13/6 11/14/6 +f 27/44/4 1/1/4 5/5/4 +f 23/33/4 6/6/4 2/2/4 +f 24/35/4 2/2/4 22/32/4 +f 28/46/4 5/5/4 19/27/4 +f 23/33/4 26/41/4 19/27/4 +f 26/42/4 25/39/4 30/51/4 +f 20/28/4 21/31/4 13/17/4 +f 27/44/4 30/52/4 22/32/4 +f 15/21/5 23/34/5 24/36/5 +f 16/23/3 24/37/3 25/40/3 +f 18/26/1 26/43/1 23/34/1 +f 17/24/6 25/40/6 26/43/6 +f 13/17/6 27/45/6 28/47/6 +f 14/19/1 28/47/1 29/50/1 +f 21/31/3 30/53/3 27/45/3 +f 20/29/5 29/50/5 30/54/5 +o LowerDrawer +v -0.078125 0.171875 0.250000 +v -0.250000 0.468750 0.250000 +v -0.250000 0.062500 -0.437500 +v 0.250000 0.062500 0.250000 +v -0.046875 0.203125 0.250000 +v 0.250000 0.062500 -0.437500 +v -0.250000 0.062500 0.187500 +v -0.250000 0.468750 0.187500 +v 0.250000 0.062500 0.187500 +v 0.250000 0.468750 0.187500 +v -0.218750 0.265625 -0.406250 +v 0.250000 0.265625 -0.437500 +v -0.250000 0.265625 0.187500 +v 0.250000 0.265625 0.187500 +v -0.218750 0.265625 0.187500 +v -0.250000 0.265625 -0.437500 +v 0.218750 0.265625 -0.406250 +v 0.218750 0.265625 0.187500 +v -0.218750 0.093750 -0.406250 +v -0.218750 0.093750 0.187500 +v 0.218750 0.093750 -0.406250 +v 0.218750 0.093750 0.187500 +v -0.250000 0.062500 0.250000 +v -0.078125 0.203125 0.250000 +v 0.250000 0.468750 0.250000 +v -0.046875 0.171875 0.250000 +v 0.046875 0.171875 0.250000 +v 0.078125 0.203125 0.250000 +v 0.046875 0.203125 0.250000 +v 0.078125 0.171875 0.250000 +v 0.046875 0.171875 0.281250 +v 0.046875 0.203125 0.281250 +v 0.078125 0.203125 0.281250 +v 0.078125 0.171875 0.281250 +v -0.078125 0.171875 0.281250 +v -0.078125 0.203125 0.281250 +v -0.046875 0.203125 0.281250 +v -0.046875 0.171875 0.281250 +v -0.046875 0.203125 0.265625 +v -0.046875 0.171875 0.265625 +v 0.046875 0.203125 0.265625 +v 0.046875 0.171875 0.265625 +vn -0.0000 -1.0000 -0.0000 +vn -0.0000 1.0000 -0.0000 +vn 1.0000 -0.0000 -0.0000 +vn -1.0000 -0.0000 -0.0000 +vn -0.0000 -0.0000 -1.0000 +vn -0.0000 -0.0000 1.0000 +vt 0.046875 0.984375 +vt 0.625000 0.500000 +vt 0.281250 0.390625 +vt 0.078125 0.640625 +vt 0.734375 0.625000 +vt 0.484375 0.640625 +vt 0.046875 1.000000 +vt 0.058594 0.972656 +vt 0.078125 0.515625 +vt 0.750000 0.500000 +vt 0.734375 0.484375 +vt 0.234375 0.640625 +vt 0.078125 0.796875 +vt 0.625000 0.484375 +vt 0.609375 0.500000 +vt 0.734375 0.640625 +vt 0.078125 0.359375 +vt 0.750000 0.625000 +vt 0.234375 0.515625 +vt 0.625000 0.640625 +vt 0.609375 0.625000 +vt 0.019531 0.632812 +vt 0.019531 0.648438 +vt 0.277344 0.484375 +vt 0.027344 0.515625 +vt 0.679688 0.484375 +vt 0.562500 0.500000 +vt 0.027344 0.796875 +vt 0.679688 0.640625 +vt 0.027344 0.359375 +vt 0.562500 0.625000 +vt 0.019531 0.796875 +vt 0.277344 0.109375 +vt 0.277344 0.640625 +vt 0.027344 0.640625 +vt 0.019531 0.507812 +vt 0.019531 0.523438 +vt 0.277344 0.375000 +vt 0.019531 0.359375 +vt 0.277344 0.218750 +vt 0.234375 0.484375 +vt 0.085938 0.484375 +vt 0.234375 0.640625 +vt 0.234375 0.109375 +vt 0.234375 0.375000 +vt 0.085938 0.375000 +vt 0.234375 0.218750 +vt 0.484375 0.390625 +vt 0.734375 0.500000 +vt 0.046875 0.992188 +vt 0.625000 0.625000 +vt 0.281250 0.640625 +vt 0.046875 0.976562 +vt 0.058594 0.980469 +vt 0.109375 0.976562 +vt 0.097656 0.980469 +vt 0.109375 0.992188 +vt 0.097656 0.972656 +vt 0.109375 1.000000 +vt 0.109375 0.984375 +vt 0.101562 0.976562 +vt 0.093750 0.984375 +vt 0.101562 1.000000 +vt 0.093750 0.992188 +vt 0.093750 0.968750 +vt 0.101562 0.992188 +vt 0.101562 0.984375 +vt 0.054688 0.984375 +vt 0.054688 0.992188 +vt 0.054688 1.000000 +vt 0.062500 0.992188 +vt 0.062500 0.968750 +vt 0.054688 0.976562 +vt 0.062500 0.984375 +vt 0.062500 0.972656 +vt 0.062500 0.980469 +vt 0.093750 0.972656 +vt 0.093750 0.980469 +s 0 +f 39/72/7 53/103/7 37/64/7 +f 38/69/8 55/105/8 40/75/8 +f 36/63/7 37/66/7 33/58/7 +f 44/84/8 47/90/8 48/93/8 +f 40/74/9 55/105/9 44/83/9 +f 34/59/9 44/83/9 55/105/9 +f 39/70/9 44/83/9 34/59/9 +f 53/103/10 43/80/10 37/65/10 +f 32/56/10 43/80/10 53/103/10 +f 38/68/10 43/80/10 32/56/10 +f 36/63/9 44/84/9 39/71/9 +f 42/79/11 33/58/11 46/89/11 +f 33/58/10 43/82/10 46/89/10 +f 46/89/8 47/91/8 42/79/8 +f 40/75/11 43/81/11 38/69/11 +f 41/77/8 43/82/8 45/86/8 +f 47/92/10 52/101/10 48/94/10 +f 52/100/8 49/95/8 50/96/8 +f 45/88/9 49/95/9 41/78/9 +f 48/94/11 50/98/11 45/87/11 +f 41/78/12 51/99/12 47/92/12 +f 63/120/12 61/116/12 64/121/12 +f 60/114/7 61/115/7 57/109/7 +f 58/111/9 64/121/9 60/114/9 +f 59/113/8 63/120/8 58/111/8 +f 71/131/9 57/110/9 59/112/9 +f 67/125/12 65/122/12 68/128/12 +f 31/55/10 66/123/10 54/104/10 +f 68/127/7 31/55/7 56/107/7 +f 66/123/8 35/61/8 54/104/8 +f 70/130/10 35/62/10 56/108/10 +f 70/130/12 71/131/12 69/129/12 +f 68/128/8 72/132/8 70/130/8 +f 62/118/12 68/128/12 61/116/12 +f 69/129/8 62/119/8 71/131/8 +f 34/60/12 32/57/12 53/102/12 +f 39/72/7 34/59/7 53/103/7 +f 38/69/8 32/56/8 55/105/8 +f 36/63/7 39/73/7 37/66/7 +f 44/84/8 42/79/8 47/90/8 +f 36/63/9 42/79/9 44/84/9 +f 42/79/11 36/63/11 33/58/11 +f 33/58/10 37/67/10 43/82/10 +f 46/89/8 41/76/8 47/91/8 +f 40/75/11 44/85/11 43/81/11 +f 41/77/8 46/89/8 43/82/8 +f 47/92/10 51/99/10 52/101/10 +f 52/100/8 51/99/8 49/95/8 +f 45/88/9 50/97/9 49/95/9 +f 48/94/11 52/101/11 50/98/11 +f 41/78/12 49/95/12 51/99/12 +f 63/120/12 62/118/12 61/116/12 +f 60/114/7 64/121/7 61/115/7 +f 58/111/9 63/120/9 64/121/9 +f 59/113/8 62/117/8 63/120/8 +f 71/131/9 72/132/9 57/110/9 +f 67/125/12 66/123/12 65/122/12 +f 31/55/10 65/122/10 66/123/10 +f 68/127/7 65/122/7 31/55/7 +f 66/123/8 67/124/8 35/61/8 +f 70/130/10 69/129/10 35/62/10 +f 70/130/12 72/132/12 71/131/12 +f 68/128/8 61/116/8 72/132/8 +f 62/118/12 67/125/12 68/128/12 +f 69/129/8 67/126/8 62/119/8 +f 34/60/12 55/106/12 32/57/12 +l 38 37 +l 40 39 +o UpperDrawer +v -0.078125 0.640625 0.250000 +v -0.250000 0.937500 0.250000 +v -0.250000 0.531250 -0.437500 +v 0.250000 0.531250 0.250000 +v -0.046875 0.671875 0.250000 +v 0.250000 0.531250 -0.437500 +v -0.250000 0.531250 0.187500 +v -0.250000 0.937500 0.187500 +v 0.250000 0.531250 0.187500 +v 0.250000 0.937500 0.187500 +v -0.218750 0.734375 -0.406250 +v 0.250000 0.734375 -0.437500 +v -0.250000 0.734375 0.187500 +v 0.250000 0.734375 0.187500 +v -0.218750 0.734375 0.187500 +v -0.250000 0.734375 -0.437500 +v 0.218750 0.734375 -0.406250 +v 0.218750 0.734375 0.187500 +v -0.218750 0.562500 -0.406250 +v -0.218750 0.562500 0.187500 +v 0.218750 0.562500 -0.406250 +v 0.218750 0.562500 0.187500 +v -0.250000 0.531250 0.250000 +v -0.078125 0.671875 0.250000 +v 0.250000 0.937500 0.250000 +v -0.046875 0.640625 0.250000 +v 0.046875 0.640625 0.250000 +v 0.078125 0.671875 0.250000 +v 0.046875 0.671875 0.250000 +v 0.078125 0.640625 0.250000 +v 0.046875 0.640625 0.281250 +v 0.046875 0.671875 0.281250 +v 0.078125 0.671875 0.281250 +v 0.078125 0.640625 0.281250 +v -0.078125 0.640625 0.281250 +v -0.078125 0.671875 0.281250 +v -0.046875 0.671875 0.281250 +v -0.046875 0.640625 0.281250 +v -0.046875 0.671875 0.265625 +v -0.046875 0.640625 0.265625 +v 0.046875 0.671875 0.265625 +v 0.046875 0.640625 0.265625 +vn -0.0000 -1.0000 -0.0000 +vn -0.0000 1.0000 -0.0000 +vn 1.0000 -0.0000 -0.0000 +vn -1.0000 -0.0000 -0.0000 +vn -0.0000 -0.0000 -1.0000 +vn -0.0000 -0.0000 1.0000 +vt 0.046875 0.984375 +vt 0.625000 0.500000 +vt 0.281250 0.140625 +vt 0.078125 0.640625 +vt 0.734375 0.625000 +vt 0.484375 0.390625 +vt 0.046875 1.000000 +vt 0.058594 0.972656 +vt 0.078125 0.515625 +vt 0.750000 0.500000 +vt 0.734375 0.484375 +vt 0.234375 0.640625 +vt 0.078125 0.796875 +vt 0.625000 0.484375 +vt 0.609375 0.500000 +vt 0.734375 0.640625 +vt 0.078125 0.359375 +vt 0.750000 0.625000 +vt 0.234375 0.515625 +vt 0.625000 0.640625 +vt 0.609375 0.625000 +vt 0.019531 0.632812 +vt 0.019531 0.648438 +vt 0.277344 0.484375 +vt 0.027344 0.515625 +vt 0.679688 0.484375 +vt 0.562500 0.500000 +vt 0.027344 0.796875 +vt 0.679688 0.640625 +vt 0.027344 0.359375 +vt 0.562500 0.625000 +vt 0.019531 0.796875 +vt 0.277344 0.109375 +vt 0.277344 0.640625 +vt 0.027344 0.640625 +vt 0.019531 0.507812 +vt 0.019531 0.523438 +vt 0.277344 0.375000 +vt 0.019531 0.359375 +vt 0.277344 0.218750 +vt 0.234375 0.484375 +vt 0.085938 0.484375 +vt 0.234375 0.640625 +vt 0.234375 0.109375 +vt 0.234375 0.375000 +vt 0.085938 0.375000 +vt 0.234375 0.218750 +vt 0.484375 0.140625 +vt 0.734375 0.500000 +vt 0.046875 0.992188 +vt 0.625000 0.625000 +vt 0.281250 0.390625 +vt 0.046875 0.976562 +vt 0.058594 0.980469 +vt 0.109375 0.976562 +vt 0.097656 0.980469 +vt 0.109375 0.992188 +vt 0.097656 0.972656 +vt 0.109375 1.000000 +vt 0.109375 0.984375 +vt 0.101562 0.976562 +vt 0.093750 0.984375 +vt 0.101562 1.000000 +vt 0.093750 0.992188 +vt 0.093750 0.968750 +vt 0.101562 0.992188 +vt 0.101562 0.984375 +vt 0.054688 0.984375 +vt 0.054688 0.992188 +vt 0.054688 1.000000 +vt 0.062500 0.992188 +vt 0.062500 0.968750 +vt 0.054688 0.976562 +vt 0.062500 0.984375 +vt 0.062500 0.972656 +vt 0.062500 0.980469 +vt 0.093750 0.972656 +vt 0.093750 0.980469 +s 0 +f 81/150/13 95/181/13 79/142/13 +f 80/147/14 97/183/14 82/153/14 +f 78/141/13 79/144/13 75/136/13 +f 86/162/14 89/168/14 90/171/14 +f 82/152/15 97/183/15 86/161/15 +f 76/137/15 86/161/15 97/183/15 +f 81/148/15 86/161/15 76/137/15 +f 95/181/16 85/158/16 79/143/16 +f 74/134/16 85/158/16 95/181/16 +f 80/146/16 85/158/16 74/134/16 +f 78/141/15 86/162/15 81/149/15 +f 84/157/17 75/136/17 88/167/17 +f 75/136/16 85/160/16 88/167/16 +f 88/167/14 89/169/14 84/157/14 +f 82/153/17 85/159/17 80/147/17 +f 83/155/14 85/160/14 87/164/14 +f 89/170/16 94/179/16 90/172/16 +f 94/178/14 91/173/14 92/174/14 +f 87/166/15 91/173/15 83/156/15 +f 90/172/17 92/176/17 87/165/17 +f 83/156/18 93/177/18 89/170/18 +f 105/198/18 103/194/18 106/199/18 +f 102/192/13 103/193/13 99/187/13 +f 100/189/15 106/199/15 102/192/15 +f 101/191/14 105/198/14 100/189/14 +f 113/209/15 99/188/15 101/190/15 +f 109/203/18 107/200/18 110/206/18 +f 73/133/16 108/201/16 96/182/16 +f 110/205/13 73/133/13 98/185/13 +f 108/201/14 77/139/14 96/182/14 +f 112/208/16 77/140/16 98/186/16 +f 112/208/18 113/209/18 111/207/18 +f 110/206/14 114/210/14 112/208/14 +f 104/196/18 110/206/18 103/194/18 +f 111/207/14 104/197/14 113/209/14 +f 76/138/18 74/135/18 95/180/18 +f 81/150/13 76/137/13 95/181/13 +f 80/147/14 74/134/14 97/183/14 +f 78/141/13 81/151/13 79/144/13 +f 86/162/14 84/157/14 89/168/14 +f 78/141/15 84/157/15 86/162/15 +f 84/157/17 78/141/17 75/136/17 +f 75/136/16 79/145/16 85/160/16 +f 88/167/14 83/154/14 89/169/14 +f 82/153/17 86/163/17 85/159/17 +f 83/155/14 88/167/14 85/160/14 +f 89/170/16 93/177/16 94/179/16 +f 94/178/14 93/177/14 91/173/14 +f 87/166/15 92/175/15 91/173/15 +f 90/172/17 94/179/17 92/176/17 +f 83/156/18 91/173/18 93/177/18 +f 105/198/18 104/196/18 103/194/18 +f 102/192/13 106/199/13 103/193/13 +f 100/189/15 105/198/15 106/199/15 +f 101/191/14 104/195/14 105/198/14 +f 113/209/15 114/210/15 99/188/15 +f 109/203/18 108/201/18 107/200/18 +f 73/133/16 107/200/16 108/201/16 +f 110/205/13 107/200/13 73/133/13 +f 108/201/14 109/202/14 77/139/14 +f 112/208/16 111/207/16 77/140/16 +f 112/208/18 114/210/18 113/209/18 +f 110/206/14 103/194/14 114/210/14 +f 104/196/18 109/203/18 110/206/18 +f 111/207/14 109/204/14 104/197/14 +f 76/138/18 97/184/18 74/135/18 diff --git a/src/main/resources/assets/hbm/textures/blocks/deco_computer_0.png b/src/main/resources/assets/hbm/textures/blocks/deco_computer.png similarity index 100% rename from src/main/resources/assets/hbm/textures/blocks/deco_computer_0.png rename to src/main/resources/assets/hbm/textures/blocks/deco_computer.png diff --git a/src/main/resources/assets/hbm/textures/gui/storage/gui_file_cabinet.png b/src/main/resources/assets/hbm/textures/gui/storage/gui_file_cabinet.png new file mode 100644 index 0000000000000000000000000000000000000000..0674a13e3c918855dee07fc29dd8bb920b1d658e GIT binary patch literal 850 zcmeAS@N?(olHy`uVBq!ia0y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