+ * Contributors: + * cpw - initial API and implementation + ******************************************************************************/ +package cpw.mods.ironchest; + +import cpw.mods.ironchest.client.ClientProxy; +import cpw.mods.ironchest.common.ServerProxy; +import cpw.mods.ironchest.common.core.IronChestBlocks; +import cpw.mods.ironchest.common.core.IronChestItems; +import cpw.mods.ironchest.common.tileentity.IronChestEntityType; +import net.minecraftforge.fml.DistExecutor; +import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; +import net.minecraftforge.fml.javafmlmod.FMLModLoadingContext; + +@Mod(value = IronChest.MOD_ID) +public class IronChest +{ + public static final String MOD_ID = "ironchest"; + + public static IronChest instance; + + public static ServerProxy proxy = DistExecutor.runForDist(() -> ClientProxy::new, () -> ServerProxy::new); + + public IronChestBlocks ironChestBlocks = new IronChestBlocks(); + + public IronChestItems ironChestItems = new IronChestItems(); + + public IronChestEntityType ironChestEntityType = new IronChestEntityType(); + + public IronChest() + { + instance = this; + FMLModLoadingContext.get().getModEventBus().addListener(this::preInit); + } + + private void preInit(final FMLPreInitializationEvent event) + { + proxy.preInit(); + ironChestBlocks.registerBlocks(); + ironChestBlocks.registerItems(); + ironChestItems.registerItems(); + + ironChestEntityType.registerTileEntities(); + ironChestEntityType.createEntries(); + } +} diff --git a/src/main/java/cpw/mods/ironchest/client/ClientProxy.java b/src/main/java/cpw/mods/ironchest/client/ClientProxy.java new file mode 100644 index 0000000..6caf31e --- /dev/null +++ b/src/main/java/cpw/mods/ironchest/client/ClientProxy.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright (c) 2012 cpw. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the GNU Public License v3.0 + * which accompanies this distribution, and is available at + * http://www.gnu.org/licenses/gpl.html + *
+ * Contributors: + * cpw - initial API and implementation + ******************************************************************************/ +package cpw.mods.ironchest.client; + +import cpw.mods.ironchest.client.renderer.TileEntityIronChestRenderer; +import cpw.mods.ironchest.common.ServerProxy; +import cpw.mods.ironchest.common.blocks.IronChestType; +import net.minecraftforge.fml.client.registry.ClientRegistry; + +public class ClientProxy extends ServerProxy +{ + public ClientProxy() + { + + } + + @Override + @SuppressWarnings({ "unchecked", "rawtypes" }) + public void preInit() + { + System.out.println("hello"); + super.preInit(); + for (IronChestType type : IronChestType.values()) + { + if (type.clazz != null) + { + ClientRegistry.bindTileEntitySpecialRenderer(type.clazz, new TileEntityIronChestRenderer()); + } + } + } +} diff --git a/src/main/java/cpw/mods/ironchest/client/gui/GUIChest.java b/src/main/java/cpw/mods/ironchest/client/gui/GUIChest.java new file mode 100644 index 0000000..4456541 --- /dev/null +++ b/src/main/java/cpw/mods/ironchest/client/gui/GUIChest.java @@ -0,0 +1,137 @@ +/******************************************************************************* + * Copyright (c) 2012 cpw. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the GNU Public License v3.0 + * which accompanies this distribution, and is available at + * http://www.gnu.org/licenses/gpl.html + *
+ * Contributors: + * cpw - initial API and implementation + ******************************************************************************/ +package cpw.mods.ironchest.client.gui; + +import cpw.mods.ironchest.common.blocks.IronChestType; +import cpw.mods.ironchest.common.gui.ContainerIronChest; +import cpw.mods.ironchest.common.tileentity.TileEntityIronChest; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.client.renderer.GlStateManager; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.Container; +import net.minecraft.inventory.IInventory; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; + +@OnlyIn(Dist.CLIENT) +public class GUIChest extends GuiContainer +{ + public enum ResourceList + { + //@formatter:off + IRON(new ResourceLocation("ironchest", "textures/gui/iron_container.png")), + COPPER(new ResourceLocation("ironchest", "textures/gui/copper_container.png")), + SILVER(new ResourceLocation("ironchest", "textures/gui/silver_container.png")), + GOLD(new ResourceLocation("ironchest", "textures/gui/gold_container.png")), + DIAMOND(new ResourceLocation("ironchest", "textures/gui/diamond_container.png")), + DIRT(new ResourceLocation("ironchest", "textures/gui/dirt_container.png")); + //@formatter:on + public final ResourceLocation location; + + ResourceList(ResourceLocation loc) + { + this.location = loc; + } + } + + public enum GUI + { + //@formatter:off + IRON(184, 202, ResourceList.IRON, IronChestType.IRON), + GOLD(184, 256, ResourceList.GOLD, IronChestType.GOLD), + DIAMOND(238, 256, ResourceList.DIAMOND, IronChestType.DIAMOND), + COPPER(184, 184, ResourceList.COPPER, IronChestType.COPPER), + SILVER(184, 238, ResourceList.SILVER, IronChestType.SILVER), + CRYSTAL(238, 256, ResourceList.DIAMOND, IronChestType.CRYSTAL), + OBSIDIAN(238, 256, ResourceList.DIAMOND,IronChestType.OBSIDIAN), + DIRTCHEST9000(184, 184, ResourceList.DIRT, IronChestType.DIRTCHEST9000); + //@formatter:on + + private int xSize; + + private int ySize; + + private ResourceList guiResourceList; + + private IronChestType mainType; + + GUI(int xSize, int ySize, ResourceList guiResourceList, IronChestType mainType) + { + this.xSize = xSize; + this.ySize = ySize; + this.guiResourceList = guiResourceList; + this.mainType = mainType; + } + + protected Container makeContainer(IInventory playerInventory, IInventory chestInventory, EntityPlayer player) + { + return new ContainerIronChest(playerInventory, chestInventory, this.mainType, player, this.xSize, this.ySize); + } + + public static GUIChest buildGUI(IronChestType type, IInventory playerInventory, TileEntityIronChest chestInventory) + { + return new GUIChest(values()[chestInventory.getIronChestType().ordinal()], playerInventory, chestInventory); + } + } + + private GUI type; + + private final IInventory upperChestInventory; + + private final IInventory lowerChestInventory; + + private GUIChest(GUI type, IInventory playerInventory, IInventory chestInventory) + { + super(type.makeContainer(playerInventory, chestInventory, Minecraft.getInstance().player)); + this.type = type; + this.xSize = type.xSize; + this.ySize = type.ySize; + this.upperChestInventory = playerInventory; + this.lowerChestInventory = chestInventory; + this.allowUserInput = false; + } + + /** + * Draws the screen and all the components in it. + */ + @Override + public void render(int mouseX, int mouseY, float partialTicks) + { + this.drawDefaultBackground(); + super.render(mouseX, mouseY, partialTicks); + this.renderHoveredToolTip(mouseX, mouseY); + } + + @Override + protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) + { + this.fontRenderer.drawString(this.lowerChestInventory.getDisplayName().getString(), 8.0F, 6.0F, 4210752); + this.fontRenderer.drawString(this.upperChestInventory.getDisplayName().getString(), 8.0F, this.ySize - 96 + 2, 4210752); + } + + /** + * Draws the background layer of this container (behind the items). + */ + @Override + protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) + { + GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); + + this.mc.getTextureManager().bindTexture(this.type.guiResourceList.location); + + int x = (this.width - this.xSize) / 2; + int y = (this.height - this.ySize) / 2; + + this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); + } +} diff --git a/src/main/java/cpw/mods/ironchest/client/renderer/TileEntityIronChestRenderer.java b/src/main/java/cpw/mods/ironchest/client/renderer/TileEntityIronChestRenderer.java new file mode 100644 index 0000000..ee57b22 --- /dev/null +++ b/src/main/java/cpw/mods/ironchest/client/renderer/TileEntityIronChestRenderer.java @@ -0,0 +1,222 @@ +/******************************************************************************* + * Copyright (c) 2012 cpw. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the GNU Public License v3.0 + * which accompanies this distribution, and is available at + * http://www.gnu.org/licenses/gpl.html + *
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.client.renderer;
+
+import java.util.Random;
+
+import com.google.common.primitives.SignedBytes;
+
+import cpw.mods.ironchest.common.blocks.BlockChest;
+import cpw.mods.ironchest.common.blocks.BlockIronChest;
+import cpw.mods.ironchest.common.blocks.IronChestType;
+import cpw.mods.ironchest.common.core.IronChestBlocks;
+import cpw.mods.ironchest.common.tileentity.TileEntityCrystalChest;
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.client.Minecraft;
+import net.minecraft.client.renderer.GlStateManager;
+import net.minecraft.client.renderer.entity.RenderEntityItem;
+import net.minecraft.client.renderer.entity.model.ModelChest;
+import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
+import net.minecraft.entity.item.EntityItem;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.IChestLid;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.EnumFacing;
+
+public class TileEntityIronChestRenderer
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common;
+
+public class ServerProxy
+{
+ public void preInit()
+ {
+
+ }
+}
diff --git a/src/main/java/cpw/mods/ironchest/common/ai/IronChestAIOcelotSit.java b/src/main/java/cpw/mods/ironchest/common/ai/IronChestAIOcelotSit.java
new file mode 100644
index 0000000..9fb0936
--- /dev/null
+++ b/src/main/java/cpw/mods/ironchest/common/ai/IronChestAIOcelotSit.java
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2012 cpw.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the GNU Public License v3.0
+ * which accompanies this distribution, and is available at
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common.ai;
+
+import cpw.mods.ironchest.common.blocks.BlockChest;
+import cpw.mods.ironchest.common.tileentity.TileEntityIronChest;
+import net.minecraft.block.Block;
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.entity.ai.EntityAIOcelotSit;
+import net.minecraft.entity.passive.EntityOcelot;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.world.IWorldReaderBase;
+
+public class IronChestAIOcelotSit extends EntityAIOcelotSit
+{
+ public IronChestAIOcelotSit(EntityOcelot ocelotIn, float speedIn)
+ {
+ super(ocelotIn, speedIn);
+ }
+
+ /**
+ * Return true to set given position as destination
+ */
+ @Override
+ protected boolean shouldMoveTo(IWorldReaderBase worldIn, BlockPos pos)
+ {
+ if (!worldIn.isAirBlock(pos.up()))
+ {
+ return false;
+ }
+ else
+ {
+ IBlockState iblockstate = worldIn.getBlockState(pos);
+ Block block = iblockstate.getBlock();
+
+ if (block instanceof BlockChest)
+ {
+ return TileEntityIronChest.getPlayersUsing(worldIn, pos) < 1;
+ }
+
+ return super.shouldMoveTo(worldIn, pos);
+ }
+ }
+}
diff --git a/src/main/java/cpw/mods/ironchest/common/ai/OcelotsSitOnChestsHandler.java b/src/main/java/cpw/mods/ironchest/common/ai/OcelotsSitOnChestsHandler.java
new file mode 100644
index 0000000..ce95d99
--- /dev/null
+++ b/src/main/java/cpw/mods/ironchest/common/ai/OcelotsSitOnChestsHandler.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2012 cpw.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the GNU Public License v3.0
+ * which accompanies this distribution, and is available at
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common.ai;
+
+import java.util.HashSet;
+
+import net.minecraft.entity.ai.EntityAIOcelotSit;
+import net.minecraft.entity.ai.EntityAITasks.EntityAITaskEntry;
+import net.minecraft.entity.passive.EntityOcelot;
+import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
+import net.minecraftforge.eventbus.api.SubscribeEvent;
+
+public class OcelotsSitOnChestsHandler
+{
+ @SubscribeEvent
+ public void changeSittingTaskForOcelots(LivingUpdateEvent evt)
+ {
+ if (evt.getEntityLiving().ticksExisted < 5 && evt.getEntityLiving() instanceof EntityOcelot)
+ {
+ HashSet
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common.blocks;
+
+import javax.annotation.Nullable;
+
+import cpw.mods.ironchest.common.tileentity.TileEntityIronChest;
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockHorizontal;
+import net.minecraft.block.ITileEntityProvider;
+import net.minecraft.block.state.BlockFaceShape;
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.enchantment.EnchantmentHelper;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.init.Enchantments;
+import net.minecraft.init.Items;
+import net.minecraft.inventory.Container;
+import net.minecraft.inventory.InventoryHelper;
+import net.minecraft.item.BlockItemUseContext;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.pathfinding.PathType;
+import net.minecraft.state.DirectionProperty;
+import net.minecraft.state.StateContainer;
+import net.minecraft.stats.StatList;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.EnumBlockRenderType;
+import net.minecraft.util.EnumFacing;
+import net.minecraft.util.INameable;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.util.Rotation;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.util.math.shapes.VoxelShape;
+import net.minecraft.world.IBlockReader;
+import net.minecraft.world.ILockableContainer;
+import net.minecraft.world.World;
+import net.minecraftforge.api.distmarker.Dist;
+import net.minecraftforge.api.distmarker.OnlyIn;
+
+public abstract class BlockChest extends Block implements ITileEntityProvider
+{
+ public static final DirectionProperty FACING = BlockHorizontal.HORIZONTAL_FACING;
+
+ protected static final VoxelShape IRON_CHEST_SHAPE = Block.makeCuboidShape(1.0D, 0.0D, 1.0D, 15.0D, 14.0D, 15.0D);
+
+ public IronChestType type;
+
+ public BlockChest(Builder properties, IronChestType type)
+ {
+ super(properties);
+
+ this.setDefaultState(((this.stateContainer.getBaseState()).with(FACING, EnumFacing.NORTH)));
+
+ this.type = type;
+
+ this.setRegistryName(new ResourceLocation(type.itemName));
+ }
+
+ @Override
+ public boolean isSolid(IBlockState state)
+ {
+ return false;
+ }
+
+ @Override
+ public boolean isFullCube(IBlockState state)
+ {
+ return false;
+ }
+
+ @Override
+ @OnlyIn(Dist.CLIENT)
+ public boolean hasCustomBreakingProgress(IBlockState state)
+ {
+ return true;
+ }
+
+ @Override
+ public EnumBlockRenderType getRenderType(IBlockState state)
+ {
+ return EnumBlockRenderType.ENTITYBLOCK_ANIMATED;
+ }
+
+ @Override
+ public IBlockState getStateForPlacement(BlockItemUseContext context)
+ {
+ EnumFacing enumfacing = context.getPlacementHorizontalFacing().getOpposite();
+
+ return this.getDefaultState().with(FACING, enumfacing);
+ }
+
+ @Override
+ public VoxelShape getShape(IBlockState state, IBlockReader worldIn, BlockPos pos)
+ {
+ return IRON_CHEST_SHAPE;
+ }
+
+ @Override
+ public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack)
+ {
+ TileEntity tileentity = worldIn.getTileEntity(pos);
+
+ if (tileentity != null && tileentity instanceof TileEntityIronChest)
+ {
+ TileEntityIronChest teic = (TileEntityIronChest) tileentity;
+
+ teic.wasPlaced(placer, stack);
+
+ if (stack.hasDisplayName())
+ {
+ teic.setCustomName(stack.getDisplayName());
+ }
+ }
+ }
+
+ @SuppressWarnings("deprecation")
+ @Override
+ public void onReplaced(IBlockState state, World worldIn, BlockPos pos, IBlockState newState, boolean isMoving)
+ {
+ if (state.getBlock() != newState.getBlock())
+ {
+ TileEntityIronChest tileentity = (TileEntityIronChest) worldIn.getTileEntity(pos);
+ if (tileentity != null)
+ {
+ InventoryHelper.dropInventoryItems(worldIn, pos, tileentity);
+ worldIn.updateComparatorOutputLevel(pos, this);
+
+ tileentity.removeAdornments();
+ }
+
+ super.onReplaced(state, worldIn, pos, newState, isMoving);
+ }
+ }
+
+ @SuppressWarnings("deprecation")
+ @Override
+ public boolean eventReceived(IBlockState state, World worldIn, BlockPos pos, int id, int param)
+ {
+ super.eventReceived(state, worldIn, pos, id, param);
+ TileEntity tileentity = worldIn.getTileEntity(pos);
+ return tileentity == null ? false : tileentity.receiveClientEvent(id, param);
+ }
+
+ @Override
+ public boolean hasTileEntity(IBlockState state)
+ {
+ return true;
+ }
+
+ @Nullable
+ public ILockableContainer getContainer(IBlockState state, World worldIn, BlockPos pos)
+ {
+ TileEntity tileentity = worldIn.getTileEntity(pos);
+
+ if (!(tileentity instanceof TileEntityIronChest))
+ {
+ return null;
+ }
+ else
+ {
+ return (ILockableContainer) tileentity;
+ }
+ }
+
+ @SuppressWarnings("deprecation")
+ @Override
+ public void harvestBlock(World worldIn, EntityPlayer player, BlockPos pos, IBlockState state, @Nullable TileEntity te, ItemStack stack)
+ {
+ if (te instanceof INameable && ((INameable) te).hasCustomName())
+ {
+ player.addStat(StatList.BLOCK_MINED.get(this));
+ player.addExhaustion(0.005F);
+ if (worldIn.isRemote)
+ {
+ return;
+ }
+
+ int i = EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, stack);
+ Item item = this.getItemDropped(state, worldIn, pos, i).asItem();
+ if (item == Items.AIR)
+ {
+ return;
+ }
+
+ ItemStack itemstack = new ItemStack(item, this.quantityDropped(state, worldIn.rand));
+ itemstack.setDisplayName(((INameable) te).getCustomName());
+ spawnAsEntity(worldIn, pos, itemstack);
+ }
+ else
+ {
+ super.harvestBlock(worldIn, player, pos, state, (TileEntity) null, stack);
+ }
+ }
+
+ @Override
+ public boolean hasComparatorInputOverride(IBlockState state)
+ {
+ return true;
+ }
+
+ @Override
+ public int getComparatorInputOverride(IBlockState blockState, World worldIn, BlockPos pos)
+ {
+ return Container.calcRedstoneFromInventory(this.getContainer(blockState, worldIn, pos));
+ }
+
+ @Override
+ public IBlockState rotate(IBlockState state, Rotation rot)
+ {
+ return state.with(FACING, rot.rotate(state.get(FACING)));
+ }
+
+ @Override
+ protected void fillStateContainer(StateContainer.Builder
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common.blocks;
+
+import cpw.mods.ironchest.common.tileentity.TileEntityCopperChest;
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.IBlockReader;
+
+public class BlockCopperChest extends BlockChest
+{
+ public BlockCopperChest(Builder properties)
+ {
+ super(properties, IronChestType.COPPER);
+ }
+
+ @Override
+ public TileEntity createTileEntity(IBlockState state, IBlockReader world)
+ {
+ return new TileEntityCopperChest();
+ }
+
+ @Override
+ public TileEntity createNewTileEntity(IBlockReader worldIn)
+ {
+ return new TileEntityCopperChest();
+ }
+}
diff --git a/src/main/java/cpw/mods/ironchest/common/blocks/BlockCrystalChest.java b/src/main/java/cpw/mods/ironchest/common/blocks/BlockCrystalChest.java
new file mode 100644
index 0000000..0e5e32d
--- /dev/null
+++ b/src/main/java/cpw/mods/ironchest/common/blocks/BlockCrystalChest.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2012 cpw.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the GNU Public License v3.0
+ * which accompanies this distribution, and is available at
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common.blocks;
+
+import cpw.mods.ironchest.common.tileentity.TileEntityCrystalChest;
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.IBlockReader;
+
+public class BlockCrystalChest extends BlockChest
+{
+ public BlockCrystalChest(Builder properties)
+ {
+ super(properties, IronChestType.CRYSTAL);
+ }
+
+ @Override
+ public TileEntity createTileEntity(IBlockState state, IBlockReader world)
+ {
+ return new TileEntityCrystalChest();
+ }
+
+ @Override
+ public TileEntity createNewTileEntity(IBlockReader worldIn)
+ {
+ return new TileEntityCrystalChest();
+ }
+}
diff --git a/src/main/java/cpw/mods/ironchest/common/blocks/BlockDiamondChest.java b/src/main/java/cpw/mods/ironchest/common/blocks/BlockDiamondChest.java
new file mode 100644
index 0000000..ef20e20
--- /dev/null
+++ b/src/main/java/cpw/mods/ironchest/common/blocks/BlockDiamondChest.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2012 cpw.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the GNU Public License v3.0
+ * which accompanies this distribution, and is available at
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common.blocks;
+
+import cpw.mods.ironchest.common.tileentity.TileEntityDiamondChest;
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.IBlockReader;
+
+public class BlockDiamondChest extends BlockChest
+{
+ public BlockDiamondChest(Builder properties)
+ {
+ super(properties, IronChestType.DIAMOND);
+ }
+
+ @Override
+ public TileEntity createTileEntity(IBlockState state, IBlockReader world)
+ {
+ return new TileEntityDiamondChest();
+ }
+
+ @Override
+ public TileEntity createNewTileEntity(IBlockReader worldIn)
+ {
+ return new TileEntityDiamondChest();
+ }
+
+}
diff --git a/src/main/java/cpw/mods/ironchest/common/blocks/BlockDirtChest.java b/src/main/java/cpw/mods/ironchest/common/blocks/BlockDirtChest.java
new file mode 100644
index 0000000..73e558b
--- /dev/null
+++ b/src/main/java/cpw/mods/ironchest/common/blocks/BlockDirtChest.java
@@ -0,0 +1,51 @@
+/*******************************************************************************
+ * Copyright (c) 2012 cpw.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the GNU Public License v3.0
+ * which accompanies this distribution, and is available at
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common.blocks;
+
+import cpw.mods.ironchest.common.tileentity.TileEntityDirtChest;
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagByte;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.world.IBlockReader;
+import net.minecraft.world.World;
+
+public class BlockDirtChest extends BlockChest
+{
+ public BlockDirtChest(Builder properties)
+ {
+ super(properties, IronChestType.DIRTCHEST9000);
+ }
+
+ @SuppressWarnings("deprecation")
+ @Override
+ public void getDrops(IBlockState state, net.minecraft.util.NonNullList
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common.blocks;
+
+import cpw.mods.ironchest.common.tileentity.TileEntityGoldChest;
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.IBlockReader;
+
+public class BlockGoldChest extends BlockChest
+{
+ public BlockGoldChest(Builder properties)
+ {
+ super(properties, IronChestType.GOLD);
+ }
+
+ @Override
+ public TileEntity createTileEntity(IBlockState state, IBlockReader world)
+ {
+ return new TileEntityGoldChest();
+ }
+
+ @Override
+ public TileEntity createNewTileEntity(IBlockReader worldIn)
+ {
+ return new TileEntityGoldChest();
+ }
+
+}
diff --git a/src/main/java/cpw/mods/ironchest/common/blocks/BlockIronChest.java b/src/main/java/cpw/mods/ironchest/common/blocks/BlockIronChest.java
new file mode 100644
index 0000000..60ecc16
--- /dev/null
+++ b/src/main/java/cpw/mods/ironchest/common/blocks/BlockIronChest.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2012 cpw.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the GNU Public License v3.0
+ * which accompanies this distribution, and is available at
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common.blocks;
+
+import cpw.mods.ironchest.common.tileentity.TileEntityIronChest;
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.IBlockReader;
+
+public class BlockIronChest extends BlockChest
+{
+ public BlockIronChest(Builder properties)
+ {
+ super(properties, IronChestType.IRON);
+ }
+
+ @Override
+ public TileEntity createTileEntity(IBlockState state, IBlockReader world)
+ {
+ return new TileEntityIronChest();
+ }
+
+ @Override
+ public TileEntity createNewTileEntity(IBlockReader worldIn)
+ {
+ return new TileEntityIronChest();
+ }
+
+}
diff --git a/src/main/java/cpw/mods/ironchest/common/blocks/BlockObsidianChest.java b/src/main/java/cpw/mods/ironchest/common/blocks/BlockObsidianChest.java
new file mode 100644
index 0000000..703e6b2
--- /dev/null
+++ b/src/main/java/cpw/mods/ironchest/common/blocks/BlockObsidianChest.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2012 cpw.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the GNU Public License v3.0
+ * which accompanies this distribution, and is available at
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common.blocks;
+
+import cpw.mods.ironchest.common.tileentity.TileEntityObsidianChest;
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.IBlockReader;
+
+public class BlockObsidianChest extends BlockChest
+{
+ public BlockObsidianChest(Builder properties)
+ {
+ super(properties, IronChestType.OBSIDIAN);
+ }
+
+ @Override
+ public TileEntity createTileEntity(IBlockState state, IBlockReader world)
+ {
+ return new TileEntityObsidianChest();
+ }
+
+ @Override
+ public TileEntity createNewTileEntity(IBlockReader worldIn)
+ {
+ return new TileEntityObsidianChest();
+ }
+}
diff --git a/src/main/java/cpw/mods/ironchest/common/blocks/BlockSilverChest.java b/src/main/java/cpw/mods/ironchest/common/blocks/BlockSilverChest.java
new file mode 100644
index 0000000..779352a
--- /dev/null
+++ b/src/main/java/cpw/mods/ironchest/common/blocks/BlockSilverChest.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2012 cpw.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the GNU Public License v3.0
+ * which accompanies this distribution, and is available at
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common.blocks;
+
+import cpw.mods.ironchest.common.tileentity.TileEntitySilverChest;
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.IBlockReader;
+
+public class BlockSilverChest extends BlockChest
+{
+ public BlockSilverChest(Builder properties)
+ {
+ super(properties, IronChestType.SILVER);
+ }
+
+ @Override
+ public TileEntity createTileEntity(IBlockState state, IBlockReader world)
+ {
+ return new TileEntitySilverChest();
+ }
+
+ @Override
+ public TileEntity createNewTileEntity(IBlockReader worldIn)
+ {
+ return new TileEntitySilverChest();
+ }
+}
diff --git a/src/main/java/cpw/mods/ironchest/common/blocks/IronChestType.java b/src/main/java/cpw/mods/ironchest/common/blocks/IronChestType.java
new file mode 100644
index 0000000..243ae89
--- /dev/null
+++ b/src/main/java/cpw/mods/ironchest/common/blocks/IronChestType.java
@@ -0,0 +1,199 @@
+/*******************************************************************************
+ * Copyright (c) 2012 cpw.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the GNU Public License v3.0
+ * which accompanies this distribution, and is available at
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common.blocks;
+
+import cpw.mods.ironchest.common.core.IronChestBlocks;
+import cpw.mods.ironchest.common.gui.slot.ValidatingChestSlot;
+import cpw.mods.ironchest.common.tileentity.TileEntityCopperChest;
+import cpw.mods.ironchest.common.tileentity.TileEntityCrystalChest;
+import cpw.mods.ironchest.common.tileentity.TileEntityDiamondChest;
+import cpw.mods.ironchest.common.tileentity.TileEntityDirtChest;
+import cpw.mods.ironchest.common.tileentity.TileEntityGoldChest;
+import cpw.mods.ironchest.common.tileentity.TileEntityIronChest;
+import cpw.mods.ironchest.common.tileentity.TileEntityObsidianChest;
+import cpw.mods.ironchest.common.tileentity.TileEntitySilverChest;
+import cpw.mods.ironchest.common.util.BlockNames;
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.init.Blocks;
+import net.minecraft.inventory.IInventory;
+import net.minecraft.inventory.Slot;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.util.IStringSerializable;
+import net.minecraft.util.ResourceLocation;
+
+public enum IronChestType implements IStringSerializable
+{
+ //@formatter:off
+ IRON(54, 9, true, "iron_chest.png", TileEntityIronChest.class, 184, 202, BlockNames.IRON_CHEST),
+ GOLD(81, 9, true, "gold_chest.png", TileEntityGoldChest.class, 184, 256, BlockNames.GOLD_CHEST),
+ DIAMOND(108, 12, true, "diamond_chest.png", TileEntityDiamondChest.class, 184, 256, BlockNames.DIAMOND_CHEST),
+ COPPER(45, 9, false, "copper_chest.png", TileEntityCopperChest.class, 184, 184, BlockNames.COPPER_CHEST),
+ SILVER(72, 9, false, "silver_chest.png", TileEntitySilverChest.class, 184, 238, BlockNames.SILVER_CHEST),
+ CRYSTAL(108, 12, true, "crystal_chest.png", TileEntityCrystalChest.class, 238, 256, BlockNames.CRYSTAL_CHEST),
+ OBSIDIAN(108, 12, false, "obsidian_chest.png", TileEntityObsidianChest.class, 238, 256, BlockNames.OBSIDIAN_CHEST),
+ DIRTCHEST9000(1, 1, false, "dirt_chest.png", TileEntityDirtChest.class, 184, 184, BlockNames.DIRT_CHEST),
+ WOOD(0, 0, false, "", null, 0, 0, null);
+ //@formatter:on
+
+ public static final IronChestType VALUES[] = values();
+
+ public final String name;
+
+ public final int size;
+
+ public final int rowLength;
+
+ public final boolean tieredChest;
+
+ public final ResourceLocation modelTexture;
+
+ public final Class extends TileEntity> clazz;
+
+ public final int xSize;
+
+ public final int ySize;
+
+ public final String itemName;
+
+ IronChestType(int size, int rowLength, boolean tieredChest, String modelTexture, Class extends TileEntityIronChest> clazz, int xSize, int ySize, String itemName)
+ {
+ this.name = this.name().toLowerCase();
+ this.size = size;
+ this.rowLength = rowLength;
+ this.tieredChest = tieredChest;
+ this.modelTexture = new ResourceLocation("ironchest", "textures/model/" + modelTexture);
+ this.clazz = clazz;
+ this.xSize = xSize;
+ this.ySize = ySize;
+ this.itemName = itemName;
+ }
+
+ @Override
+ public String getName()
+ {
+ return this.name;
+ }
+
+ public int getRowCount()
+ {
+ return this.size / this.rowLength;
+ }
+
+ public boolean isTransparent()
+ {
+ return this == CRYSTAL;
+ }
+
+ public boolean isValidForCreativeMode()
+ {
+ return this != WOOD;
+ }
+
+ public boolean isExplosionResistant()
+ {
+ return this == OBSIDIAN;
+ }
+
+ public Slot makeSlot(IInventory chestInventory, int index, int x, int y)
+ {
+ return new ValidatingChestSlot(chestInventory, index, x, y, this);
+ }
+
+ @SuppressWarnings("deprecation")
+ private static final Item DIRT_ITEM = Item.getItemFromBlock(Blocks.DIRT);
+
+ public boolean acceptsStack(ItemStack itemstack)
+ {
+ if (this == DIRTCHEST9000)
+ {
+ return itemstack.isEmpty() || itemstack.getItem() == DIRT_ITEM;
+ }
+
+ return true;
+ }
+
+ public static IronChestType get(ResourceLocation resourceLocation)
+ {
+ switch (resourceLocation.toString())
+ {
+ case BlockNames.IRON_CHEST:
+ return IRON;
+ case BlockNames.GOLD_CHEST:
+ return GOLD;
+ case BlockNames.DIAMOND_CHEST:
+ return DIAMOND;
+ case BlockNames.COPPER_CHEST:
+ return COPPER;
+ case BlockNames.SILVER_CHEST:
+ return SILVER;
+ case BlockNames.CRYSTAL_CHEST:
+ return CRYSTAL;
+ case BlockNames.OBSIDIAN_CHEST:
+ return OBSIDIAN;
+ case BlockNames.DIRT_CHEST:
+ return DIRTCHEST9000;
+ default:
+ return WOOD;
+ }
+ }
+
+ public static IBlockState get(IronChestType type)
+ {
+ switch (type)
+ {
+ case IRON:
+ return IronChestBlocks.ironChestBlock.getDefaultState();
+ case GOLD:
+ return IronChestBlocks.goldChestBlock.getDefaultState();
+ case DIAMOND:
+ return IronChestBlocks.diamondChestBlock.getDefaultState();
+ case COPPER:
+ return IronChestBlocks.copperChestBlock.getDefaultState();
+ case SILVER:
+ return IronChestBlocks.silverChestBlock.getDefaultState();
+ case CRYSTAL:
+ return IronChestBlocks.crystalChestBlock.getDefaultState();
+ case OBSIDIAN:
+ return IronChestBlocks.obsidianChestBlock.getDefaultState();
+ case DIRTCHEST9000:
+ return IronChestBlocks.dirtChestBlock.getDefaultState();
+ default:
+ return null;
+ }
+ }
+
+ public TileEntityIronChest makeEntity()
+ {
+ switch (this)
+ {
+ case IRON:
+ return new TileEntityIronChest();
+ case GOLD:
+ return new TileEntityGoldChest();
+ case DIAMOND:
+ return new TileEntityDiamondChest();
+ case COPPER:
+ return new TileEntityCopperChest();
+ case SILVER:
+ return new TileEntitySilverChest();
+ case CRYSTAL:
+ return new TileEntityCrystalChest();
+ case OBSIDIAN:
+ return new TileEntityObsidianChest();
+ case DIRTCHEST9000:
+ return new TileEntityDirtChest();
+ default:
+ return null;
+ }
+ }
+}
diff --git a/src/main/java/cpw/mods/ironchest/common/core/IronChestBlocks.java b/src/main/java/cpw/mods/ironchest/common/core/IronChestBlocks.java
new file mode 100644
index 0000000..8982623
--- /dev/null
+++ b/src/main/java/cpw/mods/ironchest/common/core/IronChestBlocks.java
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * Copyright (c) 2012 cpw.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the GNU Public License v3.0
+ * which accompanies this distribution, and is available at
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common.core;
+
+import cpw.mods.ironchest.common.blocks.BlockChest;
+import cpw.mods.ironchest.common.blocks.BlockCopperChest;
+import cpw.mods.ironchest.common.blocks.BlockCrystalChest;
+import cpw.mods.ironchest.common.blocks.BlockDiamondChest;
+import cpw.mods.ironchest.common.blocks.BlockDirtChest;
+import cpw.mods.ironchest.common.blocks.BlockGoldChest;
+import cpw.mods.ironchest.common.blocks.BlockIronChest;
+import cpw.mods.ironchest.common.blocks.BlockObsidianChest;
+import cpw.mods.ironchest.common.blocks.BlockSilverChest;
+import cpw.mods.ironchest.common.items.ItemChest;
+import net.minecraft.block.Block;
+import net.minecraft.block.material.Material;
+import net.minecraft.item.Item;
+import net.minecraftforge.fml.common.registry.GameRegistry;
+
+public class IronChestBlocks
+{
+ //@formatter:off
+ public static BlockChest ironChestBlock = new BlockIronChest(Block.Builder.create(Material.IRON).hardnessAndResistance(3.0F, 3.0F));
+ public static Item ironChestItemBlock = new ItemChest(ironChestBlock, (new Item.Builder()).group(IronChestCreativeTabs.IRON_CHESTS));
+
+ public static BlockChest goldChestBlock = new BlockGoldChest(Block.Builder.create(Material.IRON).hardnessAndResistance(3.0F, 3.0F));
+ public static Item goldChestItemBlock = new ItemChest(goldChestBlock, (new Item.Builder()).group(IronChestCreativeTabs.IRON_CHESTS));
+
+ public static BlockChest diamondChestBlock = new BlockDiamondChest(Block.Builder.create(Material.IRON).hardnessAndResistance(3.0F, 3.0F));
+ public static Item diamondChestItemBlock = new ItemChest(diamondChestBlock, (new Item.Builder()).group(IronChestCreativeTabs.IRON_CHESTS));
+
+ public static BlockChest copperChestBlock = new BlockCopperChest(Block.Builder.create(Material.IRON).hardnessAndResistance(3.0F, 3.0F));
+ public static Item copperChestItemBlock = new ItemChest(copperChestBlock, (new Item.Builder()).group(IronChestCreativeTabs.IRON_CHESTS));
+
+ public static BlockChest silverChestBlock = new BlockSilverChest(Block.Builder.create(Material.IRON).hardnessAndResistance(3.0F, 3.0F));
+ public static Item silverChestItemBlock = new ItemChest(silverChestBlock, (new Item.Builder()).group(IronChestCreativeTabs.IRON_CHESTS));
+
+ public static BlockChest crystalChestBlock = new BlockCrystalChest(Block.Builder.create(Material.IRON).hardnessAndResistance(3.0F, 3.0F));
+ public static Item crystalChestItemBlock = new ItemChest(crystalChestBlock, (new Item.Builder()).group(IronChestCreativeTabs.IRON_CHESTS));
+
+ public static BlockChest obsidianChestBlock = new BlockObsidianChest(Block.Builder.create(Material.IRON).hardnessAndResistance(3.0F, 3.0F));
+ public static Item obsidianChestItemBlock = new ItemChest(obsidianChestBlock, (new Item.Builder()).group(IronChestCreativeTabs.IRON_CHESTS));
+
+ public static BlockChest dirtChestBlock = new BlockDirtChest(Block.Builder.create(Material.IRON).hardnessAndResistance(3.0F, 3.0F));
+ public static Item dirtChestItemBlock = new ItemChest(dirtChestBlock, (new Item.Builder()).group(IronChestCreativeTabs.IRON_CHESTS));
+ //@formatter:on
+
+ public IronChestBlocks()
+ {
+
+ }
+
+ public void registerBlocks()
+ {
+ // Chest Start
+ GameRegistry.findRegistry(Block.class).registerAll(ironChestBlock, goldChestBlock, diamondChestBlock, copperChestBlock, silverChestBlock, crystalChestBlock, obsidianChestBlock, dirtChestBlock);
+ // Chest End
+ }
+
+ public void registerItems()
+ {
+ // Chest Start
+ GameRegistry.findRegistry(Item.class).registerAll(ironChestItemBlock, goldChestItemBlock, diamondChestItemBlock, copperChestItemBlock, silverChestItemBlock, crystalChestItemBlock, obsidianChestItemBlock, dirtChestItemBlock);
+ // Chest End
+ }
+
+ /*@SubscribeEvent
+ public static void registerBlocks(final Register
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common.core;
+
+import net.minecraft.item.ItemGroup;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.api.distmarker.Dist;
+import net.minecraftforge.api.distmarker.OnlyIn;
+
+public final class IronChestCreativeTabs
+{
+ private IronChestCreativeTabs()
+ {
+ }
+
+ public static final ItemGroup IRON_CHESTS = new ItemGroup("ironchest")
+ {
+ @Override
+ @OnlyIn(Dist.CLIENT)
+ public ItemStack createIcon()
+ {
+ return new ItemStack(IronChestBlocks.ironChestBlock);
+ }
+ };
+}
diff --git a/src/main/java/cpw/mods/ironchest/common/core/IronChestItems.java b/src/main/java/cpw/mods/ironchest/common/core/IronChestItems.java
new file mode 100644
index 0000000..cd30813
--- /dev/null
+++ b/src/main/java/cpw/mods/ironchest/common/core/IronChestItems.java
@@ -0,0 +1,43 @@
+package cpw.mods.ironchest.common.core;
+
+import cpw.mods.ironchest.common.items.ChestChangerType;
+import cpw.mods.ironchest.common.items.ItemChestChanger;
+import net.minecraft.item.Item;
+import net.minecraftforge.event.RegistryEvent.Register;
+import net.minecraftforge.fml.common.registry.GameRegistry;
+import net.minecraftforge.registries.IForgeRegistry;
+
+public class IronChestItems
+{
+ //@formatter:off
+ public static Item.Builder itemBuilder = (new Item.Builder()).group(IronChestCreativeTabs.IRON_CHESTS).maxStackSize(1);
+ public static Item ironToGoldUpgrade = new ItemChestChanger(itemBuilder, ChestChangerType.IRON_GOLD);
+ public static Item goldToDiamondUpgrade = new ItemChestChanger(itemBuilder, ChestChangerType.GOLD_DIAMOND);
+ public static Item copperToSilverUpgrade = new ItemChestChanger(itemBuilder, ChestChangerType.COPPER_SILVER);
+ public static Item silverToGoldUpgrade = new ItemChestChanger(itemBuilder, ChestChangerType.SILVER_GOLD);
+ public static Item copperToIronUpgrade = new ItemChestChanger(itemBuilder, ChestChangerType.COPPER_IRON);
+ public static Item diamondToCrystalUpgrade = new ItemChestChanger(itemBuilder, ChestChangerType.DIAMOND_CRYSTAL);
+ public static Item woodToIronUpgrade = new ItemChestChanger(itemBuilder, ChestChangerType.WOOD_IRON);
+ public static Item woodToCopperUpgrade = new ItemChestChanger(itemBuilder, ChestChangerType.WOOD_COPPER);
+ public static Item diamondToObsidianUpgrade = new ItemChestChanger(itemBuilder, ChestChangerType.DIAMOND_OBSIDIAN);
+ //@formatter:on
+
+ public IronChestItems()
+ {
+
+ }
+
+ public void registerItems()
+ {
+ // Chest Start
+ GameRegistry.findRegistry(Item.class).registerAll(ironToGoldUpgrade, goldToDiamondUpgrade, copperToSilverUpgrade, silverToGoldUpgrade, copperToIronUpgrade, diamondToCrystalUpgrade, woodToIronUpgrade, woodToCopperUpgrade, diamondToObsidianUpgrade);
+ // Chest End
+ }
+
+ public static void registerItems(Register
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common.gui;
+
+import cpw.mods.ironchest.common.blocks.IronChestType;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.inventory.Container;
+import net.minecraft.inventory.IInventory;
+import net.minecraft.inventory.Slot;
+import net.minecraft.item.ItemStack;
+
+public class ContainerIronChest extends Container
+{
+ private IronChestType type;
+
+ private EntityPlayer player;
+
+ private IInventory chest;
+
+ public ContainerIronChest(IInventory playerInventory, IInventory chestInventory, IronChestType type, EntityPlayer player, int xSize, int ySize)
+ {
+ this.chest = chestInventory;
+ this.player = player;
+ this.type = type;
+ chestInventory.openInventory(this.player);
+ this.layoutContainer(playerInventory, chestInventory, type, xSize, ySize);
+ }
+
+ @Override
+ public boolean canInteractWith(EntityPlayer playerIn)
+ {
+ return this.chest.isUsableByPlayer(playerIn);
+ }
+
+ @Override
+ public ItemStack transferStackInSlot(EntityPlayer playerIn, int index)
+ {
+ ItemStack itemstack = ItemStack.EMPTY;
+ Slot slot = this.inventorySlots.get(index);
+
+ if (slot != null && slot.getHasStack())
+ {
+ ItemStack itemstack1 = slot.getStack();
+ itemstack = itemstack1.copy();
+
+ if (index < this.type.size)
+ {
+ if (!this.mergeItemStack(itemstack1, this.type.size, this.inventorySlots.size(), true))
+ {
+ return ItemStack.EMPTY;
+ }
+ }
+ else if (!this.type.acceptsStack(itemstack1))
+ {
+ return ItemStack.EMPTY;
+ }
+ else if (!this.mergeItemStack(itemstack1, 0, this.type.size, false))
+ {
+ return ItemStack.EMPTY;
+ }
+
+ if (itemstack1.isEmpty())
+ {
+ slot.putStack(ItemStack.EMPTY);
+ }
+ else
+ {
+ slot.onSlotChanged();
+ }
+ }
+
+ return itemstack;
+ }
+
+ protected void layoutContainer(IInventory playerInventory, IInventory chestInventory, IronChestType type, int xSize, int ySize)
+ {
+ if (type == IronChestType.DIRTCHEST9000)
+ {
+ this.addSlot(type.makeSlot(chestInventory, 0, 12 + 4 * 18, 8 + 2 * 18));
+ }
+ else
+ {
+ for (int chestRow = 0; chestRow < type.getRowCount(); chestRow++)
+ {
+ for (int chestCol = 0; chestCol < type.rowLength; chestCol++)
+ {
+ this.addSlot(type.makeSlot(chestInventory, chestCol + chestRow * type.rowLength, 12 + chestCol * 18, 8 + chestRow * 18));
+ }
+ }
+ }
+
+ int leftCol = (xSize - 162) / 2 + 1;
+
+ for (int playerInvRow = 0; playerInvRow < 3; playerInvRow++)
+ {
+ for (int playerInvCol = 0; playerInvCol < 9; playerInvCol++)
+ {
+ this.addSlot(new Slot(playerInventory, playerInvCol + playerInvRow * 9 + 9, leftCol + playerInvCol * 18, ySize - (4 - playerInvRow) * 18 - 10));
+ }
+
+ }
+
+ for (int hotbarSlot = 0; hotbarSlot < 9; hotbarSlot++)
+ {
+ this.addSlot(new Slot(playerInventory, hotbarSlot, leftCol + hotbarSlot * 18, ySize - 24));
+ }
+ }
+
+ public EntityPlayer getPlayer()
+ {
+ return this.player;
+ }
+
+ @Override
+ public void onContainerClosed(EntityPlayer playerIn)
+ {
+ super.onContainerClosed(playerIn);
+ this.chest.closeInventory(playerIn);
+ }
+
+ public IInventory getChestInventory()
+ {
+ return this.chest;
+ }
+}
diff --git a/src/main/java/cpw/mods/ironchest/common/gui/slot/ValidatingChestSlot.java b/src/main/java/cpw/mods/ironchest/common/gui/slot/ValidatingChestSlot.java
new file mode 100644
index 0000000..14ccb43
--- /dev/null
+++ b/src/main/java/cpw/mods/ironchest/common/gui/slot/ValidatingChestSlot.java
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * Copyright (c) 2012 cpw.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the GNU Public License v3.0
+ * which accompanies this distribution, and is available at
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common.gui.slot;
+
+import cpw.mods.ironchest.common.blocks.IronChestType;
+import net.minecraft.inventory.IInventory;
+import net.minecraft.inventory.Slot;
+import net.minecraft.item.ItemStack;
+
+public class ValidatingChestSlot extends Slot
+{
+ private IronChestType type;
+
+ public ValidatingChestSlot(IInventory inventoryIn, int slotIndex, int xPosition, int yPosition, IronChestType type)
+ {
+ super(inventoryIn, slotIndex, xPosition, yPosition);
+ this.type = type;
+ }
+
+ @Override
+ public boolean isItemValid(ItemStack stack)
+ {
+ return this.type.acceptsStack(stack);
+ }
+}
diff --git a/src/main/java/cpw/mods/ironchest/common/items/ChestChangerType.java b/src/main/java/cpw/mods/ironchest/common/items/ChestChangerType.java
new file mode 100644
index 0000000..833d34b
--- /dev/null
+++ b/src/main/java/cpw/mods/ironchest/common/items/ChestChangerType.java
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * Copyright (c) 2012 cpw.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the GNU Public License v3.0
+ * which accompanies this distribution, and is available at
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common.items;
+
+import static cpw.mods.ironchest.common.blocks.IronChestType.COPPER;
+import static cpw.mods.ironchest.common.blocks.IronChestType.CRYSTAL;
+import static cpw.mods.ironchest.common.blocks.IronChestType.DIAMOND;
+import static cpw.mods.ironchest.common.blocks.IronChestType.GOLD;
+import static cpw.mods.ironchest.common.blocks.IronChestType.IRON;
+import static cpw.mods.ironchest.common.blocks.IronChestType.OBSIDIAN;
+import static cpw.mods.ironchest.common.blocks.IronChestType.SILVER;
+import static cpw.mods.ironchest.common.blocks.IronChestType.WOOD;
+
+import cpw.mods.ironchest.common.blocks.IronChestType;
+import cpw.mods.ironchest.common.core.IronChestCreativeTabs;
+import net.minecraft.item.Item;
+import net.minecraftforge.registries.IForgeRegistry;
+
+public enum ChestChangerType
+{
+ //@formatter:off
+ IRON_GOLD(IRON, GOLD, "iron_gold_chest_upgrade"),
+ GOLD_DIAMOND(GOLD, DIAMOND, "gold_diamond_chest_upgrade"),
+ COPPER_SILVER(COPPER, SILVER, "copper_silver_chest_upgrade"),
+ SILVER_GOLD(SILVER, GOLD, "silver_gold_chest_upgrade"),
+ COPPER_IRON(COPPER, IRON, "copper_iron_chest_upgrade"),
+ DIAMOND_CRYSTAL(DIAMOND, CRYSTAL, "diamond_crystal_chest_upgrade"),
+ WOOD_IRON(WOOD, IRON, "wood_iron_chest_upgrade"),
+ WOOD_COPPER(WOOD, COPPER, "wood_copper_chest_upgrade"),
+ DIAMOND_OBSIDIAN(DIAMOND, OBSIDIAN, "diamond_obsidian_chest_upgrade");
+ //@formatter:on
+
+ public static final ChestChangerType[] VALUES = values();
+
+ public final IronChestType source;
+
+ public final IronChestType target;
+
+ public final String itemName;
+
+ public ItemChestChanger item;
+
+ ChestChangerType(IronChestType source, IronChestType target, String itemName)
+ {
+ this.source = source;
+ this.target = target;
+ this.itemName = itemName;
+ }
+
+ public boolean canUpgrade(IronChestType from)
+ {
+ return from == this.source;
+ }
+
+ public ItemChestChanger buildItem(IForgeRegistry
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common.items;
+
+import net.minecraft.block.Block;
+import net.minecraft.item.ItemBlock;
+
+public class ItemChest extends ItemBlock
+{
+ public ItemChest(Block block, Builder builder)
+ {
+ super(block, builder);
+
+ this.setRegistryName(block.getRegistryName());
+ }
+}
diff --git a/src/main/java/cpw/mods/ironchest/common/items/ItemChestChanger.java b/src/main/java/cpw/mods/ironchest/common/items/ItemChestChanger.java
new file mode 100644
index 0000000..16200a9
--- /dev/null
+++ b/src/main/java/cpw/mods/ironchest/common/items/ItemChestChanger.java
@@ -0,0 +1,162 @@
+/*******************************************************************************
+ * Copyright (c) 2012 cpw.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the GNU Public License v3.0
+ * which accompanies this distribution, and is available at
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common.items;
+
+import cpw.mods.ironchest.common.blocks.BlockChest;
+import cpw.mods.ironchest.common.blocks.BlockIronChest;
+import cpw.mods.ironchest.common.blocks.IronChestType;
+import cpw.mods.ironchest.common.tileentity.TileEntityIronChest;
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.item.ItemUseContext;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.tileentity.TileEntityChest;
+import net.minecraft.util.EnumActionResult;
+import net.minecraft.util.EnumFacing;
+import net.minecraft.util.NonNullList;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.util.text.ITextComponent;
+import net.minecraft.world.World;
+
+public class ItemChestChanger extends ItemTooltip
+{
+ public final ChestChangerType type;
+
+ public ItemChestChanger(Builder properties, ChestChangerType chestChangerType)
+ {
+ super(properties);
+ this.type = chestChangerType;
+ this.setRegistryName(chestChangerType.itemName);
+ }
+
+ @Override
+ public EnumActionResult onItemUseFirst(ItemStack stack, ItemUseContext context)
+ {
+ EntityPlayer entityplayer = context.getPlayer();
+ BlockPos blockpos = context.getPos();
+ World world = context.getWorld();
+ ItemStack itemstack = context.getItem();
+
+ if (world.isRemote)
+ {
+ return EnumActionResult.PASS;
+ }
+
+ if (this.type.canUpgrade(IronChestType.WOOD))
+ {
+ if (!(world.getBlockState(blockpos).getBlock() instanceof net.minecraft.block.BlockChest))
+ {
+ return EnumActionResult.PASS;
+ }
+ }
+ else
+ {
+ //@formatter:off
+ if (world.getBlockState(blockpos).getBlock().getDefaultState() != IronChestType.get(this.type.source))
+ //@formatter:on
+ {
+ return EnumActionResult.PASS;
+ }
+ }
+
+ TileEntity te = world.getTileEntity(blockpos);
+ TileEntityIronChest newchest = new TileEntityIronChest();
+
+ ITextComponent customname = null;
+
+ NonNullList
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common.items;
+
+import java.util.List;
+
+import javax.annotation.Nullable;
+
+import com.google.common.collect.Lists;
+
+import net.minecraft.client.resources.I18n;
+import net.minecraft.client.util.ITooltipFlag;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.text.ITextComponent;
+import net.minecraft.util.text.TextComponentString;
+import net.minecraft.util.text.TextFormatting;
+import net.minecraft.world.World;
+import net.minecraftforge.api.distmarker.Dist;
+import net.minecraftforge.api.distmarker.OnlyIn;
+
+public class ItemTooltip extends Item
+{
+ public ItemTooltip(Builder properties)
+ {
+ super(properties);
+ }
+
+ @Override
+ @OnlyIn(Dist.CLIENT)
+ public void addInformation(ItemStack stack, @Nullable World worldIn, List
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common.tileentity;
+
+import com.mojang.datafixers.DataFixUtils;
+import com.mojang.datafixers.types.Type;
+
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.tileentity.TileEntityType;
+import net.minecraft.util.ResourceLocation;
+import net.minecraft.util.SharedConstants;
+import net.minecraft.util.datafix.DataFixesManager;
+import net.minecraft.util.datafix.TypeReferences;
+import net.minecraftforge.fml.common.registry.GameRegistry;
+import net.minecraftforge.registries.IForgeRegistry;
+import net.minecraftforge.registries.IForgeRegistryEntry;
+
+public class IronChestEntityType
+{
+ public static TileEntityType> IRON_CHEST;
+
+ public static TileEntityType> GOLD_CHEST;
+
+ public static TileEntityType> DIAMOND_CHEST;
+
+ public static TileEntityType> CRYSTAL_CHEST;
+
+ public static TileEntityType> DIRT_CHEST;
+
+ public static TileEntityType> COPPER_CHEST;
+
+ public static TileEntityType> SILVER_CHEST;
+
+ public static TileEntityType> OBSIDIAN_CHEST;
+
+ public IronChestEntityType()
+ {
+
+ }
+
+ @SuppressWarnings("unchecked")
+ public void registerTileEntities()
+ {
+ IForgeRegistry e = GameRegistry.findRegistry(TileEntityType.class);
+ registerTileEntityType(e, register("iron_chest", TileEntityType.Builder.create(TileEntityIronChest::new)), "iron_chest");
+ registerTileEntityType(e, register("gold_chest", TileEntityType.Builder.create(TileEntityGoldChest::new)), "gold_chest");
+ registerTileEntityType(e, register("diamond_chest", TileEntityType.Builder.create(TileEntityDiamondChest::new)), "diamond_chest");
+ registerTileEntityType(e, register("crystal_chest", TileEntityType.Builder.create(TileEntityCrystalChest::new)), "crystal_chest");
+ registerTileEntityType(e, register("dirt_chest", TileEntityType.Builder.create(TileEntityDirtChest::new)), "dirt_chest");
+ registerTileEntityType(e, register("copper_chest", TileEntityType.Builder.create(TileEntityCopperChest::new)), "copper_chest");
+ registerTileEntityType(e, register("silver_chest", TileEntityType.Builder.create(TileEntitySilverChest::new)), "silver_chest");
+ registerTileEntityType(e, register("obsidian_chest", TileEntityType.Builder.create(TileEntityObsidianChest::new)), "obsidian_chest");
+ }
+
+ @SuppressWarnings("unchecked")
+ public void createEntries()
+ {
+ IForgeRegistry> e = GameRegistry.findRegistry(TileEntityType.class);
+
+ IronChestEntityType.IRON_CHEST = (TileEntityType>) e.getValue(new ResourceLocation("ironchest", "iron_chest"));
+ IronChestEntityType.GOLD_CHEST = (TileEntityType>) e.getValue(new ResourceLocation("ironchest", "gold_chest"));
+ IronChestEntityType.DIAMOND_CHEST = (TileEntityType>) e.getValue(new ResourceLocation("ironchest", "diamond_chest"));
+ IronChestEntityType.CRYSTAL_CHEST = (TileEntityType>) e.getValue(new ResourceLocation("ironchest", "crystal_chest"));
+ IronChestEntityType.DIRT_CHEST = (TileEntityType>) e.getValue(new ResourceLocation("ironchest", "dirt_chest"));
+ IronChestEntityType.COPPER_CHEST = (TileEntityType>) e.getValue(new ResourceLocation("ironchest", "copper_chest"));
+ IronChestEntityType.SILVER_CHEST = (TileEntityType>) e.getValue(new ResourceLocation("ironchest", "silver_chest"));
+ IronChestEntityType.OBSIDIAN_CHEST = (TileEntityType>) e.getValue(new ResourceLocation("ironchest", "obsidian_chest"));
+ }
+
+ /*@SubscribeEvent
+ public static void onTileEntityRegistry(final Register
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common.tileentity;
+
+import cpw.mods.ironchest.common.blocks.IronChestType;
+
+public class TileEntityCopperChest extends TileEntityIronChest
+{
+ public TileEntityCopperChest()
+ {
+ super(IronChestEntityType.COPPER_CHEST, IronChestType.COPPER);
+ }
+}
diff --git a/src/main/java/cpw/mods/ironchest/common/tileentity/TileEntityCrystalChest.java b/src/main/java/cpw/mods/ironchest/common/tileentity/TileEntityCrystalChest.java
new file mode 100644
index 0000000..7ed866a
--- /dev/null
+++ b/src/main/java/cpw/mods/ironchest/common/tileentity/TileEntityCrystalChest.java
@@ -0,0 +1,231 @@
+/*******************************************************************************
+ * Copyright (c) 2012 cpw.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the GNU Public License v3.0
+ * which accompanies this distribution, and is available at
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common.tileentity;
+
+import java.util.Collections;
+import java.util.Comparator;
+
+import cpw.mods.ironchest.common.blocks.IronChestType;
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.NonNullList;
+
+public class TileEntityCrystalChest extends TileEntityIronChest
+{
+ /** Crystal Chest top stacks */
+ private NonNullList
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common.tileentity;
+
+import cpw.mods.ironchest.common.blocks.IronChestType;
+
+public class TileEntityDiamondChest extends TileEntityIronChest
+{
+ public TileEntityDiamondChest()
+ {
+ super(IronChestEntityType.DIAMOND_CHEST, IronChestType.DIAMOND);
+ }
+}
diff --git a/src/main/java/cpw/mods/ironchest/common/tileentity/TileEntityDirtChest.java b/src/main/java/cpw/mods/ironchest/common/tileentity/TileEntityDirtChest.java
new file mode 100644
index 0000000..858a8d0
--- /dev/null
+++ b/src/main/java/cpw/mods/ironchest/common/tileentity/TileEntityDirtChest.java
@@ -0,0 +1,62 @@
+/*******************************************************************************
+ * Copyright (c) 2012 cpw.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the GNU Public License v3.0
+ * which accompanies this distribution, and is available at
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common.tileentity;
+
+import cpw.mods.ironchest.common.blocks.IronChestType;
+import net.minecraft.client.resources.I18n;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagList;
+import net.minecraft.nbt.NBTTagString;
+import net.minecraft.util.text.ITextComponent;
+import net.minecraft.util.text.TextComponentString;
+
+public class TileEntityDirtChest extends TileEntityIronChest
+{
+ private static ItemStack dirtChest9000GuideBook = new ItemStack(Items.WRITTEN_BOOK);
+
+ static
+ {
+ dirtChest9000GuideBook.setTagInfo("author", new NBTTagString("cpw"));
+ dirtChest9000GuideBook.setTagInfo("title", new NBTTagString(I18n.format("book.ironchest.dirtchest9000.title")));
+ NBTTagList pages = new NBTTagList();
+ pages.add(new NBTTagString(ITextComponent.Serializer.toJson(new TextComponentString(I18n.format("book.ironchest.dirtchest9000.page1")))));
+ pages.add(new NBTTagString(ITextComponent.Serializer.toJson(new TextComponentString(I18n.format("book.ironchest.dirtchest9000.page2")))));
+ pages.add(new NBTTagString(ITextComponent.Serializer.toJson(new TextComponentString(I18n.format("book.ironchest.dirtchest9000.page3")))));
+ pages.add(new NBTTagString(ITextComponent.Serializer.toJson(new TextComponentString(I18n.format("book.ironchest.dirtchest9000.page4")))));
+ pages.add(new NBTTagString(ITextComponent.Serializer.toJson(new TextComponentString(I18n.format("book.ironchest.dirtchest9000.page5")))));
+ dirtChest9000GuideBook.setTagInfo("pages", pages);
+ }
+
+ public TileEntityDirtChest()
+ {
+ super(IronChestEntityType.DIRT_CHEST, IronChestType.DIRTCHEST9000);
+ }
+
+ @Override
+ public void wasPlaced(EntityLivingBase entityliving, ItemStack itemStack)
+ {
+ if (!(itemStack.hasTag() && itemStack.getTag().getBoolean("dirtchest")))
+ {
+ this.setInventorySlotContents(0, dirtChest9000GuideBook.copy());
+ }
+ }
+
+ @Override
+ public void removeAdornments()
+ {
+ if (!this.getItems().get(0).isEmpty() && this.getItems().get(0).isItemEqual(dirtChest9000GuideBook))
+ {
+ this.getItems().set(0, ItemStack.EMPTY);
+ }
+ }
+}
diff --git a/src/main/java/cpw/mods/ironchest/common/tileentity/TileEntityGoldChest.java b/src/main/java/cpw/mods/ironchest/common/tileentity/TileEntityGoldChest.java
new file mode 100644
index 0000000..d20aff4
--- /dev/null
+++ b/src/main/java/cpw/mods/ironchest/common/tileentity/TileEntityGoldChest.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2012 cpw.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the GNU Public License v3.0
+ * which accompanies this distribution, and is available at
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common.tileentity;
+
+import cpw.mods.ironchest.common.blocks.IronChestType;
+
+public class TileEntityGoldChest extends TileEntityIronChest
+{
+ public TileEntityGoldChest()
+ {
+ super(IronChestEntityType.GOLD_CHEST, IronChestType.GOLD);
+ }
+}
diff --git a/src/main/java/cpw/mods/ironchest/common/tileentity/TileEntityIronChest.java b/src/main/java/cpw/mods/ironchest/common/tileentity/TileEntityIronChest.java
new file mode 100644
index 0000000..eb5a80b
--- /dev/null
+++ b/src/main/java/cpw/mods/ironchest/common/tileentity/TileEntityIronChest.java
@@ -0,0 +1,368 @@
+/*******************************************************************************
+ * Copyright (c) 2012 cpw.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the GNU Public License v3.0
+ * which accompanies this distribution, and is available at
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common.tileentity;
+
+import cpw.mods.ironchest.common.blocks.BlockChest;
+import cpw.mods.ironchest.common.blocks.BlockIronChest;
+import cpw.mods.ironchest.common.blocks.IronChestType;
+import cpw.mods.ironchest.common.gui.ContainerIronChest;
+import net.minecraft.block.Block;
+import net.minecraft.block.state.IBlockState;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.init.SoundEvents;
+import net.minecraft.inventory.Container;
+import net.minecraft.inventory.ItemStackHelper;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.IChestLid;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.tileentity.TileEntityLockableLoot;
+import net.minecraft.tileentity.TileEntityType;
+import net.minecraft.util.ITickable;
+import net.minecraft.util.NonNullList;
+import net.minecraft.util.SoundCategory;
+import net.minecraft.util.SoundEvent;
+import net.minecraft.util.math.AxisAlignedBB;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.util.text.ITextComponent;
+import net.minecraft.util.text.TextComponentTranslation;
+import net.minecraft.world.IBlockReader;
+import net.minecraftforge.api.distmarker.Dist;
+import net.minecraftforge.api.distmarker.OnlyIn;
+
+public class TileEntityIronChest extends TileEntityLockableLoot implements IChestLid, ITickable
+{
+ private NonNullList
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common.tileentity;
+
+import cpw.mods.ironchest.common.blocks.IronChestType;
+
+public class TileEntityObsidianChest extends TileEntityIronChest
+{
+ public TileEntityObsidianChest()
+ {
+ super(IronChestEntityType.OBSIDIAN_CHEST, IronChestType.OBSIDIAN);
+ }
+}
diff --git a/src/main/java/cpw/mods/ironchest/common/tileentity/TileEntitySilverChest.java b/src/main/java/cpw/mods/ironchest/common/tileentity/TileEntitySilverChest.java
new file mode 100644
index 0000000..74bfa9c
--- /dev/null
+++ b/src/main/java/cpw/mods/ironchest/common/tileentity/TileEntitySilverChest.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2012 cpw.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the GNU Public License v3.0
+ * which accompanies this distribution, and is available at
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common.tileentity;
+
+import cpw.mods.ironchest.common.blocks.IronChestType;
+
+public class TileEntitySilverChest extends TileEntityIronChest
+{
+ public TileEntitySilverChest()
+ {
+ super(IronChestEntityType.SILVER_CHEST, IronChestType.SILVER);
+ }
+}
diff --git a/src/main/java/cpw/mods/ironchest/common/util/BlockNames.java b/src/main/java/cpw/mods/ironchest/common/util/BlockNames.java
new file mode 100644
index 0000000..4b51f55
--- /dev/null
+++ b/src/main/java/cpw/mods/ironchest/common/util/BlockNames.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2012 cpw.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the GNU Public License v3.0
+ * which accompanies this distribution, and is available at
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * Contributors:
+ * cpw - initial API and implementation
+ ******************************************************************************/
+package cpw.mods.ironchest.common.util;
+
+import cpw.mods.ironchest.IronChest;
+
+public class BlockNames
+{
+ public static final String IRON_CHEST = IronChest.MOD_ID + ":iron_chest";
+
+ public static final String GOLD_CHEST = IronChest.MOD_ID + ":gold_chest";
+
+ public static final String DIAMOND_CHEST = IronChest.MOD_ID + ":diamond_chest";
+
+ public static final String COPPER_CHEST = IronChest.MOD_ID + ":copper_chest";
+
+ public static final String SILVER_CHEST = IronChest.MOD_ID + ":silver_chest";
+
+ public static final String CRYSTAL_CHEST = IronChest.MOD_ID + ":crystal_chest";
+
+ public static final String OBSIDIAN_CHEST = IronChest.MOD_ID + ":obsidian_chest";
+
+ public static final String DIRT_CHEST = IronChest.MOD_ID + ":dirt_chest";
+}
diff --git a/src/main/java/mcp/MethodsReturnNonnullByDefault.java b/src/main/java/mcp/MethodsReturnNonnullByDefault.java
new file mode 100644
index 0000000..485bb9d
--- /dev/null
+++ b/src/main/java/mcp/MethodsReturnNonnullByDefault.java
@@ -0,0 +1,26 @@
+package mcp;
+import javax.annotation.Nonnull;
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+import javax.annotation.meta.TypeQualifierDefault;
+
+/**
+ * This annotation can be applied to a package, class or method to indicate that
+ * the method in that element are nonnull by default unless there is:
+ *
+ *
+ *
+ */
+@Documented
+@Nonnull
+@TypeQualifierDefault(ElementType.METHOD) // Note: This is a copy of javax.annotation.ParametersAreNonnullByDefault with target changed to METHOD
+@Retention(RetentionPolicy.RUNTIME)
+public @interface MethodsReturnNonnullByDefault {}
\ No newline at end of file
diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml
new file mode 100644
index 0000000..c8cc7dc
--- /dev/null
+++ b/src/main/resources/META-INF/mods.toml
@@ -0,0 +1,21 @@
+modLoader="javafml"
+loaderVersion="[24,)"
+issueTrackerURL="https://github.com/progwml6/ironchest/issues"
+displayURL="https://minecraft.curseforge.com/projects/iron-chests"
+authors="CPW, alexbegt, progwml6"
+
+[[mods]]
+ modId="ironchest"
+ version="${version}"
+ displayName="Iron Chests"
+ description='''
+ New chests with larger sizes, with in-place upgrade items.
+ The feature chest is the crystal chest, which is transparent - some inventory contents are visible without opening the chest
+ '''
+
+[[dependencies.ironchest]]
+ modId="forge"
+ mandatory=true
+ versionRange="[24,)"
+ ordering="NONE"
+ side="BOTH"
\ No newline at end of file
diff --git a/src/main/resources/assets/ironchest/blockstates/copper_chest.json b/src/main/resources/assets/ironchest/blockstates/copper_chest.json
new file mode 100644
index 0000000..f765c30
--- /dev/null
+++ b/src/main/resources/assets/ironchest/blockstates/copper_chest.json
@@ -0,0 +1,5 @@
+{
+ "variants": {
+ "": { "model": "ironchest:block/copper_chest" }
+ }
+}
diff --git a/src/main/resources/assets/ironchest/blockstates/crystal_chest.json b/src/main/resources/assets/ironchest/blockstates/crystal_chest.json
new file mode 100644
index 0000000..9358350
--- /dev/null
+++ b/src/main/resources/assets/ironchest/blockstates/crystal_chest.json
@@ -0,0 +1,5 @@
+{
+ "variants": {
+ "": { "model": "ironchest:block/crystal_chest" }
+ }
+}
diff --git a/src/main/resources/assets/ironchest/blockstates/diamond_chest.json b/src/main/resources/assets/ironchest/blockstates/diamond_chest.json
new file mode 100644
index 0000000..eb4f51b
--- /dev/null
+++ b/src/main/resources/assets/ironchest/blockstates/diamond_chest.json
@@ -0,0 +1,5 @@
+{
+ "variants": {
+ "": { "model": "ironchest:block/diamond_chest" }
+ }
+}
diff --git a/src/main/resources/assets/ironchest/blockstates/dirt_chest.json b/src/main/resources/assets/ironchest/blockstates/dirt_chest.json
new file mode 100644
index 0000000..1d03205
--- /dev/null
+++ b/src/main/resources/assets/ironchest/blockstates/dirt_chest.json
@@ -0,0 +1,5 @@
+{
+ "variants": {
+ "": { "model": "ironchest:block/dirt_chest" }
+ }
+}
diff --git a/src/main/resources/assets/ironchest/blockstates/gold_chest.json b/src/main/resources/assets/ironchest/blockstates/gold_chest.json
new file mode 100644
index 0000000..1f782cb
--- /dev/null
+++ b/src/main/resources/assets/ironchest/blockstates/gold_chest.json
@@ -0,0 +1,5 @@
+{
+ "variants": {
+ "": { "model": "ironchest:block/gold_chest" }
+ }
+}
diff --git a/src/main/resources/assets/ironchest/blockstates/iron_chest.json b/src/main/resources/assets/ironchest/blockstates/iron_chest.json
new file mode 100644
index 0000000..56834a3
--- /dev/null
+++ b/src/main/resources/assets/ironchest/blockstates/iron_chest.json
@@ -0,0 +1,5 @@
+{
+ "variants": {
+ "": { "model": "ironchest:block/iron_chest" }
+ }
+}
diff --git a/src/main/resources/assets/ironchest/blockstates/obsidian_chest.json b/src/main/resources/assets/ironchest/blockstates/obsidian_chest.json
new file mode 100644
index 0000000..6a84603
--- /dev/null
+++ b/src/main/resources/assets/ironchest/blockstates/obsidian_chest.json
@@ -0,0 +1,5 @@
+{
+ "variants": {
+ "": { "model": "ironchest:block/obsidian_chest" }
+ }
+}
diff --git a/src/main/resources/assets/ironchest/blockstates/silver_chest.json b/src/main/resources/assets/ironchest/blockstates/silver_chest.json
new file mode 100644
index 0000000..531aaf1
--- /dev/null
+++ b/src/main/resources/assets/ironchest/blockstates/silver_chest.json
@@ -0,0 +1,5 @@
+{
+ "variants": {
+ "": { "model": "ironchest:block/silver_chest" }
+ }
+}
diff --git a/src/main/resources/assets/ironchest/lang/en_us.json b/src/main/resources/assets/ironchest/lang/en_us.json
new file mode 100644
index 0000000..bd6c9f2
--- /dev/null
+++ b/src/main/resources/assets/ironchest/lang/en_us.json
@@ -0,0 +1,33 @@
+{
+ "_comment": "Blocks",
+ "block.ironchest.iron_chest": "Iron Chest",
+ "block.ironchest.gold_chest": "Gold Chest",
+ "block.ironchest.diamond_chest": "Diamond Chest",
+ "block.ironchest.copper_chest": "Copper Chest",
+ "block.ironchest.silver_chest": "Silver Chest",
+ "block.ironchest.crystal_chest": "Crystal Chest",
+ "block.ironchest.obsidian_chest": "Obsidian Chest",
+ "block.ironchest.dirt_chest": "DirtChest 9000!",
+
+ "_comment": "Upgrades",
+ "item.ironchest.iron_gold_chest_upgrade": "Iron to Gold Chest Upgrade",
+ "item.ironchest.gold_diamond_chest_upgrade": "Gold to Diamond Chest Upgrade",
+ "item.ironchest.copper_silver_chest_upgrade": "Copper to Silver Chest Upgrade",
+ "item.ironchest.silver_gold_chest_upgrade": "Silver to Gold Chest Upgrade",
+ "item.ironchest.copper_iron_chest_upgrade": "Copper to Iron Chest Upgrade",
+ "item.ironchest.diamond_crystal_chest_upgrade": "Diamond to Crystal Chest Upgrade",
+ "item.ironchest.wood_iron_chest_upgrade": "Wood to Iron Chest Upgrade",
+ "item.ironchest.wood_copper_chest_upgrade": "Wood to Copper Chest Upgrade",
+ "item.ironchest.diamond_obsidian_chest_upgrade": "Diamond to Obsidian Chest Upgrade",
+
+ "_comment": "Books",
+ "book.ironchest.dirtchest9000.title": "How to use your DirtChest 9000!",
+ "book.ironchest.dirtchest9000.page1": "Welcome to your new DirtChest 9000! We hope you will enjoy many happy years of storing your stack of dirt in our storage utility.",
+ "book.ironchest.dirtchest9000.page2": "Usage: simply insert the stack of dirt of your choice into the highly receptive slot and enjoy the great convenience of having that dirt available to you, any time you pass by this chest!",
+ "book.ironchest.dirtchest9000.page3": "We hope you have enjoyed reviewing this instruction manual, and hope you will consider using our products in future! Kind regards, The DirtChest 9000 manual writers incorporated.",
+ "book.ironchest.dirtchest9000.page4": "Warranty: This product has no warranty of any kind. Your dirt may not be stored, it may slowly leech into the environment, or alternatively, it may not do anything at all.",
+ "book.ironchest.dirtchest9000.page5": "DirtChest 9000 is kind to the environment. Please dispose of this guide book responsibly, and do not whatever you do just chuck it into some lava. We would be very sad.",
+
+ "_comment": "Item Groups",
+ "itemGroup.ironchest": "Iron Chests"
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/ironchest/models/block/copper_chest.json b/src/main/resources/assets/ironchest/models/block/copper_chest.json
new file mode 100644
index 0000000..e74d288
--- /dev/null
+++ b/src/main/resources/assets/ironchest/models/block/copper_chest.json
@@ -0,0 +1,42 @@
+{
+ "parent": "block/block",
+ "textures": {
+ "texture": "ironchest:model/copper_chest",
+ "particle": "ironchest:block/copper_break"
+ },
+ "elements": [
+ { "from": [ 1, 0, 1 ],
+ "to": [ 15, 10, 15 ],
+ "faces": {
+ "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" },
+ "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" },
+ "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" },
+ "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" },
+ "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" },
+ "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" }
+ }
+ },
+ { "from": [ 1, 9, 1 ],
+ "to": [ 15, 14, 15 ],
+ "faces": {
+ "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" },
+ "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" },
+ "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" },
+ "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" },
+ "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" },
+ "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" }
+ }
+ },
+ { "from": [ 7, 7, 0 ],
+ "to": [ 9, 11, 1 ],
+ "faces": {
+ "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" },
+ "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" },
+ "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" },
+ "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" },
+ "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" },
+ "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" }
+ }
+ }
+ ]
+}
diff --git a/src/main/resources/assets/ironchest/models/block/crystal_chest.json b/src/main/resources/assets/ironchest/models/block/crystal_chest.json
new file mode 100644
index 0000000..edb2ce1
--- /dev/null
+++ b/src/main/resources/assets/ironchest/models/block/crystal_chest.json
@@ -0,0 +1,42 @@
+{
+ "parent": "block/block",
+ "textures": {
+ "texture": "ironchest:model/crystal_chest",
+ "particle": "ironchest:block/crystal_break"
+ },
+ "elements": [
+ { "from": [ 1, 0, 1 ],
+ "to": [ 15, 10, 15 ],
+ "faces": {
+ "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" },
+ "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" },
+ "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" },
+ "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" },
+ "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" },
+ "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" }
+ }
+ },
+ { "from": [ 1, 9, 1 ],
+ "to": [ 15, 14, 15 ],
+ "faces": {
+ "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" },
+ "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" },
+ "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" },
+ "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" },
+ "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" },
+ "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" }
+ }
+ },
+ { "from": [ 7, 7, 0 ],
+ "to": [ 9, 11, 1 ],
+ "faces": {
+ "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" },
+ "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" },
+ "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" },
+ "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" },
+ "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" },
+ "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" }
+ }
+ }
+ ]
+}
diff --git a/src/main/resources/assets/ironchest/models/block/diamond_chest.json b/src/main/resources/assets/ironchest/models/block/diamond_chest.json
new file mode 100644
index 0000000..c257ff5
--- /dev/null
+++ b/src/main/resources/assets/ironchest/models/block/diamond_chest.json
@@ -0,0 +1,42 @@
+{
+ "parent": "block/block",
+ "textures": {
+ "texture": "ironchest:model/diamond_chest",
+ "particle": "ironchest:block/diamond_break"
+ },
+ "elements": [
+ { "from": [ 1, 0, 1 ],
+ "to": [ 15, 10, 15 ],
+ "faces": {
+ "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" },
+ "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" },
+ "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" },
+ "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" },
+ "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" },
+ "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" }
+ }
+ },
+ { "from": [ 1, 9, 1 ],
+ "to": [ 15, 14, 15 ],
+ "faces": {
+ "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" },
+ "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" },
+ "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" },
+ "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" },
+ "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" },
+ "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" }
+ }
+ },
+ { "from": [ 7, 7, 0 ],
+ "to": [ 9, 11, 1 ],
+ "faces": {
+ "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" },
+ "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" },
+ "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" },
+ "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" },
+ "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" },
+ "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" }
+ }
+ }
+ ]
+}
diff --git a/src/main/resources/assets/ironchest/models/block/dirt_chest.json b/src/main/resources/assets/ironchest/models/block/dirt_chest.json
new file mode 100644
index 0000000..0f87c3d
--- /dev/null
+++ b/src/main/resources/assets/ironchest/models/block/dirt_chest.json
@@ -0,0 +1,42 @@
+{
+ "parent": "block/block",
+ "textures": {
+ "texture": "ironchest:model/dirt_chest",
+ "particle": "minecraft:block/dirt"
+ },
+ "elements": [
+ { "from": [ 1, 0, 1 ],
+ "to": [ 15, 10, 15 ],
+ "faces": {
+ "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" },
+ "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" },
+ "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" },
+ "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" },
+ "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" },
+ "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" }
+ }
+ },
+ { "from": [ 1, 9, 1 ],
+ "to": [ 15, 14, 15 ],
+ "faces": {
+ "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" },
+ "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" },
+ "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" },
+ "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" },
+ "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" },
+ "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" }
+ }
+ },
+ { "from": [ 7, 7, 0 ],
+ "to": [ 9, 11, 1 ],
+ "faces": {
+ "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" },
+ "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" },
+ "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" },
+ "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" },
+ "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" },
+ "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" }
+ }
+ }
+ ]
+}
diff --git a/src/main/resources/assets/ironchest/models/block/gold_chest.json b/src/main/resources/assets/ironchest/models/block/gold_chest.json
new file mode 100644
index 0000000..0b1e05f
--- /dev/null
+++ b/src/main/resources/assets/ironchest/models/block/gold_chest.json
@@ -0,0 +1,42 @@
+{
+ "parent": "block/block",
+ "textures": {
+ "texture": "ironchest:model/gold_chest",
+ "particle": "ironchest:block/gold_break"
+ },
+ "elements": [
+ { "from": [ 1, 0, 1 ],
+ "to": [ 15, 10, 15 ],
+ "faces": {
+ "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" },
+ "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" },
+ "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" },
+ "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" },
+ "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" },
+ "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" }
+ }
+ },
+ { "from": [ 1, 9, 1 ],
+ "to": [ 15, 14, 15 ],
+ "faces": {
+ "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" },
+ "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" },
+ "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" },
+ "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" },
+ "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" },
+ "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" }
+ }
+ },
+ { "from": [ 7, 7, 0 ],
+ "to": [ 9, 11, 1 ],
+ "faces": {
+ "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" },
+ "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" },
+ "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" },
+ "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" },
+ "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" },
+ "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" }
+ }
+ }
+ ]
+}
diff --git a/src/main/resources/assets/ironchest/models/block/iron_chest.json b/src/main/resources/assets/ironchest/models/block/iron_chest.json
new file mode 100644
index 0000000..fc7ee55
--- /dev/null
+++ b/src/main/resources/assets/ironchest/models/block/iron_chest.json
@@ -0,0 +1,42 @@
+{
+ "parent": "block/block",
+ "textures": {
+ "texture": "ironchest:model/iron_chest",
+ "particle": "ironchest:block/iron_break"
+ },
+ "elements": [
+ { "from": [ 1, 0, 1 ],
+ "to": [ 15, 10, 15 ],
+ "faces": {
+ "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" },
+ "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" },
+ "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" },
+ "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" },
+ "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" },
+ "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" }
+ }
+ },
+ { "from": [ 1, 9, 1 ],
+ "to": [ 15, 14, 15 ],
+ "faces": {
+ "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" },
+ "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" },
+ "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" },
+ "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" },
+ "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" },
+ "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" }
+ }
+ },
+ { "from": [ 7, 7, 0 ],
+ "to": [ 9, 11, 1 ],
+ "faces": {
+ "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" },
+ "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" },
+ "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" },
+ "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" },
+ "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" },
+ "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" }
+ }
+ }
+ ]
+}
diff --git a/src/main/resources/assets/ironchest/models/block/obsidian_chest.json b/src/main/resources/assets/ironchest/models/block/obsidian_chest.json
new file mode 100644
index 0000000..4f53d0d
--- /dev/null
+++ b/src/main/resources/assets/ironchest/models/block/obsidian_chest.json
@@ -0,0 +1,42 @@
+{
+ "parent": "block/block",
+ "textures": {
+ "texture": "ironchest:model/obsidian_chest",
+ "particle": "minecraft:block/obsidian"
+ },
+ "elements": [
+ { "from": [ 1, 0, 1 ],
+ "to": [ 15, 10, 15 ],
+ "faces": {
+ "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" },
+ "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" },
+ "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" },
+ "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" },
+ "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" },
+ "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" }
+ }
+ },
+ { "from": [ 1, 9, 1 ],
+ "to": [ 15, 14, 15 ],
+ "faces": {
+ "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" },
+ "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" },
+ "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" },
+ "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" },
+ "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" },
+ "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" }
+ }
+ },
+ { "from": [ 7, 7, 0 ],
+ "to": [ 9, 11, 1 ],
+ "faces": {
+ "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" },
+ "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" },
+ "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" },
+ "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" },
+ "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" },
+ "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" }
+ }
+ }
+ ]
+}
diff --git a/src/main/resources/assets/ironchest/models/block/silver_chest.json b/src/main/resources/assets/ironchest/models/block/silver_chest.json
new file mode 100644
index 0000000..78f9fd8
--- /dev/null
+++ b/src/main/resources/assets/ironchest/models/block/silver_chest.json
@@ -0,0 +1,42 @@
+{
+ "parent": "block/block",
+ "textures": {
+ "texture": "ironchest:model/silver_chest",
+ "particle": "ironchest:block/silver_break"
+ },
+ "elements": [
+ { "from": [ 1, 0, 1 ],
+ "to": [ 15, 10, 15 ],
+ "faces": {
+ "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" },
+ "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" },
+ "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" },
+ "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" },
+ "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" },
+ "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" }
+ }
+ },
+ { "from": [ 1, 9, 1 ],
+ "to": [ 15, 14, 15 ],
+ "faces": {
+ "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" },
+ "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" },
+ "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" },
+ "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" },
+ "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" },
+ "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" }
+ }
+ },
+ { "from": [ 7, 7, 0 ],
+ "to": [ 9, 11, 1 ],
+ "faces": {
+ "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" },
+ "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" },
+ "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" },
+ "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" },
+ "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" },
+ "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" }
+ }
+ }
+ ]
+}
diff --git a/src/main/resources/assets/ironchest/models/item/copper_chest.json b/src/main/resources/assets/ironchest/models/item/copper_chest.json
new file mode 100644
index 0000000..7bfe2e6
--- /dev/null
+++ b/src/main/resources/assets/ironchest/models/item/copper_chest.json
@@ -0,0 +1,35 @@
+{
+ "parent": "builtin/entity",
+ "display": {
+ "gui": {
+ "rotation": [ 30, 45, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale":[ 0.625, 0.625, 0.625 ]
+ },
+ "ground": {
+ "rotation": [ 0, 0, 0 ],
+ "translation": [ 0, 3, 0],
+ "scale":[ 0.25, 0.25, 0.25 ]
+ },
+ "head": {
+ "rotation": [ 0, 180, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale":[ 1, 1, 1]
+ },
+ "fixed": {
+ "rotation": [ 0, 180, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale":[ 0.5, 0.5, 0.5 ]
+ },
+ "thirdperson_righthand": {
+ "rotation": [ 75, 315, 0 ],
+ "translation": [ 0, 2.5, 0],
+ "scale": [ 0.375, 0.375, 0.375 ]
+ },
+ "firstperson_righthand": {
+ "rotation": [ 0, 315, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale": [ 0.4, 0.4, 0.4 ]
+ }
+ }
+}
diff --git a/src/main/resources/assets/ironchest/models/item/copper_iron_chest_upgrade.json b/src/main/resources/assets/ironchest/models/item/copper_iron_chest_upgrade.json
new file mode 100644
index 0000000..3926f7a
--- /dev/null
+++ b/src/main/resources/assets/ironchest/models/item/copper_iron_chest_upgrade.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "ironchest:item/copper_iron_upgrade"
+ }
+}
diff --git a/src/main/resources/assets/ironchest/models/item/copper_silver_chest_upgrade.json b/src/main/resources/assets/ironchest/models/item/copper_silver_chest_upgrade.json
new file mode 100644
index 0000000..f543495
--- /dev/null
+++ b/src/main/resources/assets/ironchest/models/item/copper_silver_chest_upgrade.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "ironchest:item/copper_silver_upgrade"
+ }
+}
diff --git a/src/main/resources/assets/ironchest/models/item/crystal_chest.json b/src/main/resources/assets/ironchest/models/item/crystal_chest.json
new file mode 100644
index 0000000..7bfe2e6
--- /dev/null
+++ b/src/main/resources/assets/ironchest/models/item/crystal_chest.json
@@ -0,0 +1,35 @@
+{
+ "parent": "builtin/entity",
+ "display": {
+ "gui": {
+ "rotation": [ 30, 45, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale":[ 0.625, 0.625, 0.625 ]
+ },
+ "ground": {
+ "rotation": [ 0, 0, 0 ],
+ "translation": [ 0, 3, 0],
+ "scale":[ 0.25, 0.25, 0.25 ]
+ },
+ "head": {
+ "rotation": [ 0, 180, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale":[ 1, 1, 1]
+ },
+ "fixed": {
+ "rotation": [ 0, 180, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale":[ 0.5, 0.5, 0.5 ]
+ },
+ "thirdperson_righthand": {
+ "rotation": [ 75, 315, 0 ],
+ "translation": [ 0, 2.5, 0],
+ "scale": [ 0.375, 0.375, 0.375 ]
+ },
+ "firstperson_righthand": {
+ "rotation": [ 0, 315, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale": [ 0.4, 0.4, 0.4 ]
+ }
+ }
+}
diff --git a/src/main/resources/assets/ironchest/models/item/diamond_chest.json b/src/main/resources/assets/ironchest/models/item/diamond_chest.json
new file mode 100644
index 0000000..7bfe2e6
--- /dev/null
+++ b/src/main/resources/assets/ironchest/models/item/diamond_chest.json
@@ -0,0 +1,35 @@
+{
+ "parent": "builtin/entity",
+ "display": {
+ "gui": {
+ "rotation": [ 30, 45, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale":[ 0.625, 0.625, 0.625 ]
+ },
+ "ground": {
+ "rotation": [ 0, 0, 0 ],
+ "translation": [ 0, 3, 0],
+ "scale":[ 0.25, 0.25, 0.25 ]
+ },
+ "head": {
+ "rotation": [ 0, 180, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale":[ 1, 1, 1]
+ },
+ "fixed": {
+ "rotation": [ 0, 180, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale":[ 0.5, 0.5, 0.5 ]
+ },
+ "thirdperson_righthand": {
+ "rotation": [ 75, 315, 0 ],
+ "translation": [ 0, 2.5, 0],
+ "scale": [ 0.375, 0.375, 0.375 ]
+ },
+ "firstperson_righthand": {
+ "rotation": [ 0, 315, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale": [ 0.4, 0.4, 0.4 ]
+ }
+ }
+}
diff --git a/src/main/resources/assets/ironchest/models/item/diamond_crystal_chest_upgrade.json b/src/main/resources/assets/ironchest/models/item/diamond_crystal_chest_upgrade.json
new file mode 100644
index 0000000..db18ca6
--- /dev/null
+++ b/src/main/resources/assets/ironchest/models/item/diamond_crystal_chest_upgrade.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "ironchest:item/diamond_crystal_upgrade"
+ }
+}
diff --git a/src/main/resources/assets/ironchest/models/item/diamond_obsidian_chest_upgrade.json b/src/main/resources/assets/ironchest/models/item/diamond_obsidian_chest_upgrade.json
new file mode 100644
index 0000000..bd507f4
--- /dev/null
+++ b/src/main/resources/assets/ironchest/models/item/diamond_obsidian_chest_upgrade.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "ironchest:item/diamond_obsidian_upgrade"
+ }
+}
diff --git a/src/main/resources/assets/ironchest/models/item/dirt_chest.json b/src/main/resources/assets/ironchest/models/item/dirt_chest.json
new file mode 100644
index 0000000..7bfe2e6
--- /dev/null
+++ b/src/main/resources/assets/ironchest/models/item/dirt_chest.json
@@ -0,0 +1,35 @@
+{
+ "parent": "builtin/entity",
+ "display": {
+ "gui": {
+ "rotation": [ 30, 45, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale":[ 0.625, 0.625, 0.625 ]
+ },
+ "ground": {
+ "rotation": [ 0, 0, 0 ],
+ "translation": [ 0, 3, 0],
+ "scale":[ 0.25, 0.25, 0.25 ]
+ },
+ "head": {
+ "rotation": [ 0, 180, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale":[ 1, 1, 1]
+ },
+ "fixed": {
+ "rotation": [ 0, 180, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale":[ 0.5, 0.5, 0.5 ]
+ },
+ "thirdperson_righthand": {
+ "rotation": [ 75, 315, 0 ],
+ "translation": [ 0, 2.5, 0],
+ "scale": [ 0.375, 0.375, 0.375 ]
+ },
+ "firstperson_righthand": {
+ "rotation": [ 0, 315, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale": [ 0.4, 0.4, 0.4 ]
+ }
+ }
+}
diff --git a/src/main/resources/assets/ironchest/models/item/gold_chest.json b/src/main/resources/assets/ironchest/models/item/gold_chest.json
new file mode 100644
index 0000000..7bfe2e6
--- /dev/null
+++ b/src/main/resources/assets/ironchest/models/item/gold_chest.json
@@ -0,0 +1,35 @@
+{
+ "parent": "builtin/entity",
+ "display": {
+ "gui": {
+ "rotation": [ 30, 45, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale":[ 0.625, 0.625, 0.625 ]
+ },
+ "ground": {
+ "rotation": [ 0, 0, 0 ],
+ "translation": [ 0, 3, 0],
+ "scale":[ 0.25, 0.25, 0.25 ]
+ },
+ "head": {
+ "rotation": [ 0, 180, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale":[ 1, 1, 1]
+ },
+ "fixed": {
+ "rotation": [ 0, 180, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale":[ 0.5, 0.5, 0.5 ]
+ },
+ "thirdperson_righthand": {
+ "rotation": [ 75, 315, 0 ],
+ "translation": [ 0, 2.5, 0],
+ "scale": [ 0.375, 0.375, 0.375 ]
+ },
+ "firstperson_righthand": {
+ "rotation": [ 0, 315, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale": [ 0.4, 0.4, 0.4 ]
+ }
+ }
+}
diff --git a/src/main/resources/assets/ironchest/models/item/gold_diamond_chest_upgrade.json b/src/main/resources/assets/ironchest/models/item/gold_diamond_chest_upgrade.json
new file mode 100644
index 0000000..62eec1f
--- /dev/null
+++ b/src/main/resources/assets/ironchest/models/item/gold_diamond_chest_upgrade.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "ironchest:item/gold_diamond_upgrade"
+ }
+}
diff --git a/src/main/resources/assets/ironchest/models/item/iron_chest.json b/src/main/resources/assets/ironchest/models/item/iron_chest.json
new file mode 100644
index 0000000..7bfe2e6
--- /dev/null
+++ b/src/main/resources/assets/ironchest/models/item/iron_chest.json
@@ -0,0 +1,35 @@
+{
+ "parent": "builtin/entity",
+ "display": {
+ "gui": {
+ "rotation": [ 30, 45, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale":[ 0.625, 0.625, 0.625 ]
+ },
+ "ground": {
+ "rotation": [ 0, 0, 0 ],
+ "translation": [ 0, 3, 0],
+ "scale":[ 0.25, 0.25, 0.25 ]
+ },
+ "head": {
+ "rotation": [ 0, 180, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale":[ 1, 1, 1]
+ },
+ "fixed": {
+ "rotation": [ 0, 180, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale":[ 0.5, 0.5, 0.5 ]
+ },
+ "thirdperson_righthand": {
+ "rotation": [ 75, 315, 0 ],
+ "translation": [ 0, 2.5, 0],
+ "scale": [ 0.375, 0.375, 0.375 ]
+ },
+ "firstperson_righthand": {
+ "rotation": [ 0, 315, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale": [ 0.4, 0.4, 0.4 ]
+ }
+ }
+}
diff --git a/src/main/resources/assets/ironchest/models/item/iron_gold_chest_upgrade.json b/src/main/resources/assets/ironchest/models/item/iron_gold_chest_upgrade.json
new file mode 100644
index 0000000..7691286
--- /dev/null
+++ b/src/main/resources/assets/ironchest/models/item/iron_gold_chest_upgrade.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "ironchest:item/iron_gold_upgrade"
+ }
+}
diff --git a/src/main/resources/assets/ironchest/models/item/obsidian_chest.json b/src/main/resources/assets/ironchest/models/item/obsidian_chest.json
new file mode 100644
index 0000000..7bfe2e6
--- /dev/null
+++ b/src/main/resources/assets/ironchest/models/item/obsidian_chest.json
@@ -0,0 +1,35 @@
+{
+ "parent": "builtin/entity",
+ "display": {
+ "gui": {
+ "rotation": [ 30, 45, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale":[ 0.625, 0.625, 0.625 ]
+ },
+ "ground": {
+ "rotation": [ 0, 0, 0 ],
+ "translation": [ 0, 3, 0],
+ "scale":[ 0.25, 0.25, 0.25 ]
+ },
+ "head": {
+ "rotation": [ 0, 180, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale":[ 1, 1, 1]
+ },
+ "fixed": {
+ "rotation": [ 0, 180, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale":[ 0.5, 0.5, 0.5 ]
+ },
+ "thirdperson_righthand": {
+ "rotation": [ 75, 315, 0 ],
+ "translation": [ 0, 2.5, 0],
+ "scale": [ 0.375, 0.375, 0.375 ]
+ },
+ "firstperson_righthand": {
+ "rotation": [ 0, 315, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale": [ 0.4, 0.4, 0.4 ]
+ }
+ }
+}
diff --git a/src/main/resources/assets/ironchest/models/item/silver_chest.json b/src/main/resources/assets/ironchest/models/item/silver_chest.json
new file mode 100644
index 0000000..7bfe2e6
--- /dev/null
+++ b/src/main/resources/assets/ironchest/models/item/silver_chest.json
@@ -0,0 +1,35 @@
+{
+ "parent": "builtin/entity",
+ "display": {
+ "gui": {
+ "rotation": [ 30, 45, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale":[ 0.625, 0.625, 0.625 ]
+ },
+ "ground": {
+ "rotation": [ 0, 0, 0 ],
+ "translation": [ 0, 3, 0],
+ "scale":[ 0.25, 0.25, 0.25 ]
+ },
+ "head": {
+ "rotation": [ 0, 180, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale":[ 1, 1, 1]
+ },
+ "fixed": {
+ "rotation": [ 0, 180, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale":[ 0.5, 0.5, 0.5 ]
+ },
+ "thirdperson_righthand": {
+ "rotation": [ 75, 315, 0 ],
+ "translation": [ 0, 2.5, 0],
+ "scale": [ 0.375, 0.375, 0.375 ]
+ },
+ "firstperson_righthand": {
+ "rotation": [ 0, 315, 0 ],
+ "translation": [ 0, 0, 0],
+ "scale": [ 0.4, 0.4, 0.4 ]
+ }
+ }
+}
diff --git a/src/main/resources/assets/ironchest/models/item/silver_gold_chest_upgrade.json b/src/main/resources/assets/ironchest/models/item/silver_gold_chest_upgrade.json
new file mode 100644
index 0000000..0bb47a8
--- /dev/null
+++ b/src/main/resources/assets/ironchest/models/item/silver_gold_chest_upgrade.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "ironchest:item/silver_gold_upgrade"
+ }
+}
diff --git a/src/main/resources/assets/ironchest/models/item/wood_copper_chest_upgrade.json b/src/main/resources/assets/ironchest/models/item/wood_copper_chest_upgrade.json
new file mode 100644
index 0000000..9195b8d
--- /dev/null
+++ b/src/main/resources/assets/ironchest/models/item/wood_copper_chest_upgrade.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "ironchest:item/wood_copper_upgrade"
+ }
+}
diff --git a/src/main/resources/assets/ironchest/models/item/wood_iron_chest_upgrade.json b/src/main/resources/assets/ironchest/models/item/wood_iron_chest_upgrade.json
new file mode 100644
index 0000000..91ed026
--- /dev/null
+++ b/src/main/resources/assets/ironchest/models/item/wood_iron_chest_upgrade.json
@@ -0,0 +1,6 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "ironchest:item/wood_iron_upgrade"
+ }
+}
diff --git a/src/main/resources/assets/ironchest/textures/block/copper_break.png b/src/main/resources/assets/ironchest/textures/block/copper_break.png
new file mode 100644
index 0000000..7cfb64f
Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/block/copper_break.png differ
diff --git a/src/main/resources/assets/ironchest/textures/block/crystal_break.png b/src/main/resources/assets/ironchest/textures/block/crystal_break.png
new file mode 100644
index 0000000..44d3939
Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/block/crystal_break.png differ
diff --git a/src/main/resources/assets/ironchest/textures/block/diamond_break.png b/src/main/resources/assets/ironchest/textures/block/diamond_break.png
new file mode 100644
index 0000000..850ebd2
Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/block/diamond_break.png differ
diff --git a/src/main/resources/assets/ironchest/textures/block/gold_break.png b/src/main/resources/assets/ironchest/textures/block/gold_break.png
new file mode 100644
index 0000000..24074dd
Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/block/gold_break.png differ
diff --git a/src/main/resources/assets/ironchest/textures/block/iron_break.png b/src/main/resources/assets/ironchest/textures/block/iron_break.png
new file mode 100644
index 0000000..a7675b2
Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/block/iron_break.png differ
diff --git a/src/main/resources/assets/ironchest/textures/block/silver_break.png b/src/main/resources/assets/ironchest/textures/block/silver_break.png
new file mode 100644
index 0000000..531bc94
Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/block/silver_break.png differ
diff --git a/src/main/resources/assets/ironchest/textures/gui/copper_container.png b/src/main/resources/assets/ironchest/textures/gui/copper_container.png
new file mode 100644
index 0000000..9838b51
Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/gui/copper_container.png differ
diff --git a/src/main/resources/assets/ironchest/textures/gui/diamond_container.png b/src/main/resources/assets/ironchest/textures/gui/diamond_container.png
new file mode 100644
index 0000000..b53f472
Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/gui/diamond_container.png differ
diff --git a/src/main/resources/assets/ironchest/textures/gui/dirt_container.png b/src/main/resources/assets/ironchest/textures/gui/dirt_container.png
new file mode 100644
index 0000000..44667e1
Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/gui/dirt_container.png differ
diff --git a/src/main/resources/assets/ironchest/textures/gui/gold_container.png b/src/main/resources/assets/ironchest/textures/gui/gold_container.png
new file mode 100644
index 0000000..27f506f
Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/gui/gold_container.png differ
diff --git a/src/main/resources/assets/ironchest/textures/gui/iron_container.png b/src/main/resources/assets/ironchest/textures/gui/iron_container.png
new file mode 100644
index 0000000..1c48eed
Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/gui/iron_container.png differ
diff --git a/src/main/resources/assets/ironchest/textures/gui/silver_container.png b/src/main/resources/assets/ironchest/textures/gui/silver_container.png
new file mode 100644
index 0000000..65179f2
Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/gui/silver_container.png differ
diff --git a/src/main/resources/assets/ironchest/textures/item/copper_iron_upgrade.png b/src/main/resources/assets/ironchest/textures/item/copper_iron_upgrade.png
new file mode 100644
index 0000000..7bb2159
Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/item/copper_iron_upgrade.png differ
diff --git a/src/main/resources/assets/ironchest/textures/item/copper_silver_upgrade.png b/src/main/resources/assets/ironchest/textures/item/copper_silver_upgrade.png
new file mode 100644
index 0000000..de87597
Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/item/copper_silver_upgrade.png differ
diff --git a/src/main/resources/assets/ironchest/textures/item/diamond_crystal_upgrade.png b/src/main/resources/assets/ironchest/textures/item/diamond_crystal_upgrade.png
new file mode 100644
index 0000000..68caa0c
Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/item/diamond_crystal_upgrade.png differ
diff --git a/src/main/resources/assets/ironchest/textures/item/diamond_obsidian_upgrade.png b/src/main/resources/assets/ironchest/textures/item/diamond_obsidian_upgrade.png
new file mode 100644
index 0000000..dd1a36d
Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/item/diamond_obsidian_upgrade.png differ
diff --git a/src/main/resources/assets/ironchest/textures/item/gold_diamond_upgrade.png b/src/main/resources/assets/ironchest/textures/item/gold_diamond_upgrade.png
new file mode 100644
index 0000000..028e2d8
Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/item/gold_diamond_upgrade.png differ
diff --git a/src/main/resources/assets/ironchest/textures/item/iron_gold_upgrade.png b/src/main/resources/assets/ironchest/textures/item/iron_gold_upgrade.png
new file mode 100644
index 0000000..65cf6ae
Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/item/iron_gold_upgrade.png differ
diff --git a/src/main/resources/assets/ironchest/textures/item/silver_gold_upgrade.png b/src/main/resources/assets/ironchest/textures/item/silver_gold_upgrade.png
new file mode 100644
index 0000000..d3cad2e
Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/item/silver_gold_upgrade.png differ
diff --git a/src/main/resources/assets/ironchest/textures/item/wood_copper_upgrade.png b/src/main/resources/assets/ironchest/textures/item/wood_copper_upgrade.png
new file mode 100644
index 0000000..4273a54
Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/item/wood_copper_upgrade.png differ
diff --git a/src/main/resources/assets/ironchest/textures/item/wood_iron_upgrade.png b/src/main/resources/assets/ironchest/textures/item/wood_iron_upgrade.png
new file mode 100644
index 0000000..e6e62bb
Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/item/wood_iron_upgrade.png differ
diff --git a/src/main/resources/assets/ironchest/textures/model/copper_chest.png b/src/main/resources/assets/ironchest/textures/model/copper_chest.png
new file mode 100644
index 0000000..a008864
Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/copper_chest.png differ
diff --git a/src/main/resources/assets/ironchest/textures/model/crystal_chest.png b/src/main/resources/assets/ironchest/textures/model/crystal_chest.png
new file mode 100644
index 0000000..a455ce8
Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/crystal_chest.png differ
diff --git a/src/main/resources/assets/ironchest/textures/model/diamond_chest.png b/src/main/resources/assets/ironchest/textures/model/diamond_chest.png
new file mode 100644
index 0000000..64020b5
Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/diamond_chest.png differ
diff --git a/src/main/resources/assets/ironchest/textures/model/dirt_chest.png b/src/main/resources/assets/ironchest/textures/model/dirt_chest.png
new file mode 100644
index 0000000..168e179
Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/dirt_chest.png differ
diff --git a/src/main/resources/assets/ironchest/textures/model/gold_chest.png b/src/main/resources/assets/ironchest/textures/model/gold_chest.png
new file mode 100644
index 0000000..7f18468
Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/gold_chest.png differ
diff --git a/src/main/resources/assets/ironchest/textures/model/iron_chest.png b/src/main/resources/assets/ironchest/textures/model/iron_chest.png
new file mode 100644
index 0000000..df883ff
Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/iron_chest.png differ
diff --git a/src/main/resources/assets/ironchest/textures/model/obsidian_chest.png b/src/main/resources/assets/ironchest/textures/model/obsidian_chest.png
new file mode 100644
index 0000000..4f0657a
Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/obsidian_chest.png differ
diff --git a/src/main/resources/assets/ironchest/textures/model/silver_chest.png b/src/main/resources/assets/ironchest/textures/model/silver_chest.png
new file mode 100644
index 0000000..780becd
Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/silver_chest.png differ
diff --git a/src/main/resources/itemsheet.xcf b/src/main/resources/itemsheet.xcf
new file mode 100644
index 0000000..47073b8
Binary files /dev/null and b/src/main/resources/itemsheet.xcf differ
diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta
new file mode 100644
index 0000000..7f4705a
--- /dev/null
+++ b/src/main/resources/pack.mcmeta
@@ -0,0 +1,7 @@
+{
+ "pack": {
+ "description": "ironchests resources",
+ "pack_format": 4,
+ "_comment": "A pack_format of 4 requires json lang files. Note: we require v4 pack meta for all mods."
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/texturesheet.xcf b/src/main/resources/texturesheet.xcf
new file mode 100644
index 0000000..a0730b0
Binary files /dev/null and b/src/main/resources/texturesheet.xcf differ