Merge remote-tracking branch 'prog/master'

This commit is contained in:
cpw 2015-11-22 16:45:10 -05:00
commit a4bee7ff6f
119 changed files with 1442 additions and 827 deletions

7
.gitignore vendored Normal file → Executable file
View File

@ -5,3 +5,10 @@ build/
eclipse/
bin/
repo/
/run/
.settings/
#IDEA files from Gradle
.idea/
/*.iml
/*.ipr
/*.iws

8
README.md Normal file → Executable file
View File

@ -1,6 +1,10 @@
ironchest
=========
Iron Chest minecraft mod. The torch has been passed to ProgWML6. See here: https://github.com/progwml6/ironchest
Iron Chest minecraft mod
This is the ancestral home of IronChest. A GPL v3 licensed mod by cpw.
a GPL v3 licensed mod by cpw
Currently Maintained by ProgWML6
See http://files.minecraftforge.net/IronChests2/ for downloads

14
build.gradle Normal file → Executable file
View File

@ -12,11 +12,12 @@ buildscript {
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.1-SNAPSHOT'
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
}
}
// Apply the forge plugin - this adds all the magic for automatically obfuscating, deobfuscating etc
apply plugin: 'forge'
// This is a simple flatdir repository for "uploadArchives" when you don't have a remote repo to target
@ -37,7 +38,8 @@ archivesBaseName = "ironchest"
// Setup the forge minecraft plugin data. Specify the preferred forge/minecraft version here
minecraft {
version = "1.7.2-10.12.0.1024"
version = "1.8-11.14.0.1292-1.8"
mappings = "snapshot_20150129"
}
// This wrangles the resources for the jar files- stuff like textures and languages
@ -125,14 +127,14 @@ uploadArchives {
url 'https://github.com/cpw/IronChest'
scm {
url 'https://github.com/cpw/IronChest'
connection 'scm:git:git://github.com/cpw/IronChest.git'
developerConnection 'scm:git:git@github.com:cpw/IronChest.git'
url 'https://github.com/progwml6/IronChest'
connection 'scm:git:git://github.com/progwml6/IronChest.git'
developerConnection 'scm:git:git@github.com:progwml6/IronChest.git'
}
issueManagement {
system 'github'
url 'https://github.com/cpw/IronChest/issues'
url 'https://github.com/progwml6/IronChest/issues'
}
licenses {

BIN
gradle/wrapper/gradle-wrapper.jar vendored Normal file → Executable file

Binary file not shown.

4
gradle/wrapper/gradle-wrapper.properties vendored Normal file → Executable file
View File

@ -1,6 +1,6 @@
#Tue Oct 29 18:00:54 CDT 2013
#Wed Sep 10 01:32:34 EDT 2014
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-2.0-bin.zip

0
gradlew.bat vendored Normal file → Executable file
View File

View File

@ -0,0 +1,38 @@
package invtweaks.api.container;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* A marker for containers that have a chest-like persistant storage component. Enables the Inventroy Tweaks sorting
* buttons for this container.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface ChestContainer {
// Set to true if the Inventory Tweaks sorting buttons should be shown for this container.
boolean showButtons() default true;
// Size of a chest row
int rowSize() default 9;
// Uses 'large chest' mode for sorting buttons
// (Renders buttons vertically down the right side of the GUI)
boolean isLargeChest() default false;
// Annotation for method to get size of a chest row if it is not a fixed size for this container class
// Signature int func()
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface RowSizeCallback {
}
// Annotation for method to get size of a chest row if it is not a fixed size for this container class
// Signature int func()
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface IsLargeCallback {
}
}

225
src/main/java/cpw/mods/ironchest/BlockIronChest.java Normal file → Executable file
View File

@ -10,19 +10,16 @@
******************************************************************************/
package cpw.mods.ironchest;
import static net.minecraftforge.common.util.ForgeDirection.DOWN;
import static net.minecraftforge.common.util.ForgeDirection.UP;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import com.google.common.collect.Lists;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyEnum;
import net.minecraft.block.state.BlockState;
import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
@ -34,37 +31,31 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.MathHelper;
import net.minecraft.world.Explosion;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public class BlockIronChest extends BlockContainer {
import com.google.common.collect.Lists;
private Random random;
@SideOnly(Side.CLIENT)
private IIcon[][] icons;
public class BlockIronChest extends BlockContainer
{
public static final PropertyEnum VARIANT_PROP = PropertyEnum.create("variant", IronChestType.class);
public BlockIronChest()
{
super(Material.iron);
setBlockName("IronChest");
setHardness(3.0F);
setBlockBounds(0.0625F, 0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);
random = new Random();
setCreativeTab(CreativeTabs.tabDecorations);
}
/**
* Overridden by {@link #createTileEntity(World, int)}
*/
@Override
public TileEntity createNewTileEntity(World w, int i)
{
return null;
this.setDefaultState(this.blockState.getBaseState().withProperty(VARIANT_PROP, IronChestType.IRON));
this.setBlockBounds(0.0625F, 0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);
this.setHardness(3.0F);
this.setUnlocalizedName("IronChest");
this.setCreativeTab(CreativeTabs.tabDecorations);
}
@Override
@ -74,55 +65,22 @@ public class BlockIronChest extends BlockContainer {
}
@Override
public boolean renderAsNormalBlock()
public boolean isFullCube()
{
return false;
}
@Override
public int getRenderType()
public boolean onBlockActivated(World world, BlockPos pos, IBlockState blockState, EntityPlayer player, EnumFacing direction, float p_180639_6_, float p_180639_7_, float p_180639_8_)
{
return 22;
}
@Override
public TileEntity createTileEntity(World world, int metadata)
{
return IronChestType.makeEntity(metadata);
}
@SideOnly(Side.CLIENT)
@Override
public IIcon getIcon(int i, int j)
{
if (j < IronChestType.values().length)
{
IronChestType type = IronChestType.values()[j];
return type.getIcon(i);
}
return null;
}
@Override
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune)
{
ArrayList<ItemStack> items = Lists.newArrayList();
ItemStack stack = new ItemStack(this,1,metadata);
IronChestType.values()[IronChestType.validateMeta(metadata)].adornItemDrop(stack);
items.add(stack);
return items;
}
@Override
public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer player, int i1, float f1, float f2, float f3)
{
TileEntity te = world.getTileEntity(i, j, k);
TileEntity te = world.getTileEntity(pos);
if (te == null || !(te instanceof TileEntityIronChest))
{
return true;
}
if (world.isSideSolid(i, j + 1, k, ForgeDirection.DOWN))
if (world.isSideSolid(pos.add(0, 1, 0), EnumFacing.DOWN))
{
return true;
}
@ -132,22 +90,69 @@ public class BlockIronChest extends BlockContainer {
return true;
}
player.openGui(IronChest.instance, ((TileEntityIronChest) te).getType().ordinal(), world, i, j, k);
player.openGui(IronChest.instance, ((TileEntityIronChest) te).getType().ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
return true;
}
@Override
public void onBlockAdded(World world, int i, int j, int k)
public TileEntity createNewTileEntity(World world, int metadata)
{
super.onBlockAdded(world, i, j, k);
world.markBlockForUpdate(i, j, k);
return IronChestType.makeEntity(metadata);
}
@Override
public void onBlockPlacedBy(World world, int i, int j, int k, EntityLivingBase entityliving, ItemStack itemStack)
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item itemIn, CreativeTabs tab, List list)
{
for (IronChestType type : IronChestType.values())
{
if (type.isValidForCreativeMode())
{
list.add(new ItemStack(itemIn, 1, type.ordinal()));
}
}
}
@Override
public IBlockState getStateFromMeta(int meta)
{
return this.getDefaultState().withProperty(VARIANT_PROP, IronChestType.values()[meta]);
}
@Override
public int getMetaFromState(IBlockState blockState)
{
return ((IronChestType) blockState.getValue(VARIANT_PROP)).ordinal();
}
@Override
protected BlockState createBlockState()
{
return new BlockState(this, new IProperty[] { VARIANT_PROP });
}
@Override
public ArrayList<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
{
ArrayList<ItemStack> items = Lists.newArrayList();
ItemStack stack = new ItemStack(this, 1, getMetaFromState(state));
IronChestType.values()[IronChestType.validateMeta(getMetaFromState(state))].adornItemDrop(stack);
items.add(stack);
return items;
}
@Override
public void onBlockAdded(World world, BlockPos pos, IBlockState blockState)
{
super.onBlockAdded(world, pos, blockState);
world.markBlockForUpdate(pos);
}
@Override
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState blockState, EntityLivingBase entityliving, ItemStack itemStack)
{
byte chestFacing = 0;
int facing = MathHelper.floor_double((double) ((entityliving.rotationYaw * 4F) / 360F) + 0.5D) & 3;
int facing = MathHelper.floor_double((entityliving.rotationYaw * 4F) / 360F + 0.5D) & 3;
if (facing == 0)
{
chestFacing = 2;
@ -164,36 +169,38 @@ public class BlockIronChest extends BlockContainer {
{
chestFacing = 4;
}
TileEntity te = world.getTileEntity(i, j, k);
TileEntity te = world.getTileEntity(pos);
if (te != null && te instanceof TileEntityIronChest)
{
TileEntityIronChest teic = (TileEntityIronChest) te;
teic.wasPlaced(entityliving, itemStack);
teic.setFacing(chestFacing);
world.markBlockForUpdate(i, j, k);
world.markBlockForUpdate(pos);
}
}
@Override
public int damageDropped(int i)
public int damageDropped(IBlockState state)
{
return i;
return IronChestType.validateMeta(((IronChestType) state.getValue(VARIANT_PROP)).ordinal());
}
@Override
public void breakBlock(World world, int i, int j, int k, Block i1, int i2)
public void breakBlock(World world, BlockPos pos, IBlockState blockState)
{
TileEntityIronChest tileentitychest = (TileEntityIronChest) world.getTileEntity(i, j, k);
TileEntityIronChest tileentitychest = (TileEntityIronChest) world.getTileEntity(pos);
if (tileentitychest != null)
{
tileentitychest.removeAdornments();
dropContent(0, tileentitychest, world, tileentitychest.xCoord, tileentitychest.yCoord, tileentitychest.zCoord);
dropContent(0, tileentitychest, world, tileentitychest.getPos());
}
super.breakBlock(world, i, j, k, i1, i2);
super.breakBlock(world, pos, blockState);
}
public void dropContent(int newSize, IInventory chest, World world, int xCoord, int yCoord, int zCoord)
public void dropContent(int newSize, IInventory chest, World world, BlockPos pos)
{
Random random = world.rand;
for (int l = newSize; l < chest.getSizeInventory(); l++)
{
ItemStack itemstack = chest.getStackInSlot(l);
@ -212,8 +219,7 @@ public class BlockIronChest extends BlockContainer {
i1 = itemstack.stackSize;
}
itemstack.stackSize -= i1;
EntityItem entityitem = new EntityItem(world, (float) xCoord + f, (float) yCoord + (newSize > 0 ? 1 : 0) + f1, (float) zCoord + f2,
new ItemStack(itemstack.getItem(), i1, itemstack.getItemDamage()));
EntityItem entityitem = new EntityItem(world, pos.getX() + f, (float) pos.getY() + (newSize > 0 ? 1 : 0) + f1, pos.getZ() + f2, new ItemStack(itemstack.getItem(), i1, itemstack.getMetadata()));
float f3 = 0.05F;
entityitem.motionX = (float) random.nextGaussian() * f3;
entityitem.motionY = (float) random.nextGaussian() * f3 + 0.2F;
@ -228,72 +234,59 @@ public class BlockIronChest extends BlockContainer {
}
@Override
@SuppressWarnings({ "rawtypes", "unchecked" })
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List)
public float getExplosionResistance(World world, BlockPos pos, Entity exploder, Explosion explosion)
{
for (IronChestType type : IronChestType.values())
{
if (type.isValidForCreativeMode())
{
par3List.add(new ItemStack(this, 1, type.ordinal()));
}
}
}
@Override
public float getExplosionResistance(Entity par1Entity, World world, int x, int y, int z, double explosionX, double explosionY, double explosionZ)
{
TileEntity te = world.getTileEntity(x, y, z);
TileEntity te = world.getTileEntity(pos);
if (te instanceof TileEntityIronChest)
{
TileEntityIronChest teic = (TileEntityIronChest) te;
if (teic.getType().isExplosionResistant())
{
return 10000f;
return 10000F;
}
}
return super.getExplosionResistance(par1Entity, world, x, y, z, explosionX, explosionY, explosionZ);
return super.getExplosionResistance(world, pos, exploder, explosion);
}
@Override
public int getComparatorInputOverride(World par1World, int par2, int par3, int par4, int par5)
public boolean hasComparatorInputOverride()
{
return Container.calcRedstoneFromInventory((TileEntityIronChest) par1World.getTileEntity(par2, par3, par4));
return true;
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister par1IconRegister)
public int getComparatorInputOverride(World world, BlockPos pos)
{
for (IronChestType typ: IronChestType.values())
TileEntity te = world.getTileEntity(pos);
if (te instanceof IInventory)
{
typ.makeIcons(par1IconRegister);
return Container.calcRedstoneFromInventory((IInventory) te);
}
return 0;
}
private static final ForgeDirection[] validRotationAxes = new ForgeDirection[] { UP, DOWN };
private static final EnumFacing[] validRotationAxes = new EnumFacing[] { EnumFacing.UP, EnumFacing.DOWN };
@Override
public ForgeDirection[] getValidRotations(World worldObj, int x, int y, int z)
public EnumFacing[] getValidRotations(World worldObj, BlockPos pos)
{
return validRotationAxes;
}
@Override
public boolean rotateBlock(World worldObj, int x, int y, int z, ForgeDirection axis)
public boolean rotateBlock(World worldObj, BlockPos pos, EnumFacing axis)
{
if (worldObj.isRemote)
{
return false;
}
if (axis == UP || axis == DOWN)
if (axis == EnumFacing.UP || axis == EnumFacing.DOWN)
{
TileEntity tileEntity = worldObj.getTileEntity(pos);
if (tileEntity instanceof TileEntityIronChest)
{
TileEntity tileEntity = worldObj.getTileEntity(x, y, z);
if (tileEntity instanceof TileEntityIronChest) {
TileEntityIronChest icte = (TileEntityIronChest) tileEntity;
icte.rotateAround(axis);
icte.rotateAround();
}
return true;
}

22
src/main/java/cpw/mods/ironchest/ChestChangerType.java Normal file → Executable file
View File

@ -16,8 +16,10 @@ import static cpw.mods.ironchest.IronChestType.SILVER;
import static cpw.mods.ironchest.IronChestType.WOOD;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.config.Configuration;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.registry.GameRegistry;
import cpw.mods.ironchest.client.ModelHelper;
import net.minecraftforge.fml.relauncher.Side;
public enum ChestChangerType {
IRONGOLD(IRON, GOLD, "ironGoldUpgrade", "Iron to Gold Chest Upgrade", "mmm", "msm", "mmm"),
@ -34,7 +36,7 @@ public enum ChestChangerType {
private IronChestType target;
public String itemName;
public String descriptiveName;
private ItemChestChanger item;
public ItemChestChanger item;
private String[] recipe;
private ChestChangerType(IronChestType source, IronChestType target, String itemName, String descriptiveName, String... recipe)
@ -46,6 +48,10 @@ public enum ChestChangerType {
this.recipe = recipe;
}
public IronChestType getSource(){
return source;
}
public boolean canUpgrade(IronChestType from)
{
return from == this.source;
@ -56,10 +62,12 @@ public enum ChestChangerType {
return this.target.ordinal();
}
public ItemChestChanger buildItem(Configuration cfg)
public ItemChestChanger buildItem()
{
item = new ItemChestChanger(this);
GameRegistry.registerItem(item, itemName);
if(FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT)
ModelHelper.registerItem(item, "ironchest:" + itemName);
return item;
}
@ -71,16 +79,16 @@ public enum ChestChangerType {
{
Object targetMaterial = IronChestType.translateOreName(targetMat);
Object sourceMaterial = IronChestType.translateOreName(sourceMat);
IronChestType.addRecipe(new ItemStack(item), recipe, 'm', targetMaterial, 's', sourceMaterial, 'G', Blocks.glass, 'O', Blocks.obsidian);
IronChestType.addRecipe(new ItemStack(item), recipe, 'm', targetMaterial, 's', sourceMaterial, 'G', "blockGlass", 'O', Blocks.obsidian);
}
}
}
public static void buildItems(Configuration cfg)
public static void buildItems()
{
for (ChestChangerType type : values())
{
type.buildItem(cfg);
type.buildItem();
}
}

7
src/main/java/cpw/mods/ironchest/CommonProxy.java Normal file → Executable file
View File

@ -12,8 +12,9 @@ package cpw.mods.ironchest;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import cpw.mods.fml.common.network.IGuiHandler;
import net.minecraftforge.fml.common.network.IGuiHandler;
public class CommonProxy implements IGuiHandler {
public void registerRenderInformation()
@ -33,9 +34,9 @@ public class CommonProxy implements IGuiHandler {
}
@Override
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int X, int Y, int Z)
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
{
TileEntity te = world.getTileEntity(X, Y, Z);
TileEntity te = world.getTileEntity(new BlockPos(x, y, z));
if (te != null && te instanceof TileEntityIronChest)
{
TileEntityIronChest icte = (TileEntityIronChest) te;

View File

@ -10,6 +10,7 @@
******************************************************************************/
package cpw.mods.ironchest;
import invtweaks.api.container.ChestContainer;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
@ -17,6 +18,7 @@ import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
@ChestContainer(isLargeChest = true)
public class ContainerIronChest extends Container {
private IronChestType type;
private EntityPlayer player;
@ -27,7 +29,7 @@ public class ContainerIronChest extends Container {
chest = chestInventory;
player = ((InventoryPlayer) playerInventory).player;
this.type = type;
chestInventory.openInventory();
chestInventory.openInventory(player);
layoutContainer(playerInventory, chestInventory, type, xSize, ySize);
}
@ -77,7 +79,7 @@ public class ContainerIronChest extends Container {
public void onContainerClosed(EntityPlayer entityplayer)
{
super.onContainerClosed(entityplayer);
chest.closeInventory();
chest.closeInventory(entityplayer);
}
protected void layoutContainer(IInventory playerInventory, IInventory chestInventory, IronChestType type, int xSize, int ySize)
@ -115,4 +117,9 @@ public class ContainerIronChest extends Container {
{
return player;
}
@ChestContainer.RowSizeCallback
public int getNumColumns() {
return type.getRowLength();
}
}

67
src/main/java/cpw/mods/ironchest/IronChest.java Normal file → Executable file
View File

@ -11,78 +11,49 @@
package cpw.mods.ironchest;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.config.Configuration;
import org.apache.logging.log4j.Level;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.Mod.Instance;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.network.NetworkRegistry;
import net.minecraftforge.fml.common.registry.GameRegistry;
@Mod(modid = "IronChest", name = "Iron Chests", dependencies = "required-after:Forge@[7.0,);required-after:FML@[5.0.5,)")
public class IronChest {
@Mod(modid = "IronChest", name = "Iron Chests", dependencies = "required-after:FML@[7.2,)", acceptedMinecraftVersions="[1.8,1.8.8]")
public class IronChest
{
public static BlockIronChest ironChestBlock;
@SidedProxy(clientSide = "cpw.mods.ironchest.client.ClientProxy", serverSide = "cpw.mods.ironchest.CommonProxy")
public static CommonProxy proxy;
@Instance("IronChest")
public static IronChest instance;
public static boolean CACHE_RENDER = true;
public static boolean OCELOTS_SITONCHESTS = true;
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
Version.init(event.getVersionProperties());
event.getModMetadata().version = Version.fullVersionString();
Configuration cfg = new Configuration(event.getSuggestedConfigurationFile());
try
{
cfg.load();
ChestChangerType.buildItems(cfg);
CACHE_RENDER = cfg.get(Configuration.CATEGORY_GENERAL, "cacheRenderingInformation", true).getBoolean(true);
OCELOTS_SITONCHESTS = cfg.get(Configuration.CATEGORY_GENERAL, "ocelotsSitOnChests", true).getBoolean(true);
}
catch (Exception e)
{
FMLLog.log(Level.ERROR, e, "IronChest has a problem loading it's configuration");
}
finally
{
if (cfg.hasChanged())
cfg.save();
}
ironChestBlock = new BlockIronChest();
GameRegistry.registerBlock(ironChestBlock, ItemIronChest.class, "BlockIronChest");
PacketHandler.INSTANCE.ordinal();
}
@EventHandler
public void load(FMLInitializationEvent evt)
{
// Registration has been moved to init to account for the registration of inventory models
// Minecraft.getRenderItem() returns null before this stage
ChestChangerType.buildItems();
ironChestBlock = new BlockIronChest();
GameRegistry.registerBlock(ironChestBlock, ItemIronChest.class, "BlockIronChest");
for (IronChestType typ : IronChestType.values())
{
GameRegistry.registerTileEntityWithAlternatives(typ.clazz, "IronChest."+typ.name(), typ.name());
GameRegistry.registerTileEntityWithAlternatives(typ.clazz, "IronChest." + typ.name(), typ.name());
proxy.registerTileEntitySpecialRenderer(typ);
}
IronChestType.registerBlocksAndRecipes(ironChestBlock);
ChestChangerType.generateRecipes();
NetworkRegistry.INSTANCE.registerGuiHandler(instance, proxy);
proxy.registerRenderInformation();
// if (OCELOTS_SITONCHESTS)
// {
// MinecraftForge.EVENT_BUS.register(new OcelotsSitOnChestsHandler());
// }
MinecraftForge.EVENT_BUS.register(this);
MinecraftForge.EVENT_BUS.register(new OcelotsSitOnChestsHandler());
}
@EventHandler
public void modsLoaded(FMLPostInitializationEvent evt)
{
}
}

View File

@ -2,21 +2,23 @@ package cpw.mods.ironchest;
import net.minecraft.entity.ai.EntityAIOcelotSit;
import net.minecraft.entity.passive.EntityOcelot;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
public class IronChestAIOcelotSit extends EntityAIOcelotSit {
public class IronChestAIOcelotSit extends EntityAIOcelotSit
{
public IronChestAIOcelotSit(EntityOcelot par1EntityOcelot, float par2)
{
super(par1EntityOcelot, par2);
}
/* @Override
protected boolean func_151486_a(World world, int x, int y, int z)
@Override
protected boolean func_179488_a(World world, BlockPos pos)
{
if (world.getBlock(x, y, z) == IronChest.ironChestBlock)
if (world.getBlockState(pos).getBlock() == IronChest.ironChestBlock)
{
return true;
}
return super.func_151486_a(world, x, y, z);
return super.func_179488_a(world, pos);
}
*/}
}

78
src/main/java/cpw/mods/ironchest/IronChestType.java Normal file → Executable file
View File

@ -13,21 +13,19 @@ package cpw.mods.ironchest;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagByte;
import net.minecraft.util.IIcon;
import net.minecraft.util.IStringSerializable;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.ShapedOreRecipe;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public enum IronChestType {
public enum IronChestType implements IStringSerializable
{
IRON(54, 9, true, "Iron Chest", "ironchest.png", 0, Arrays.asList("ingotIron", "ingotRefinedIron"), TileEntityIronChest.class, "mmmmPmmmm", "mGmG3GmGm"),
GOLD(81, 9, true, "Gold Chest", "goldchest.png", 1, Arrays.asList("ingotGold"), TileEntityGoldChest.class, "mmmmPmmmm", "mGmG4GmGm"),
DIAMOND(108, 12, true, "Diamond Chest", "diamondchest.png", 2, Arrays.asList("gemDiamond"), TileEntityDiamondChest.class, "GGGmPmGGG", "GGGG4Gmmm"),
@ -69,6 +67,12 @@ public enum IronChestType {
matList.addAll(mats);
}
@Override
public String getName()
{
return name().toLowerCase();
}
public String getModelTexture()
{
return modelTexture;
@ -104,18 +108,14 @@ public enum IronChestType {
return null;
}
public static void registerTranslations()
{
}
public static void registerBlocksAndRecipes(BlockIronChest blockResult)
{
ItemStack previous = new ItemStack(Blocks.chest);
Object previous = "chestWood";
for (IronChestType typ : values())
{
generateRecipesForType(blockResult, previous, typ);
ItemStack chest = new ItemStack(blockResult, 1, typ.ordinal());
if (typ.isValidForCreativeMode()) GameRegistry.registerCustomItemStack(typ.friendlyName, chest);
//if (typ.isValidForCreativeMode()) GameRegistry.registerCustomItemStack(typ.friendlyName, chest);//TODO fix this!!
if (typ.tieredChest) previous = chest;
}
}
@ -131,12 +131,12 @@ public enum IronChestType {
mainMaterial = translateOreName(mat);
addRecipe(new ItemStack(blockResult, 1, type.ordinal()), recipeSplit,
'm', mainMaterial, 'P', previousTier, /* previous tier of chest */
'G', Blocks.glass, 'C', Blocks.chest,
'G', "blockGlass", 'C', "chestWood",
'0', new ItemStack(blockResult, 1, 0), /* Iron Chest */
'1', new ItemStack(blockResult, 1, 1), /* Gold Chest */
'2', new ItemStack(blockResult, 1, 2), /* Diamond Chest */
'3', new ItemStack(blockResult, 1, 3), /* Copper Chest */
'4', new ItemStack(blockResult, 1, 4)/* Silver Chest */
'4', new ItemStack(blockResult, 1, 4) /* Silver Chest */
);
}
}
@ -144,27 +144,11 @@ public enum IronChestType {
public static Object translateOreName(String mat)
{
if (mat == "ingotIron")
{
return Items.iron_ingot;
}
else if (mat == "ingotGold")
{
return Items.gold_ingot;
}
else if (mat == "gemDiamond")
{
return Items.diamond;
}
else if (mat == "blockGlass")
{
return Blocks.glass;
}
else if (mat == "obsidian")
if (mat.equals("obsidian"))
{
return Blocks.obsidian;
}
else if (mat == "dirt")
else if (mat.equals("dirt"))
{
return Blocks.dirt;
}
@ -219,33 +203,6 @@ public enum IronChestType {
return this == OBSIDIAN;
}
@SideOnly(Side.CLIENT)
private IIcon[] icons;
@SideOnly(Side.CLIENT)
public void makeIcons(IIconRegister par1IconRegister)
{
if (isValidForCreativeMode())
{
icons = new IIcon[3];
int i = 0;
for (String s : sideNames)
{
icons[i++] = par1IconRegister.registerIcon(String.format("ironchest:%s_%s",name().toLowerCase(),s));
}
}
}
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side)
{
return icons[sideMapping[side]];
}
private static String[] sideNames = { "top", "front", "side" };
private static int[] sideMapping = { 0, 0, 2, 1, 2, 2, 2 };
public Slot makeSlot(IInventory chestInventory, int index, int x, int y)
{
return new ValidatingSlot(chestInventory, index, x, y, this);
@ -255,6 +212,7 @@ public enum IronChestType {
{
return itemFilter == null || itemstack == null || itemstack.getItem() == itemFilter;
}
public void adornItemDrop(ItemStack item)
{
if (this == DIRTCHEST9000)

114
src/main/java/cpw/mods/ironchest/ItemChestChanger.java Normal file → Executable file
View File

@ -10,96 +10,88 @@
******************************************************************************/
package cpw.mods.ironchest;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.block.BlockChest;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityChest;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
import cpw.mods.fml.common.ObfuscationReflectionHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemChestChanger extends Item {
public class ItemChestChanger extends Item
{
private ChestChangerType type;
public ItemChestChanger(ChestChangerType type)
{
super();
setMaxStackSize(1);
this.type = type;
setUnlocalizedName("ironchest:"+type.name());
setCreativeTab(CreativeTabs.tabMisc);
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister par1IconRegister)
{
this.itemIcon = par1IconRegister.registerIcon("ironchest:"+type.itemName);
this.setMaxStackSize(1);
this.setUnlocalizedName("ironchest:" + type.name());
this.setCreativeTab(CreativeTabs.tabMisc);
}
@Override
public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int X, int Y, int Z, int side, float hitX, float hitY, float hitZ)
public boolean onItemUseFirst (ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ)
{
if (world.isRemote) return false;
TileEntity te = world.getTileEntity(X, Y, Z);
TileEntityIronChest newchest;
if (te != null && te instanceof TileEntityIronChest)
if (world.isRemote)
return false;
if(this.type.canUpgrade(IronChestType.WOOD)){
if(!(world.getBlockState(pos).getBlock() instanceof BlockChest)){
return false;
}
}else{
if(world.getBlockState(pos) != IronChest.ironChestBlock.getStateFromMeta(IronChestType.valueOf(type.getSource().getName().toUpperCase()).ordinal())){
return false;
}
}
TileEntity te = world.getTileEntity(pos);
TileEntityIronChest newchest = new TileEntityIronChest();
ItemStack[] chestContents = new ItemStack[27];
if (te != null)
{
TileEntityIronChest ironchest = (TileEntityIronChest) te;
newchest = ironchest.applyUpgradeItem(this);
if (te instanceof TileEntityIronChest)
{
chestContents = ((TileEntityIronChest) te).chestContents;
newchest = IronChestType.makeEntity(this.getTargetChestOrdinal(this.type.ordinal()));
if (newchest == null)
{
return false;
}
}
else if (te != null && te instanceof TileEntityChest)
{
TileEntityChest tec = (TileEntityChest) te;
if (tec.numPlayersUsing > 0)
else if (te instanceof TileEntityChest)
{
if (((TileEntityChest) te).numPlayersUsing > 0)
return false;
}
if (!getType().canUpgrade(IronChestType.WOOD))
{
return false;
chestContents = new ItemStack[((TileEntityChest) te).getSizeInventory()];
for (int i = 0; i < chestContents.length; i++)
chestContents[i] = ((TileEntityChest) te).getStackInSlot(i);
newchest = IronChestType.makeEntity(this.getTargetChestOrdinal(this.type.ordinal()));
}
// Force old TE out of the world so that adjacent chests can update
newchest = IronChestType.makeEntity(getTargetChestOrdinal(IronChestType.WOOD.ordinal()));
int newSize = newchest.chestContents.length;
ItemStack[] chestContents = ObfuscationReflectionHelper.getPrivateValue(TileEntityChest.class, tec, 0);
System.arraycopy(chestContents, 0, newchest.chestContents, 0, Math.min(newSize, chestContents.length));
BlockIronChest block = IronChest.ironChestBlock;
block.dropContent(newSize, tec, world, tec.xCoord, tec.yCoord, tec.zCoord);
newchest.setFacing((byte) tec.getBlockMetadata());
newchest.sortTopStacks();
for (int i = 0; i < Math.min(newSize, chestContents.length); i++)
}
te.updateContainingBlockInfo();
if (te instanceof TileEntityChest)
((TileEntityChest) te).checkForAdjacentChests();
world.removeTileEntity(pos);
world.setBlockToAir(pos);
world.setTileEntity(pos, newchest);
world.setBlockState(pos, IronChest.ironChestBlock.getStateFromMeta(newchest.getType().ordinal()), 3);
world.markBlockForUpdate(pos);
TileEntity te2 = world.getTileEntity(pos);
if (te2 instanceof TileEntityIronChest)
{
chestContents[i] = null;
((TileEntityIronChest) te2).setContents(chestContents);
}
// Clear the old block out
world.setBlock(X, Y, Z, Blocks.air, 0, 3);
// Force the Chest TE to reset it's knowledge of neighbouring blocks
tec.updateContainingBlockInfo();
// Force the Chest TE to update any neighbours so they update next
// tick
tec.checkForAdjacentChests();
// And put in our block instead
world.setBlock(X, Y, Z, block, newchest.getType().ordinal(), 3);
}
else
{
return false;
}
world.setTileEntity(X, Y, Z, newchest);
world.setBlockMetadataWithNotify(X, Y, Z, newchest.getType().ordinal(), 3);
stack.stackSize = 0;
stack.stackSize = player.capabilities.isCreativeMode ? stack.stackSize : stack.stackSize - 1;
return true;
}

15
src/main/java/cpw/mods/ironchest/ItemIronChest.java Normal file → Executable file
View File

@ -14,24 +14,25 @@ import net.minecraft.block.Block;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
public class ItemIronChest extends ItemBlock {
public class ItemIronChest extends ItemBlock
{
public ItemIronChest(Block block)
{
super(block);
setMaxDamage(0);
setHasSubtypes(true);
this.setMaxDamage(0);
this.setHasSubtypes(true);
}
@Override
public int getMetadata(int i)
public int getMetadata(int meta)
{
return IronChestType.validateMeta(i);
return IronChestType.validateMeta(meta);
}
@Override
public String getUnlocalizedName(ItemStack itemstack)
{
return "tile.ironchest:"+IronChestType.values()[itemstack.getItemDamage()].name();
return "tile.ironchest:" + IronChestType.values()[itemstack.getMetadata()].name();
}
}

View File

@ -1,33 +0,0 @@
package cpw.mods.ironchest;
import net.minecraft.item.ItemStack;
public class MappableItemStackWrapper {
private ItemStack wrap;
public MappableItemStackWrapper(ItemStack toWrap)
{
wrap = toWrap;
}
@Override
public boolean equals(Object obj)
{
if (!(obj instanceof MappableItemStackWrapper)) return false;
MappableItemStackWrapper isw = (MappableItemStackWrapper) obj;
if (wrap.getHasSubtypes())
{
return isw.wrap.isItemEqual(wrap);
}
else
{
return isw.wrap == wrap;
}
}
@Override
public int hashCode()
{
return System.identityHashCode(wrap);
}
}

View File

@ -1,13 +1,15 @@
package cpw.mods.ironchest;
import java.util.List;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import net.minecraft.entity.ai.EntityAIOcelotSit;
import net.minecraft.entity.ai.EntityAITasks;
import net.minecraft.entity.passive.EntityOcelot;
import net.minecraftforge.event.entity.living.LivingEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
public class OcelotsSitOnChestsHandler {
@SubscribeEvent
public void changeSittingTaskForOcelots(LivingEvent.LivingUpdateEvent evt)
{
@ -17,11 +19,8 @@ public class OcelotsSitOnChestsHandler {
@SuppressWarnings("unchecked")
List<EntityAITasks.EntityAITaskEntry> tasks = ocelot.tasks.taskEntries;
for (int i = 0; i < tasks.size(); i++)
{
EntityAITasks.EntityAITaskEntry task = tasks.get(i);
if (task.priority == 6 && (task.action instanceof EntityAIOcelotSit) && !(task.action instanceof IronChestAIOcelotSit))
{
for (EntityAITasks.EntityAITaskEntry task : tasks) {
if (task.priority == 6 && (task.action instanceof EntityAIOcelotSit) && !(task.action instanceof IronChestAIOcelotSit)) {
task.action = new IronChestAIOcelotSit(ocelot, 0.4F);
}
}

View File

@ -1,200 +0,0 @@
/*******************************************************************************
* 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;
import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import java.util.EnumMap;
import net.minecraft.network.Packet;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.network.FMLEmbeddedChannel;
import cpw.mods.fml.common.network.FMLIndexedMessageToMessageCodec;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.network.internal.FMLProxyPacket;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
/**
* Handles the packet wrangling for IronChest
* @author cpw
*
*/
public enum PacketHandler {
INSTANCE;
/**
* Our channel "pair" from {@link NetworkRegistry}
*/
private EnumMap<Side, FMLEmbeddedChannel> channels;
/**
* Make our packet handler, and add an {@link IronChestCodec} always
*/
private PacketHandler()
{
// request a channel pair for IronChest from the network registry
// Add the IronChestCodec as a member of both channel pipelines
this.channels = NetworkRegistry.INSTANCE.newChannel("IronChest", new IronChestCodec());
if (FMLCommonHandler.instance().getSide() == Side.CLIENT)
{
addClientHandler();
}
}
/**
* This is only called on the client side - it adds an
* {@link IronChestMessageHandler} to the client side pipeline, since the
* only place we expect to <em>handle</em> messages is on the client.
*/
@SideOnly(Side.CLIENT)
private void addClientHandler() {
FMLEmbeddedChannel clientChannel = this.channels.get(Side.CLIENT);
// These two lines find the existing codec (Ironchestcodec) and insert our message handler after it
// in the pipeline
String codec = clientChannel.findChannelHandlerNameForType(IronChestCodec.class);
clientChannel.pipeline().addAfter(codec, "ClientHandler", new IronChestMessageHandler());
}
/**
* This class simply handles the {@link IronChestMessage} when it's received
* at the client side It can contain client only code, because it's only run
* on the client.
*
* @author cpw
*
*/
private static class IronChestMessageHandler extends SimpleChannelInboundHandler<IronChestMessage>
{
@Override
protected void channelRead0(ChannelHandlerContext ctx, IronChestMessage msg) throws Exception
{
World world = IronChest.proxy.getClientWorld();
TileEntity te = world.getTileEntity(msg.x, msg.y, msg.z);
if (te instanceof TileEntityIronChest)
{
TileEntityIronChest icte = (TileEntityIronChest) te;
icte.setFacing(msg.facing);
icte.handlePacketData(msg.type, msg.items);
}
}
}
/**
* This is our "message". In fact, {@link FMLIndexedMessageToMessageCodec}
* can handle many messages on the same channel at once, using a
* discriminator byte. But for IronChest, we only need the one message, so
* we have just this.
*
* @author cpw
*
*/
public static class IronChestMessage
{
int x;
int y;
int z;
int type;
int facing;
int[] items;
}
/**
* This is the codec that automatically transforms the
* {@link FMLProxyPacket} which wraps the client and server custom payload
* packets into a message we care about.
*
* @author cpw
*
*/
private class IronChestCodec extends FMLIndexedMessageToMessageCodec<IronChestMessage>
{
/**
* We register our discriminator bytes here. We only have the one type, so we only
* register one.
*/
public IronChestCodec()
{
addDiscriminator(0, IronChestMessage.class);
}
@Override
public void encodeInto(ChannelHandlerContext ctx, IronChestMessage msg, ByteBuf target) throws Exception
{
target.writeInt(msg.x);
target.writeInt(msg.y);
target.writeInt(msg.z);
int typeAndFacing = ((msg.type & 0x0F) | ((msg.facing & 0x0F) << 4)) & 0xFF;
target.writeByte(typeAndFacing);
target.writeBoolean(msg.items != null);
if (msg.items != null)
{
int[] items = msg.items;
for (int j = 0; j < items.length; j++)
{
int i = items[j];
target.writeInt(i);
}
}
}
@Override
public void decodeInto(ChannelHandlerContext ctx, ByteBuf dat, IronChestMessage msg)
{
msg.x = dat.readInt();
msg.y = dat.readInt();
msg.z = dat.readInt();
int typDat = dat.readByte();
msg.type = (byte)(typDat & 0xf);
msg.facing = (byte)((typDat >> 4) & 0xf);
boolean hasStacks = dat.readBoolean();
msg.items = new int[0];
if (hasStacks)
{
msg.items = new int[24];
for (int i = 0; i < msg.items.length; i++)
{
msg.items[i] = dat.readInt();
}
}
}
}
/**
* This is a utility method called to transform a packet from a custom
* packet into a "system packet". We're called from
* {@link TileEntity#getDescriptionPacket()} in this case, but there are
* others. All network packet methods in minecraft have been adapted to
* handle {@link FMLProxyPacket} but general purpose objects can't be
* handled sadly.
*
* This method uses the {@link IronChestCodec} to transform a custom packet
* {@link IronChestMessage} into an {@link FMLProxyPacket} by using the
* utility method {@link FMLEmbeddedChannel#generatePacketFrom(Object)} on
* the channel to do exactly that.
*
* @param tileEntityIronChest
* @return
*/
public static Packet getPacket(TileEntityIronChest tileEntityIronChest)
{
IronChestMessage msg = new IronChestMessage();
msg.x = tileEntityIronChest.xCoord;
msg.y = tileEntityIronChest.yCoord;
msg.z = tileEntityIronChest.zCoord;
msg.type = tileEntityIronChest.getType().ordinal();
msg.facing = tileEntityIronChest.getFacing();
msg.items = tileEntityIronChest.buildIntDataList();
return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg);
}
}

View File

View File

View File

@ -10,7 +10,8 @@
******************************************************************************/
package cpw.mods.ironchest;
public class TileEntityDiamondChest extends TileEntityIronChest {
public class TileEntityDiamondChest extends TileEntityIronChest
{
public TileEntityDiamondChest()
{
super(IronChestType.DIAMOND);

View File

View File

323
src/main/java/cpw/mods/ironchest/TileEntityIronChest.java Normal file → Executable file
View File

@ -12,23 +12,27 @@ package cpw.mods.ironchest;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.network.NetworkManager;
import net.minecraft.network.Packet;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
import net.minecraft.server.gui.IUpdatePlayerListBox;
import net.minecraft.tileentity.TileEntityLockable;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.util.Constants;
import net.minecraftforge.common.util.ForgeDirection;
public class TileEntityIronChest extends TileEntity implements IInventory {
public class TileEntityIronChest extends TileEntityLockable implements IUpdatePlayerListBox, IInventory
{
private int ticksSinceSync = -1;
public float prevLidAngle;
public float lidAngle;
@ -36,9 +40,10 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
private IronChestType type;
public ItemStack[] chestContents;
private ItemStack[] topStacks;
private int facing;
private byte facing;
private boolean inventoryTouched;
private boolean hadStuff;
private String customName;
public TileEntityIronChest()
{
@ -58,6 +63,19 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
return chestContents;
}
public void setContents(ItemStack[] contents)
{
chestContents = new ItemStack[getSizeInventory()];
for (int i = 0; i < contents.length; i++)
{
if (i < chestContents.length)
{
chestContents[i] = contents[i];
}
}
inventoryTouched = true;
}
@Override
public int getSizeInventory()
{
@ -69,12 +87,6 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
return this.facing;
}
@Override
public String getInventoryName()
{
return type.name();
}
public IronChestType getType()
{
return type;
@ -128,24 +140,23 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
}
if (worldObj != null)
{
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
worldObj.markBlockForUpdate(pos);
}
return;
}
hadStuff = true;
Arrays.sort(tempCopy, new Comparator<ItemStack>() {
Arrays.sort(tempCopy, new Comparator<ItemStack>()
{
@Override
public int compare(ItemStack o1, ItemStack o2)
{
if (o1 == null)
{
return 1;
}
else if (o2 == null)
} else if (o2 == null)
{
return -1;
}
else
} else
{
return o2.stackSize - o1.stackSize;
}
@ -169,7 +180,7 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
}
if (worldObj != null)
{
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
worldObj.markBlockForUpdate(pos);
}
}
@ -192,8 +203,7 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
}
markDirty();
return itemstack1;
}
else
} else
{
return null;
}
@ -210,12 +220,36 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
markDirty();
}
@Override
public String getName()
{
return this.hasCustomName() ? this.customName : type.name();
}
@Override
public boolean hasCustomName()
{
return this.customName != null && this.customName.length() > 0;
}
public void setCustomName(String name)
{
this.customName = name;
}
@Override
public void readFromNBT(NBTTagCompound nbttagcompound)
{
super.readFromNBT(nbttagcompound);
NBTTagList nbttaglist = nbttagcompound.getTagList("Items", Constants.NBT.TAG_COMPOUND);
chestContents = new ItemStack[getSizeInventory()];
this.chestContents = new ItemStack[getSizeInventory()];
if (nbttagcompound.hasKey("CustomName", Constants.NBT.TAG_STRING))
{
this.customName = nbttagcompound.getString("CustomName");
}
for (int i = 0; i < nbttaglist.tagCount(); i++)
{
NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i);
@ -246,7 +280,12 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
}
nbttagcompound.setTag("Items", nbttaglist);
nbttagcompound.setByte("facing", (byte)facing);
nbttagcompound.setByte("facing", facing);
if (this.hasCustomName())
{
nbttagcompound.setString("CustomName", this.customName);
}
}
@Override
@ -262,30 +301,26 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
{
return true;
}
if (worldObj.getTileEntity(xCoord, yCoord, zCoord) != this)
if (worldObj.getTileEntity(pos) != this)
{
return false;
}
return entityplayer.getDistanceSq((double) xCoord + 0.5D, (double) yCoord + 0.5D, (double) zCoord + 0.5D) <= 64D;
return entityplayer.getDistanceSq(pos.getX() + 0.5D, pos.getY() + 0.5D, pos.getZ() + 0.5D) <= 64D;
}
@Override
public void updateEntity()
public void update()
{
super.updateEntity();
// Resynchronize clients with the server state
if (worldObj != null && !this.worldObj.isRemote && this.numUsingPlayers != 0 && (this.ticksSinceSync + this.xCoord + this.yCoord + this.zCoord) % 200 == 0)
if (worldObj != null && !this.worldObj.isRemote && this.numUsingPlayers != 0 && (this.ticksSinceSync + pos.getX() + pos.getY() + pos.getZ()) % 200 == 0)
{
this.numUsingPlayers = 0;
float var1 = 5.0F;
@SuppressWarnings("unchecked")
List<EntityPlayer> var2 = this.worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getAABBPool().getAABB((double)((float)this.xCoord - var1), (double)((float)this.yCoord - var1), (double)((float)this.zCoord - var1), (double)((float)(this.xCoord + 1) + var1), (double)((float)(this.yCoord + 1) + var1), (double)((float)(this.zCoord + 1) + var1)));
Iterator<EntityPlayer> var3 = var2.iterator();
List<EntityPlayer> var2 = this.worldObj.getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(pos.getX() - var1, pos.getY() - var1, pos.getZ() - var1, pos.getX() + 1 + var1, pos.getY() + 1 + var1, pos.getZ() + 1 + var1));
while (var3.hasNext())
for (EntityPlayer var4 : var2)
{
EntityPlayer var4 = var3.next();
if (var4.openContainer instanceof ContainerIronChest)
{
++this.numUsingPlayers;
@ -295,7 +330,7 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
if (worldObj != null && !worldObj.isRemote && ticksSinceSync < 0)
{
worldObj.addBlockEvent(xCoord, yCoord, zCoord, IronChest.ironChestBlock, 3, ((numUsingPlayers << 3) & 0xF8) | (facing & 0x7));
worldObj.addBlockEvent(pos, IronChest.ironChestBlock, 3, ((numUsingPlayers << 3) & 0xF8) | (facing & 0x7));
}
if (!worldObj.isRemote && inventoryTouched)
{
@ -308,9 +343,9 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
float f = 0.1F;
if (numUsingPlayers > 0 && lidAngle == 0.0F)
{
double d = (double) xCoord + 0.5D;
double d1 = (double) zCoord + 0.5D;
worldObj.playSoundEffect(d, (double) yCoord + 0.5D, d1, "random.chestopen", 0.5F, worldObj.rand.nextFloat() * 0.1F + 0.9F);
double d = pos.getX() + 0.5D;
double d1 = pos.getZ() + 0.5D;
worldObj.playSoundEffect(d, pos.getY() + 0.5D, d1, "random.chestopen", 0.5F, worldObj.rand.nextFloat() * 0.1F + 0.9F);
}
if (numUsingPlayers == 0 && lidAngle > 0.0F || numUsingPlayers > 0 && lidAngle < 1.0F)
{
@ -318,8 +353,7 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
if (numUsingPlayers > 0)
{
lidAngle += f;
}
else
} else
{
lidAngle -= f;
}
@ -330,9 +364,9 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
float f2 = 0.5F;
if (lidAngle < f2 && f1 >= f2)
{
double d2 = (double) xCoord + 0.5D;
double d3 = (double) zCoord + 0.5D;
worldObj.playSoundEffect(d2, (double) yCoord + 0.5D, d3, "random.chestclosed", 0.5F, worldObj.rand.nextFloat() * 0.1F + 0.9F);
double d2 = pos.getX() + 0.5D;
double d3 = pos.getZ() + 0.5D;
worldObj.playSoundEffect(d2, pos.getY() + 0.5D, d3, "random.chestclosed", 0.5F, worldObj.rand.nextFloat() * 0.1F + 0.9F);
}
if (lidAngle < 0.0F)
{
@ -347,12 +381,10 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
if (i == 1)
{
numUsingPlayers = j;
}
else if (i == 2)
} else if (i == 2)
{
facing = (byte) j;
}
else if (i == 3)
} else if (i == 3)
{
facing = (byte) (j & 0x7);
numUsingPlayers = (j & 0xF8) >> 3;
@ -361,47 +393,32 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
}
@Override
public void openInventory()
public void openInventory(EntityPlayer player)
{
if (worldObj == null) return;
if (worldObj == null)
{
return;
}
numUsingPlayers++;
worldObj.addBlockEvent(xCoord, yCoord, zCoord, IronChest.ironChestBlock, 1, numUsingPlayers);
worldObj.addBlockEvent(pos, IronChest.ironChestBlock, 1, numUsingPlayers);
}
@Override
public void closeInventory()
public void closeInventory(EntityPlayer player)
{
if (worldObj == null) return;
if (worldObj == null)
{
return;
}
numUsingPlayers--;
worldObj.addBlockEvent(xCoord, yCoord, zCoord, IronChest.ironChestBlock, 1, numUsingPlayers);
worldObj.addBlockEvent(pos, IronChest.ironChestBlock, 1, numUsingPlayers);
}
public void setFacing(int facing2)
public void setFacing(byte facing2)
{
this.facing = facing2;
}
public TileEntityIronChest applyUpgradeItem(ItemChestChanger itemChestChanger)
{
if (numUsingPlayers > 0)
{
return null;
}
if (!itemChestChanger.getType().canUpgrade(this.getType()))
{
return null;
}
TileEntityIronChest newEntity = IronChestType.makeEntity(itemChestChanger.getTargetChestOrdinal(getType().ordinal()));
int newSize = newEntity.chestContents.length;
System.arraycopy(chestContents, 0, newEntity.chestContents, 0, Math.min(newSize, chestContents.length));
BlockIronChest block = IronChest.ironChestBlock;
block.dropContent(newSize, this, this.worldObj, this.xCoord, this.yCoord, this.zCoord);
newEntity.setFacing(facing);
newEntity.sortTopStacks();
newEntity.ticksSinceSync = -1;
return newEntity;
}
public ItemStack[] getTopItemStacks()
{
return topStacks;
@ -413,8 +430,8 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
{
if (l != type.ordinal())
{
worldObj.setTileEntity(xCoord, yCoord, zCoord, IronChestType.makeEntity(l));
return (TileEntityIronChest) worldObj.getTileEntity(xCoord, yCoord, zCoord);
worldObj.setTileEntity(pos, IronChestType.makeEntity(l));
return (TileEntityIronChest) worldObj.getTileEntity(pos);
}
}
return this;
@ -423,59 +440,83 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
@Override
public Packet getDescriptionPacket()
{
return PacketHandler.getPacket(this);
NBTTagCompound nbt = new NBTTagCompound();
nbt.setInteger("type", getType().ordinal());
nbt.setByte("facing", facing);
ItemStack[] stacks = buildItemStackDataList();
if (stacks != null)
{
NBTTagList nbttaglist = new NBTTagList();
for (int i = 0; i < stacks.length; i++)
{
if (stacks[i] != null)
{
NBTTagCompound nbttagcompound1 = new NBTTagCompound();
nbttagcompound1.setByte("Slot", (byte) i);
stacks[i].writeToNBT(nbttagcompound1);
nbttaglist.appendTag(nbttagcompound1);
}
}
nbt.setTag("stacks", nbttaglist);
}
public void handlePacketData(int typeData, int[] intData)
{
TileEntityIronChest chest = this;
if (this.type.ordinal() != typeData)
{
chest = updateFromMetadata(typeData);
return new S35PacketUpdateTileEntity(pos, 0, nbt);
}
if (IronChestType.values()[typeData].isTransparent() && intData != null)
@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt)
{
if (pkt.getTileEntityType() == 0)
{
NBTTagCompound nbt = pkt.getNbtCompound();
type = IronChestType.values()[nbt.getInteger("type")];
facing = nbt.getByte("facing");
NBTTagList tagList = nbt.getTagList("stacks", Constants.NBT.TAG_COMPOUND);
ItemStack[] stacks = new ItemStack[topStacks.length];
for (int i = 0; i < stacks.length; i++)
{
NBTTagCompound nbt1 = tagList.getCompoundTagAt(i);
int j = nbt1.getByte("Slot") & 0xff;
if (j >= 0 && j < stacks.length)
{
stacks[j] = ItemStack.loadItemStackFromNBT(nbt1);
}
}
if (type.isTransparent() && stacks != null)
{
int pos = 0;
if (intData.length < chest.topStacks.length * 3)
for (int i = 0; i < topStacks.length; i++)
{
return;
if (stacks[pos] != null)
{
topStacks[i] = stacks[pos];
} else
{
topStacks[i] = null;
}
for (int i = 0; i < chest.topStacks.length; i++)
{
if (intData[pos + 2] != 0)
{
Item it = Item.getItemById(intData[pos]);
ItemStack is = new ItemStack(it, intData[pos + 2], intData[pos + 1]);
chest.topStacks[i] = is;
pos++;
}
else
{
chest.topStacks[i] = null;
}
pos += 3;
}
}
}
public int[] buildIntDataList()
public ItemStack[] buildItemStackDataList()
{
if (type.isTransparent())
{
int[] sortList = new int[topStacks.length * 3];
ItemStack[] sortList = new ItemStack[topStacks.length];
int pos = 0;
for (ItemStack is : topStacks)
{
if (is != null)
{
sortList[pos++] = Item.getIdFromItem(is.getItem());
sortList[pos++] = is.getItemDamage();
sortList[pos++] = is.stackSize;
}
else
sortList[pos++] = is;
} else
{
sortList[pos++] = 0;
sortList[pos++] = 0;
sortList[pos++] = 0;
sortList[pos++] = null;
}
}
return sortList;
@ -491,34 +532,27 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
ItemStack var2 = this.chestContents[par1];
this.chestContents[par1] = null;
return var2;
}
else
} else
{
return null;
}
}
public void setMaxStackSize(int size)
{
}
@Override
public boolean isItemValidForSlot(int i, ItemStack itemstack)
{
return type.acceptsStack(itemstack);
}
@Override
public boolean hasCustomInventoryName()
public void rotateAround()
{
return false;
facing++;
if (facing > EnumFacing.EAST.ordinal())
{
facing = (byte) EnumFacing.NORTH.ordinal();
}
void rotateAround(ForgeDirection axis)
{
setFacing((byte)ForgeDirection.getOrientation(facing).getRotation(axis).ordinal());
worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, IronChest.ironChestBlock, 2, getFacing());
setFacing(facing);
worldObj.addBlockEvent(pos, IronChest.ironChestBlock, 2, facing);
}
public void wasPlaced(EntityLivingBase entityliving, ItemStack itemStack)
@ -527,6 +561,49 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
public void removeAdornments()
{
}
@Override
public int getField(int id)
{
return 0;
}
@Override
public void setField(int id, int value)
{
}
@Override
public int getFieldCount()
{
return 0;
}
@Override
public void clear()
{
for (int i = 0; i < this.chestContents.length; ++i)
{
this.chestContents[i] = null;
}
}
@Override
public Container createContainer(InventoryPlayer playerInventory, EntityPlayer player)
{
return null;
}
@Override
public String getGuiID()
{
return "IronChest:" + type.name();
}
@Override
public boolean canRenderBreaking()
{
return true;
}
}

View File

View File

0
src/main/java/cpw/mods/ironchest/ValidatingSlot.java Normal file → Executable file
View File

3
src/main/java/cpw/mods/ironchest/Version.java Normal file → Executable file
View File

@ -8,7 +8,8 @@ package cpw.mods.ironchest;
import java.util.Properties;
public class Version {
public class Version
{
private static String major;
private static String minor;
private static String rev;

View File

@ -10,21 +10,39 @@
******************************************************************************/
package cpw.mods.ironchest.client;
import net.minecraft.client.renderer.tileentity.TileEntityRendererChestHelper;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.ItemModelMesher;
import net.minecraft.client.resources.model.ModelBakery;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.client.registry.ClientRegistry;
import net.minecraftforge.fml.client.FMLClientHandler;
import net.minecraftforge.fml.client.registry.ClientRegistry;
import cpw.mods.ironchest.CommonProxy;
import cpw.mods.ironchest.IronChest;
import cpw.mods.ironchest.IronChestType;
import cpw.mods.ironchest.TileEntityIronChest;
public class ClientProxy extends CommonProxy {
public class ClientProxy extends CommonProxy
{
@Override
public void registerRenderInformation()
{
TileEntityRendererChestHelper.instance = new IronChestRenderHelper();
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getModelManager().getBlockModelShapes().registerBuiltInBlocks(IronChest.ironChestBlock);
ItemModelMesher mesher = Minecraft.getMinecraft().getRenderItem().getItemModelMesher();
for (IronChestType chestType : IronChestType.values())
{
if (chestType != IronChestType.WOOD)
{
Item chestItem = Item.getItemFromBlock(IronChest.ironChestBlock);
mesher.register(chestItem, chestType.ordinal(), new ModelResourceLocation("ironchest:chest_" + chestType.getName().toLowerCase(), "inventory"));
ModelBakery.addVariantName(chestItem, "ironchest:chest_" + chestType.getName().toLowerCase());
}
}
}
@Override
@ -42,12 +60,11 @@ public class ClientProxy extends CommonProxy {
@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
{
TileEntity te = world.getTileEntity(x, y, z);
TileEntity te = world.getTileEntity(new BlockPos(x, y, z));
if (te != null && te instanceof TileEntityIronChest)
{
return GUIChest.GUI.buildGUI(IronChestType.values()[ID], player.inventory, (TileEntityIronChest) te);
}
else
} else
{
return null;
}

0
src/main/java/cpw/mods/ironchest/client/GUIChest.java Normal file → Executable file
View File

View File

@ -1,45 +0,0 @@
/*******************************************************************************
* 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 java.util.Map;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.tileentity.TileEntityRendererChestHelper;
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import com.google.common.collect.Maps;
import cpw.mods.ironchest.IronChest;
import cpw.mods.ironchest.IronChestType;
import cpw.mods.ironchest.TileEntityIronChest;
public class IronChestRenderHelper extends TileEntityRendererChestHelper {
private Map<Integer, TileEntityIronChest> itemRenders = Maps.newHashMap();
public IronChestRenderHelper()
{
for (IronChestType typ : IronChestType.values())
{
itemRenders.put(typ.ordinal(), (TileEntityIronChest) IronChest.ironChestBlock.createTileEntity(null, typ.ordinal()));
}
}
@Override
public void renderChest(Block block, int i, float f)
{
if (block == IronChest.ironChestBlock)
{
TileEntityRendererDispatcher.instance.renderTileEntityAt(itemRenders.get(i), 0.0D, 0.0D, 0.0D, 0.0F);
}
else
{
super.renderChest(block, i, f);
}
}
}

View File

@ -0,0 +1,44 @@
/*******************************************************************************
* 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 net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.ItemModelMesher;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class ModelHelper
{
public static void registerItem(Item item, int metadata, String itemName)
{
ItemModelMesher mesher = Minecraft.getMinecraft().getRenderItem().getItemModelMesher();
mesher.register(item, metadata, new ModelResourceLocation(itemName, "inventory"));
}
public static void registerBlock(Block block, int metadata, String blockName)
{
registerItem(Item.getItemFromBlock(block), metadata, blockName);
}
public static void registerBlock(Block block, String blockName)
{
registerBlock(block, 0, blockName);
}
public static void registerItem(Item item, String itemName)
{
registerItem(item, 0, itemName);
}
}

View File

@ -10,38 +10,33 @@
******************************************************************************/
package cpw.mods.ironchest.client;
import static org.lwjgl.opengl.GL11.glColor4f;
import static org.lwjgl.opengl.GL11.glDisable;
import static org.lwjgl.opengl.GL11.glEnable;
import static org.lwjgl.opengl.GL11.glPopMatrix;
import static org.lwjgl.opengl.GL11.glPushMatrix;
import static org.lwjgl.opengl.GL11.glRotatef;
import static org.lwjgl.opengl.GL11.glScalef;
import static org.lwjgl.opengl.GL11.glTranslatef;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelChest;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.entity.RenderEntityItem;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableMap.Builder;
import com.google.common.primitives.SignedBytes;
import cpw.mods.ironchest.BlockIronChest;
import cpw.mods.ironchest.IronChest;
import cpw.mods.ironchest.IronChestType;
import cpw.mods.ironchest.MappableItemStackWrapper;
import cpw.mods.ironchest.TileEntityIronChest;
public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer {
@SuppressWarnings("unused")
private static Map<MappableItemStackWrapper, Integer> renderList = new HashMap<MappableItemStackWrapper, Integer>();
public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer
{
private static Map<IronChestType, ResourceLocation> locations;
static {
Builder<IronChestType, ResourceLocation> builder = ImmutableMap.<IronChestType,ResourceLocation>builder();
for (IronChestType typ : IronChestType.values()) {
@ -49,12 +44,10 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer {
}
locations = builder.build();
}
private Random random;
@SuppressWarnings("unused")
private RenderBlocks renderBlocks;
private RenderItem itemRenderer;
private RenderEntityItem itemRenderer;
private ModelChest model;
private static float[][] shifts = { { 0.3F, 0.45F, 0.3F }, { 0.7F, 0.45F, 0.3F }, { 0.3F, 0.45F, 0.7F }, { 0.7F, 0.45F, 0.7F }, { 0.3F, 0.1F, 0.3F },
{ 0.7F, 0.1F, 0.3F }, { 0.3F, 0.1F, 0.7F }, { 0.7F, 0.1F, 0.7F }, { 0.5F, 0.32F, 0.5F }, };
@ -63,17 +56,12 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer {
{
model = new ModelChest();
random = new Random();
renderBlocks = new RenderBlocks();
itemRenderer = new RenderItem() {
itemRenderer = new RenderEntityItem(Minecraft.getMinecraft().getRenderManager(), Minecraft.getMinecraft().getRenderItem()){
@Override
public byte getMiniBlockCount(ItemStack stack, byte original) {
public int func_177078_a(ItemStack stack) {
return SignedBytes.saturatedCast(Math.min(stack.stackSize / 32, 15) + 1);
}
@Override
public byte getMiniItemCount(ItemStack stack, byte original) {
return SignedBytes.saturatedCast(Math.min(stack.stackSize / 32, 7) + 1);
}
@Override
public boolean shouldBob() {
return false;
}
@ -82,28 +70,40 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer {
return false;
}
};
itemRenderer.setRenderManager(RenderManager.instance);
}
public void render(TileEntityIronChest tile, double x, double y, double z, float partialTick) {
public void render(TileEntityIronChest tile, double x, double y, double z, float partialTick, int breakStage)
{
if (tile == null) {
return;
}
int facing = 3;
IronChestType type = tile.getType();
if (tile != null && tile.hasWorldObj()) {
if (tile != null && tile.hasWorldObj() && tile.getWorld().getBlockState(tile.getPos()).getBlock() == IronChest.ironChestBlock) {
facing = tile.getFacing();
type = tile.getType();
int typ = tile.getWorldObj().getBlockMetadata(tile.xCoord, tile.yCoord, tile.zCoord);
type = IronChestType.values()[typ];
IBlockState state = tile.getWorld().getBlockState(tile.getPos());
type = (IronChestType)state.getValue(BlockIronChest.VARIANT_PROP);
}
if (breakStage >= 0)
{
bindTexture(DESTROY_STAGES[breakStage]);
GlStateManager.matrixMode(5890);
GlStateManager.pushMatrix();
GlStateManager.scale(4.0F, 4.0F, 1.0F);
GlStateManager.translate(0.0625F, 0.0625F, 0.0625F);
GlStateManager.matrixMode(5888);
} else
bindTexture(locations.get(type));
glPushMatrix();
glEnable(32826 /* GL_RESCALE_NORMAL_EXT */);
glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
glTranslatef((float) x, (float) y + 1.0F, (float) z + 1.0F);
glScalef(1.0F, -1F, -1F);
glTranslatef(0.5F, 0.5F, 0.5F);
GlStateManager.pushMatrix();
if(type == IronChestType.CRYSTAL)
GlStateManager.disableCull();
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.translate((float) x, (float) y + 1.0F, (float) z + 1.0F);
GlStateManager.scale(1.0F, -1F, -1F);
GlStateManager.translate(0.5F, 0.5F, 0.5F);
int k = 0;
if (facing == 2) {
k = 180;
@ -117,18 +117,26 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer {
if (facing == 5) {
k = -90;
}
glRotatef(k, 0.0F, 1.0F, 0.0F);
glTranslatef(-0.5F, -0.5F, -0.5F);
GlStateManager.rotate(k, 0.0F, 1.0F, 0.0F);
GlStateManager.translate(-0.5F, -0.5F, -0.5F);
float lidangle = tile.prevLidAngle + (tile.lidAngle - tile.prevLidAngle) * partialTick;
lidangle = 1.0F - lidangle;
lidangle = 1.0F - lidangle * lidangle * lidangle;
model.chestLid.rotateAngleX = -((lidangle * 3.141593F) / 2.0F);
// Render the chest itself
model.renderAll();
glDisable(32826 /* GL_RESCALE_NORMAL_EXT */);
glPopMatrix();
glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
if (type.isTransparent() && tile.getDistanceFrom(this.field_147501_a.field_147560_j, this.field_147501_a.field_147561_k, this.field_147501_a.field_147558_l) < 128d) {
if (breakStage >= 0)
{
GlStateManager.matrixMode(5890);
GlStateManager.popMatrix();
GlStateManager.matrixMode(5888);
}
if(type == IronChestType.CRYSTAL)
GlStateManager.enableCull();
GlStateManager.popMatrix();
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
if (type.isTransparent() && tile.getDistanceSq(this.rendererDispatcher.entityX, this.rendererDispatcher.entityY, this.rendererDispatcher.entityZ) < 128d) {
random.setSeed(254L);
float shiftX;
float shiftY;
@ -140,10 +148,9 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer {
shift = 8;
blockScale = 0.85F;
}
glPushMatrix();
glDisable(2896 /* GL_LIGHTING */);
glTranslatef((float) x, (float) y, (float) z);
EntityItem customitem = new EntityItem(field_147501_a.field_147550_f);
GlStateManager.pushMatrix();
GlStateManager.translate((float) x, (float) y, (float) z);
EntityItem customitem = new EntityItem(this.getWorld());
customitem.hoverStart = 0f;
for (ItemStack item : tile.getTopItemStacks()) {
if (shift > shifts.length) {
@ -157,25 +164,21 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer {
shiftY = shifts[shift][1];
shiftZ = shifts[shift][2];
shift++;
glPushMatrix();
glTranslatef(shiftX, shiftY, shiftZ);
glRotatef(timeD, 0.0F, 1.0F, 0.0F);
glScalef(blockScale, blockScale, blockScale);
GlStateManager.pushMatrix();
GlStateManager.translate(shiftX, shiftY, shiftZ);
GlStateManager.rotate(timeD, 0.0F, 1.0F, 0.0F);
GlStateManager.scale(blockScale, blockScale, blockScale);
customitem.setEntityItemStack(item);
itemRenderer.doRender(customitem, 0, 0, 0, 0, 0);
glPopMatrix();
GlStateManager.popMatrix();
}
glEnable(2896 /* GL_LIGHTING */);
glPopMatrix();
glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.popMatrix();
}
}
@Override
public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float partialTick)
public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float partialTick, int breakStage)
{
render((TileEntityIronChest) tileentity, x, y, z, partialTick);
render((TileEntityIronChest) tileentity, x, y, z, partialTick, breakStage);
}
private ModelChest model;
}

0
src/main/resources/assets/ironchest/lang/cs_CZ.lang Normal file → Executable file
View File

0
src/main/resources/assets/ironchest/lang/da_DK.lang Normal file → Executable file
View File

8
src/main/resources/assets/ironchest/lang/de_DE.lang Normal file → Executable file
View File

@ -5,6 +5,7 @@ tile.ironchest:COPPER.name=Kupfertruhe
tile.ironchest:SILVER.name=Silbertruhe
tile.ironchest:CRYSTAL.name=Kristalltruhe
tile.ironchest:OBSIDIAN.name=Obsidiantruhe
tile.ironchest:DIRTCHEST9000.name=DirtChest 9000!
item.ironchest:IRONGOLD.name=Eisen-zu-Goldtruhen-Upgrade
item.ironchest:GOLDDIAMOND.name=Gold-zu-Diamanttruhen-Upgrade
@ -15,3 +16,10 @@ item.ironchest:DIAMONDCRYSTAL.name=Diamant-zu-Kristalltruhen-Upgrade
item.ironchest:WOODIRON.name=Holz-zu-Eisentruhen-Upgrade
item.ironchest:WOODCOPPER.name=Holz-zu-Kupfertruhen-Upgrade
item.ironchest:DIAMONDOBSIDIAN.name=Diamant-zu-Obsidiantruhen-Upgrade
book.ironchest:dirtchest9000.title=Wie du deine neue DirtChest 9000 nutzt!
book.ironchest:dirtchest9000.page1=Willkommen zu Ihrer neuen DirtChest 9000! Wir hoffen, dass Sie viele freudige Jahre genießen werden, wenn Sie Ihre Erd-Stacks in unserem nützlichen Speichergerät lagern.
book.ironchest:dirtchest9000.page2=Nutzung: Werfen Sie einfach den Erd-Stack Ihrer Wahl in den äußerst rezeptiven Slot und genießen Sie die Annehmlichkeit, diese Erde für Sie verfügbar zu haben, jedes mal, wenn Sie diese Truhe passieren!
book.ironchest:dirtchest9000.page3=Wir hoffen, Sie haben das Durchgehen dieser Bedienungsanleitung genossen, und hoffen, dass sie sich weiterhin entscheiden werden, in Zukunft unsere Produkte zu nutzen! Mit freundlichen Grüßen, Die DirtChest 9000 manual writers incorporated.
book.ironchest:dirtchest9000.page4=Garantie: Dieses Produkt hat keine Garantie jeglicher Sorte. Ihre Erde könnte nicht gespeichert werden, er könnte langsam in die Umwelt gesaugt werden, oder stattdessen könnte das Produkt gar nichts machen.
book.ironchest:dirtchest9000.page5=DirtChest 9000 ist freundlich zur Umwelt. Bitte entsorgen Sie diesen Guide verantwortungsbewusst, und tun sie nicht, was Sie immer tun und schmeißen ihn in irgendwelche Lava. Wir würden sehr traurig sein.

View File

@ -0,0 +1,17 @@
tile.ironchest:IRON.name=Σιδερένιο Σεντούκι
tile.ironchest:GOLD.name=Χρυσό Σεντούκι
tile.ironchest:DIAMOND.name=Διαμαντένιο Σεντούκι
tile.ironchest:COPPER.name=Χάλκινο Σεντούκι
tile.ironchest:SILVER.name=Ασημένιο Σεντούκι
tile.ironchest:CRYSTAL.name=Κρυστάλλινο Σεντούκι
tile.ironchest:OBSIDIAN.name=Σεντούκι Οψιδιανού
item.ironchest:IRONGOLD.name=Αναβάθμιση από Σιδερένιο σε Χρυσό Σεντούκι
item.ironchest:GOLDDIAMOND.name=Αναβάθμιση από Χρυσό σε Διαμαντένιο Σεντούκι
item.ironchest:COPPERSILVER.name=Αναβάθμιση από Χάλκινο σε Ασημένιο Σεντούκι
item.ironchest:SILVERGOLD.name=Αναβάθμιση από Ασημένιο σε Χρυσό Σεντούκι
item.ironchest:COPPERIRON.name=Αναβάθμιση από Χάλκινο σε Σιδερένιο Σεντούκι
item.ironchest:DIAMONDCRYSTAL.name=Αναβάθμιση από Διαμαντένιο σε Κρυστάλλινο Σεντούκι
item.ironchest:WOODIRON.name=Αναβάθμιση από Ξύλινο σε Σιδερένιο Σεντούκι
item.ironchest:WOODCOPPER.name=Αναβάθμιση από Ξύλινο σε Χάλκινο Σεντούκι
item.ironchest:DIAMONDOBSIDIAN.name=Αναβάθμιση από Διαμαντένιο σε Σεντούκι Οψιδιανού

View File

@ -0,0 +1,25 @@
tile.ironchest:IRON.name=Steel Coffer
tile.ironchest:GOLD.name=Gold Coffer
tile.ironchest:DIAMOND.name=Diamond Coffer
tile.ironchest:COPPER.name=Copper Coffer
tile.ironchest:SILVER.name=Silver Coffer
tile.ironchest:CRYSTAL.name=Shinin' Coffer
tile.ironchest:OBSIDIAN.name=Coffer o' tears
tile.ironchest:DIRTCHEST9000.name=FilthCoffer 9000!
item.ironchest:IRONGOLD.name=Steel to Gold Coffer Upgradin'
item.ironchest:GOLDDIAMOND.name=Gold to Diamond Coffer Upgradin'
item.ironchest:COPPERSILVER.name=Copper to Silver Coffer Upgradin'
item.ironchest:SILVERGOLD.name=Silver to Gold Coffer Upgradin'
item.ironchest:COPPERIRON.name=Copper to Steel Coffer Upgradin'
item.ironchest:DIAMONDCRYSTAL.name=Diamond to Shinin' Coffer Upgradin'
item.ironchest:WOODIRON.name=Timber to Steel Coffer Upgradin'
item.ironchest:WOODCOPPER.name=Wood to Copper Coffer Upgradin'
item.ironchest:DIAMONDOBSIDIAN.name=Diamond to Coffer o' Tears Upgradin'
book.ironchest:dirtchest9000.title=How to use yer FilthCoffer 9000!
book.ironchest:dirtchest9000.page1=Welcome to yer new FilthCoffer 9000! We hope ye will enjoy many happy years of storing yer filth wit yer coffer .
book.ironchest:dirtchest9000.page2=Usage: simply put yer filth in yer slot and yer got yerself some filth any time ye need it!
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: We can't keep yer filth from pirates. Yer filth may not be stored, it may slowly return to yer world, or it may stay in yer coffer.
book.ironchest:dirtchest9000.page5=FilthCoffer 9000 is kind to yer voyage. Throw yer paper in a coffer near by wit yer booty, and don't just chuck it into some molten rock. We wouldn't be the happiest o' pirates.

0
src/main/resources/assets/ironchest/lang/en_US.lang Normal file → Executable file
View File

0
src/main/resources/assets/ironchest/lang/es_ES.lang Normal file → Executable file
View File

View File

@ -0,0 +1,18 @@
tile.ironchest:IRON.name=Raudkirst
tile.ironchest:GOLD.name=Kuldkirst
tile.ironchest:DIAMOND.name=Teemantkirst
tile.ironchest:COPPER.name=Vaskkirst
tile.ironchest:SILVER.name=Hõbekirst
tile.ironchest:CRYSTAL.name=Kristallkirst
tile.ironchest:OBSIDIAN.name=Obsidiaankirst
tile.ironchest:DIRTCHEST9000.name=Muldkirst 9000!
item.ironchest:IRONGOLD.name=Raudkirst kuld kirstuks
item.ironchest:GOLDDIAMOND.name=Kuldkirst teemandist kirstuks
item.ironchest:COPPERSILVER.name=Vaskkirst hõbedast kirstuks
item.ironchest:SILVERGOLD.name=Hõbekirst kullast kirstuks
item.ironchest:COPPERIRON.name=Vaskkirst rauast kirstuks
item.ironchest:DIAMONDCRYSTAL.name=Teemantkirst kristallist kirstuks
item.ironchest:WOODIRON.name=Puukirst rauast kirstuks
item.ironchest:WOODCOPPER.name=Puukirst vasest kirstuks
item.ironchest:DIAMONDOBSIDIAN.name=Teemantkirst obsidiaanist kirstuks

16
src/main/resources/assets/ironchest/lang/fr_FR.lang Normal file → Executable file
View File

@ -1,12 +1,12 @@
#fr_FR translated by robin4002
tile.ironchest:IRON.name=Coffre en fer
tile.ironchest:GOLD.name=Coffre en or
tile.ironchest:DIAMOND.name=Coffre en diamant
tile.ironchest:COPPER.name=Coffre en cuivre
tile.ironchest:SILVER.name=Coffre en argent
tile.ironchest:CRYSTAL.name=Coffre en cristal
tile.ironchest:OBSIDIAN.name=Coffre en obsidian
tile.ironchest:IRON.name=Coffre en Fer
tile.ironchest:GOLD.name=Coffre en Or
tile.ironchest:DIAMOND.name=Coffre en Diamant
tile.ironchest:COPPER.name=Coffre en Cuivre
tile.ironchest:SILVER.name=Coffre en Argent
tile.ironchest:CRYSTAL.name=Coffre en Cristal
tile.ironchest:OBSIDIAN.name=Coffre en Obsidienne
item.ironchest:IRONGOLD.name=Amélioration de coffre en fer à or
item.ironchest:GOLDDIAMOND.name=Amélioration de coffre en or à diamant
@ -16,4 +16,4 @@ item.ironchest:COPPERIRON.name=Amélioration de coffre en cuivre à fer
item.ironchest:DIAMONDCRYSTAL.name=Amélioration de coffre en diamant à crital
item.ironchest:WOODIRON.name=Amélioration de coffre en bois à fer
item.ironchest:WOODCOPPER.name=Amélioration de coffre en bois à cuivre
item.ironchest:DIAMONDOBSIDIAN.name=Amélioration de coffre en diamant à obsidian
item.ironchest:DIAMONDOBSIDIAN.name=Amélioration de coffre en diamant à obsidienne

View File

@ -0,0 +1,25 @@
tile.ironchest:IRON.name=Baule di ferro
tile.ironchest:GOLD.name=Baule d'oro
tile.ironchest:DIAMOND.name=Baule di diamante
tile.ironchest:COPPER.name=Baule di rame
tile.ironchest:SILVER.name=Baule d'argento
tile.ironchest:CRYSTAL.name=Baule di cristallo
tile.ironchest:OBSIDIAN.name=Baule di ossidiana
tile.ironchest:DIRTCHEST9000.name=DirtChest 9000!
item.ironchest:IRONGOLD.name=Potenziamento da ferro a oro
item.ironchest:GOLDDIAMOND.name=Potenziamento da oro a diamante
item.ironchest:COPPERSILVER.name=Potenziamento da rame a argento
item.ironchest:SILVERGOLD.name=Potenziamento da argento a oro
item.ironchest:COPPERIRON.name=Potenziamento da rame a ferro
item.ironchest:DIAMONDCRYSTAL.name=Potenziamento da diamante a cristallo
item.ironchest:WOODIRON.name=Potenziamento da legno a ferro
item.ironchest:WOODCOPPER.name=Potenziamento da legno a rame
item.ironchest:DIAMONDOBSIDIAN.name=Potenziamento da diamante a ossidiana
book.ironchest:dirtchest9000.title=Come usare la tua DirtChest 9000!
book.ironchest:dirtchest9000.page1=Benvenuto alla tua nuova DirtChest 9000! Speriamo che possiate godere di molti anni felici in cui imagazzinate grandi quantità di terra nei nostri contenitori.
book.ironchest:dirtchest9000.page2=Uso: inserisci uno stack di terra nello slot e goditi la grande convenienza di avere della terra a tua disposizione ogni volta che passi vicino alla cassa!
book.ironchest:dirtchest9000.page3=Speriamo che questo manuale vi sia stato utile, e speriamo che prenderete in considerazione usare i nostri prodotti in futuro ! I migliori saluti, i scrittori del manuale per la DirtChest 9000.
book.ironchest:dirtchest9000.page4=Garanzia: Questo prodotto non ha nessuna garanzia di alcun tipo. La tua terra potrebbe non essere imagazzinata, potrebbe lentamente fuoriuscire nell'ambiente, oppure, non farà niente.
book.ironchest:dirtchest9000.page5=La DirtChest 9000 è amico dell'ambiente. Per favore conservate questo libro in un modo responsabile, e non buttatelo nella lava come un oggetto qualsiasi. Saremmo veramente tristi.

View File

@ -0,0 +1,25 @@
tile.ironchest:IRON.name=철 상자
tile.ironchest:GOLD.name=금 상자
tile.ironchest:DIAMOND.name=다이아몬드 상자
tile.ironchest:COPPER.name=구리 상자
tile.ironchest:SILVER.name=은 상자
tile.ironchest:CRYSTAL.name=수정 상자
tile.ironchest:OBSIDIAN.name=흑요석 상자
tile.ironchest:DIRTCHEST9000.name=흙 상자 9000!
item.ironchest:IRONGOLD.name=철 상자를 금 상자로 업그레이드
item.ironchest:GOLDDIAMOND.name=금 상자를 다이아몬드 상자로 업그레이드
item.ironchest:COPPERSILVER.name=구리 상자를 은 상자로 업그레이드
item.ironchest:SILVERGOLD.name=은 상자를 금 상자로 업그레이드
item.ironchest:COPPERIRON.name=구리 상자를 철 상자로 업그레이드
item.ironchest:DIAMONDCRYSTAL.name=다이아몬드 상자를 수정 상자로 업그레이드
item.ironchest:WOODIRON.name=나무 상자를 철 상자로 업그레이드
item.ironchest:WOODCOPPER.name=나무 상자를 구리 상자로 업그레이드
item.ironchest:DIAMONDOBSIDIAN.name=다이아몬드 상자를 흑요석 상자로 업그레이드
book.ironchest:dirtchest9000.title=흙 상자 9000을 사용하는 방법!
book.ironchest:dirtchest9000.page1=새로운 흙 상자 9000을 사용하게 되신 것을 환영합니다! 우리는 당신이 이 저장 도구에서 흙들을 많은 해 동안 행복하게 저장하기를 기원합니다.
사용법: 단순히 흙 뭉치들을 아이템 슬롯에 넣고 이 상자를 지나갈 때마다 언제나 당신에게 제공되어지는 흙들의 편리함을 누리세요!
book.ironchest:dirtchest9000.page3=우리는 당신이 이 사용설명서를 즐겁게 읽었고, 나중에 이 제품을 사용하기를 바랍니다! 흙 상자 9000 매뉴얼
book.ironchest:dirtchest9000.page4=주의: 이 제품에는 어떤 종류의 보증도 하지 않습니다 당신의 흙들은 저장되지 않을 수도 있습니다. 그러면 이 흙 상자는 천천히 환경 속으로 돌아가거나, 혹은 아무것도 하지 않을 것입니다.
book.ironchest:dirtchest9000.page5=흙 상자 9000은 환경 친화적입니다. 가이드북의 처분에는 책임이 따릅니다, 그러니 어떠한 경우라도 용암에 버리지 마세요. 우리는 매우 슬플 것입니다.

View File

@ -0,0 +1,25 @@
tile.ironchest:IRON.name=Jernkiste
tile.ironchest:GOLD.name=Gullkiste
tile.ironchest:DIAMOND.name=Diamantkiste
tile.ironchest:COPPER.name=Kobberkiste
tile.ironchest:SILVER.name=Sølvkiste
tile.ironchest:CRYSTAL.name=Krystallkiste
tile.ironchest:OBSIDIAN.name=Obsidiankiste
tile.ironchest:DIRTCHEST9000.name=JordKiste 9000!
item.ironchest:IRONGOLD.name=Jern til Gull Kisteoppgradering
item.ironchest:GOLDDIAMOND.name=Gull til Diamant Kisteoppgradering
item.ironchest:COPPERSILVER.name=Kobber til Sølv Kisteoppgradering
item.ironchest:SILVERGOLD.name=Sølv til Gull Kisteoppgradering
item.ironchest:COPPERIRON.name=Kobber til Jern Kisteoppgradering
item.ironchest:DIAMONDCRYSTAL.name=Diamant til Krystall Kisteoppgradering
item.ironchest:WOODIRON.name=Tre til Jern Kisteoppgradering
item.ironchest:WOODCOPPER.name=Tre til Kobber Kisteoppgradering
item.ironchest:DIAMONDOBSIDIAN.name=Diamant til Obsidian Kisteoppgradering
book.ironchest:dirtchest9000.title=Hvordan bruker din JordKiste 9000!
book.ironchest:dirtchest9000.page1=Velkommen til din nye JordKiste9000! Vi håper du vil nyte mange lykkelige år med lagring av din stabel av jord i vå lager verktøy.
book.ironchest:dirtchest9000.page2=Bruk: bare å sette bunken med jord av ditt valg i den svært mottakelige sporet og nyte den store fordelen med åa den jorden tilgjengelig for deg, nådu passerer denne kisten!
book.ironchest:dirtchest9000.page3=Vi håper du har hatt en god fornøyelse gjennom denne bruksanvisningen, og hår du vil vurdere å bruke vå produkter i fremtiden! Vennlig hilsen, JordKiste9000 manual forfattere innarbeidet.
book.ironchest:dirtchest9000.page4=Garanti: Dette produktet har ingen garantier av noe slag. Din jord kan ikke lagres, det kan sakte lekke ut i miljøet, eller alternativt, kan det ikke gjøre noe i det hele tatt.
book.ironchest:dirtchest9000.page5=JordKiste 9000 er snill mot miljøet. Vennligst ta hånd om denne veileder boken ansvarlig, og hva du enn gjør ikke kast den inn i noe lav. Vi ville bli veldig trist.

View File

@ -0,0 +1,25 @@
tile.ironchest:IRON.name=Ijzeren Kist
tile.ironchest:GOLD.name=Gouden Kist
tile.ironchest:DIAMOND.name=Diamanten Kist
tile.ironchest:COPPER.name=Koperen Kist
tile.ironchest:SILVER.name=Zilveren Kist
tile.ironchest:CRYSTAL.name=Kristallen Kist
tile.ironchest:OBSIDIAN.name=Obsidiaanen Kist
tile.ironchest:DIRTCHEST9000.name=Aarden Kist 9000!
item.ironchest:IRONGOLD.name=Ijzeren naar Gouden Kist Transformatie
item.ironchest:GOLDDIAMOND.name=Gouden naar Diamanten Kist Transformatie
item.ironchest:COPPERSILVER.name=Koperen naar Zilveren Kist Transformatie
item.ironchest:SILVERGOLD.name=Zilveren naar Gouden Kist Transformatie
item.ironchest:COPPERIRON.name=Koperen naar Ijzeren Kist Transformatie
item.ironchest:DIAMONDCRYSTAL.name=Diamanten naar Kristallen Kist Transformatie
item.ironchest:WOODIRON.name=Houten naar Ijzeren Kist Transformatie
item.ironchest:WOODCOPPER.name=Houten naar Koperen Kist Transformatie
item.ironchest:DIAMONDOBSIDIAN.name=Diamanten naar Obsidiaanen Kist Transformatie
book.ironchest:dirtchest9000.title=Hoe gebruik je uw Aarden Kist 9000!
book.ironchest:dirtchest9000.page1=Welkom voor uw nieuwe Aarden Kist 9000! We hopen dat je veel geluk zal beleven om uw hoop aarde te bewaren in onze stokeer faciliteit.
book.ironchest:dirtchest9000.page2=Gebruik: Plaats simpelweg uw hoop aarde naar uw keuze in de zeer ontvankelijke gleuf en geniet van de geriefelijkheid om dat hoop aarde altijd beschikbaar tot u te hebben, wanneer dan ook!
book.ironchest:dirtchest9000.page3=We hopen dat u heeft genoten om deze handleiding te lezen en we hopen dat u overweegt om onze producten in de toekomst te gebruiken! Met vriendelijke groeten, De Aarden Kist 9000 Handleiding Auteurs.
book.ironchest:dirtchest9000.page4=Garantie: Deze product biedt geen enkele garantie. Uw aarde kan mogenlijk niet gestockeerd worden, het kan langzaam verdampen of het kan ook helemaal niks doen.
book.ironchest:dirtchest9000.page5=Aarden Kist 9000 is mileuvriendelijk. Gelieve deze handleiding verantwoordlijk te ontdoen en gooi het niet zomaar in wat lava. We zouden zeer verdrietig zijn.

0
src/main/resources/assets/ironchest/lang/pl_PL.lang Normal file → Executable file
View File

View File

@ -0,0 +1,25 @@
tile.ironchest:IRON.name=Baú de Ferro
tile.ironchest:GOLD.name=Baú de Ouro
tile.ironchest:DIAMOND.name=Baú de Diamante
tile.ironchest:COPPER.name=Baú de Cobre
tile.ironchest:SILVER.name=Baú de Prata
tile.ironchest:CRYSTAL.name=Baú de Cristal
tile.ironchest:OBSIDIAN.name=Baú de Obsidiana
tile.ironchest:DIRTCHEST9000.name=BaúDeSujeira 9000!
item.ironchest:IRONGOLD.name=Aprimoramento de Baú de Ferro para Ouro
item.ironchest:GOLDDIAMOND.name=Aprimoramento de Baú de Ouro para Diamante
item.ironchest:COPPERSILVER.name=Aprimoramento de Baú de Cobre para Prata
item.ironchest:SILVERGOLD.name=Aprimoramento de Baú de Prata para Ouro
item.ironchest:COPPERIRON.name=Aprimoramento de Baú de Cobre para Ferro
item.ironchest:DIAMONDCRYSTAL.name=Aprimoramento de Baú de Diamante para Cristal
item.ironchest:WOODIRON.name=Aprimoramento de Baú de Madeira para Ferro
item.ironchest:WOODCOPPER.name=Aprimoramento de Baú de Madeira para Cobre
item.ironchest:DIAMONDOBSIDIAN.name=Aprimoramento de Baú de Diamante para Obsidiana
book.ironchest:dirtchest9000.title=Como utilizar seu BaúDeSujeira 9000!
book.ironchest:dirtchest9000.page1=Bem-vindo ao seu novo BaúDeSujeira 9000! Esperamos que desfrute de muitos anos felizes de armazenagem de sua pilha de sujeira em nosso utilitário de armazenamento.
book.ironchest:dirtchest9000.page2=Uso: basta inserir o monte de sujeira de sua escolha no slot altamente receptivo e apreciar a grande conveniência de ter essa sujeira disponíveis para você, a qualquer momento que você passar pelo baú!
book.ironchest:dirtchest9000.page3=Esperamos que tenham gostado de rever este manual de instruções, e espero que você considere o uso de nossos produtos no futuro! Atenciosamente, manual do BaúDeSujeira 9000 escritores incorporados.
book.ironchest:dirtchest9000.page4=Garantia: Este produto não tem qualquer tipo de garantia. Sua sujeira pode não ser armazenada, pode vazar lentamente para o ambiente, ou alternativamente, pode não fazer absolutamente nada.
book.ironchest:dirtchest9000.page5=BaúDeSujeira 9000 é bom para o meio ambiente. Elimine este guia de forma responsável, e não o que você faz apenas lançando-o em alguma lava. Ficaríamos muito triste.

View File

@ -0,0 +1,17 @@
tile.ironchest:IRON.name=Baú de Ferro
tile.ironchest:GOLD.name=Baú de Ouro
tile.ironchest:DIAMOND.name=Baú de Diamante
tile.ironchest:COPPER.name=Baú de Cobre
tile.ironchest:SILVER.name=Baú de Prata
tile.ironchest:CRYSTAL.name=Baú de Cristal
tile.ironchest:OBSIDIAN.name=Baú de Obsidiana
item.ironchest:IRONGOLD.name=Melhoria de Baú de Ferro para Ouro
item.ironchest:GOLDDIAMOND.name=Melhoria de Baú de Ouro para Diamante
item.ironchest:COPPERSILVER.name=Melhoria de Baú de Cobre para Prata
item.ironchest:SILVERGOLD.name=Melhoria de Baú de Prata para Ouro
item.ironchest:COPPERIRON.name=Melhoria de Baú de Cobre para Ferro
item.ironchest:DIAMONDCRYSTAL.name=Melhoria de Baú de Diamante para Cristal
item.ironchest:WOODIRON.name=Melhoria de Baú de Madeira para Ferro
item.ironchest:WOODCOPPER.name=Melhoria de Baú de Madeira para Cobre
item.ironchest:DIAMONDOBSIDIAN.name=Melhoria de Baú de Diamante para Obsidiana

0
src/main/resources/assets/ironchest/lang/ru_RU.lang Normal file → Executable file
View File

0
src/main/resources/assets/ironchest/lang/sv_SE.lang Normal file → Executable file
View File

View File

@ -0,0 +1,25 @@
tile.ironchest:IRON.name=Demir Sandık
tile.ironchest:GOLD.name=Altın Sandık
tile.ironchest:DIAMOND.name=Elmas Sandık
tile.ironchest:COPPER.name=Bakır Sandık
tile.ironchest:SILVER.name=Gümüş Sandık
tile.ironchest:CRYSTAL.name=Kristal Sandık
tile.ironchest:OBSIDIAN.name=Obsidyen Sandık
tile.ironchest:DIRTCHEST9000.name=Toprak Sandık-9000!
item.ironchest:IRONGOLD.name=Demir Sandığı Altın Sandığa Yükselt
item.ironchest:GOLDDIAMOND.name=Altın Sandığı Elmas Sandığa Yükselt
item.ironchest:COPPERSILVER.name=Bakır Sandığı Gümüş Sandığa Yükselt
item.ironchest:SILVERGOLD.name=Gümüş Sandığı Altın Sandığa Yükselt
item.ironchest:COPPERIRON.name=Bakır Sandığı Demir Sandığa Yükselt
item.ironchest:DIAMONDCRYSTAL.name=Elmas Sandığı Kristal Sandığa Yükselt
item.ironchest:WOODIRON.name=Tahta Sandığı Demir Sandığa Yükselt
item.ironchest:WOODCOPPER.name=Tahta Sandığı Bakır Sandığa Yükselt
item.ironchest:DIAMONDOBSIDIAN.name=Elmas Sandığı Obsidyen Sandığa Yükselt
book.ironchest:dirtchest9000.title=Toprak Sandık-9000 Kullanım Kılavuzu
book.ironchest:dirtchest9000.page1=Yeni sandık olan Toprak Sandık-9000 yaptığınız için teşekkürler.Bu sandık ile topraklarınızı depolayabilirsiniz.
book.ironchest:dirtchest9000.page2=Kullanımı: 64 adet toprak alarak içine koyunuz. Böylece sadece toprak depolanır.
book.ironchest:dirtchest9000.page3=Biz bu kılavuzu gözden keyif aldık umuyoruz, ve gelecekte ürünlerimizi kullanmayı düşünün umuyoruz! Saygılarımızla, dahil DirtChest 9000 manuel yazar.
book.ironchest:dirtchest9000.page4=Garanti: Bu ürün herhangi bir garanti vardır. Sizin kir depolanabilir değil, yavaş yavaş çevreye sülük olabilir, ya da alternatif olarak, hiç bir şey yapamazsınız.
book.ironchest:dirtchest9000.page5=Toprak Sandık-9000 çevreye türüdür. Sorumlu bu rehber kitap imha edin ve ne olursa olsun sadece bazı lav içine ayna yok yok. Bizim için çok üzücü olacaktır.

View File

@ -0,0 +1,25 @@
tile.ironchest:IRON.name=铁箱子
tile.ironchest:GOLD.name=金箱子
tile.ironchest:DIAMOND.name=钻石箱子
tile.ironchest:COPPER.name=铜箱子
tile.ironchest:SILVER.name=银箱子
tile.ironchest:CRYSTAL.name=水晶箱子
tile.ironchest:OBSIDIAN.name=黑曜石箱子
tile.ironchest:DIRTCHEST9000.name=泥箱子9000!
item.ironchest:IRONGOLD.name=升级:铁>金
item.ironchest:GOLDDIAMOND.name=升级:金>钻石
item.ironchest:COPPERSILVER.name=升级:铜>银
item.ironchest:SILVERGOLD.name=升级:银>金
item.ironchest:COPPERIRON.name=升级:铜>铁
item.ironchest:DIAMONDCRYSTAL.name=升级:钻石>水晶
item.ironchest:WOODIRON.name=升级:木>铁
item.ironchest:WOODCOPPER.name=升级:木>铜
item.ironchest:DIAMONDOBSIDIAN.name=升级:钻石>黑曜石
book.ironchest:dirtchest9000.title=傻瓜也一定会用的泥箱子9000!
book.ironchest:dirtchest9000.page1=欢迎使用这台全新的泥箱子9000!希望你能愉快地常年使用我们的设备来储存(大量)泥土(大雾)。
book.ironchest:dirtchest9000.page2=使用方法: 把一组泥土丢进去就行了。每次您经过的时候都可以打开它(很方便地)取出来用。
book.ironchest:dirtchest9000.page3=希望您阅读本手册愉快并选择使用我们的产品。作为泥箱子9000手册作者我谨向您致以诚挚问候。
book.ironchest:dirtchest9000.page4=质量保障: 恕本产品不提供任何质量保障。您的泥土或者能安全存储其内,或者会逐渐流失到环境中,或者什么也不会发生。(读者:我了个去!)
book.ironchest:dirtchest9000.page5=泥箱子9000十分环保。请小心收藏好本手册如果您随手丢进岩浆的话我们可会伤心的。

View File

@ -0,0 +1,25 @@
tile.ironchest:IRON.name=鐵箱
tile.ironchest:GOLD.name=黃金箱
tile.ironchest:DIAMOND.name=鑽石箱
tile.ironchest:COPPER.name=銅箱
tile.ironchest:SILVER.name=銀箱
tile.ironchest:CRYSTAL.name=水晶箱
tile.ironchest:OBSIDIAN.name=黑曜石箱
tile.ironchest:DIRTCHEST9000.name=泥土箱9000!
item.ironchest:IRONGOLD.name=鐵箱升級成金箱
item.ironchest:GOLDDIAMOND.name=金箱升級成鑽石箱
item.ironchest:COPPERSILVER.name=銅箱升級成銀箱
item.ironchest:SILVERGOLD.name=銀箱升級成金箱
item.ironchest:COPPERIRON.name=銅箱升級成鐵箱
item.ironchest:DIAMONDCRYSTAL.name=鑽石箱升級成水晶箱
item.ironchest:WOODIRON.name=木箱升級成鐵箱
item.ironchest:WOODCOPPER.name=木箱升級成銅箱
item.ironchest:DIAMONDOBSIDIAN.name=鑽石箱升級成黑曜石箱
book.ironchest:dirtchest9000.title=笨蛋也一定會用的泥土箱9000!
book.ironchest:dirtchest9000.page1=歡迎使用這台全新的泥土箱9000!希望你能愉快地常年使用我們的設備來儲存泥土。
book.ironchest:dirtchest9000.page2=使用方法:把一組泥土丟進去就行了。每次您經過的時候都可以打開它很方便地取出來用。
book.ironchest:dirtchest9000.page3=希望您閱讀本手冊愉快並選擇使用我們的產品。作為泥土箱9000手冊作者我謹向您致以誠摯問候。
book.ironchest:dirtchest9000.page4=質量保障:恕本產品不提供任何質量保障。您的泥土或許能安全存儲其內,或許會逐漸流失到環境中,或者什麼也不會發生。
book.ironchest:dirtchest9000.page5=泥土箱9000十分環保。請小心收藏好本手冊如果您隨手丟進岩漿的話我們可會傷心的。

View File

@ -0,0 +1,40 @@
{
"textures": {
"texture": "ironchest:model/copperchest"
},
"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" }
}
}
]
}

View File

@ -0,0 +1,40 @@
{
"textures": {
"texture": "ironchest:model/crystalchest"
},
"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" }
}
}
]
}

View File

@ -0,0 +1,40 @@
{
"textures": {
"texture": "ironchest:model/diamondchest"
},
"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" }
}
}
]
}

View File

@ -0,0 +1,40 @@
{
"textures": {
"texture": "ironchest:model/dirtchest"
},
"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" }
}
}
]
}

View File

@ -0,0 +1,40 @@
{
"textures": {
"texture": "ironchest:model/goldchest"
},
"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" }
}
}
]
}

View File

@ -0,0 +1,40 @@
{
"textures": {
"texture": "ironchest:model/ironchest"
},
"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" }
}
}
]
}

View File

@ -0,0 +1,40 @@
{
"textures": {
"texture": "ironchest:model/obsidianchest"
},
"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" }
}
}
]
}

View File

@ -0,0 +1,40 @@
{
"textures": {
"texture": "ironchest:model/silverchest"
},
"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" }
}
}
]
}

View File

@ -0,0 +1,18 @@
{
"parent": "builtin/generated",
"textures": {
"layer0": "ironchest:items/copperIronUpgrade"
},
"display": {
"thirdperson": {
"rotation": [ -90, 0, 0 ],
"translation": [ 0, 1, -3 ],
"scale": [ 0.55, 0.55, 0.55 ]
},
"firstperson": {
"rotation": [ 0, -135, 25 ],
"translation": [ 0, 4, 2 ],
"scale": [ 1.7, 1.7, 1.7 ]
}
}
}

View File

@ -0,0 +1,18 @@
{
"parent": "builtin/generated",
"textures": {
"layer0": "ironchest:items/copperSilverUpgrade"
},
"display": {
"thirdperson": {
"rotation": [ -90, 0, 0 ],
"translation": [ 0, 1, -3 ],
"scale": [ 0.55, 0.55, 0.55 ]
},
"firstperson": {
"rotation": [ 0, -135, 25 ],
"translation": [ 0, 4, 2 ],
"scale": [ 1.7, 1.7, 1.7 ]
}
}
}

View File

@ -0,0 +1,18 @@
{
"parent": "builtin/generated",
"textures": {
"layer0": "ironchest:items/diamondCrystalUpgrade"
},
"display": {
"thirdperson": {
"rotation": [ -90, 0, 0 ],
"translation": [ 0, 1, -3 ],
"scale": [ 0.55, 0.55, 0.55 ]
},
"firstperson": {
"rotation": [ 0, -135, 25 ],
"translation": [ 0, 4, 2 ],
"scale": [ 1.7, 1.7, 1.7 ]
}
}
}

View File

@ -0,0 +1,18 @@
{
"parent": "builtin/generated",
"textures": {
"layer0": "ironchest:items/diamondObsidianUpgrade"
},
"display": {
"thirdperson": {
"rotation": [ -90, 0, 0 ],
"translation": [ 0, 1, -3 ],
"scale": [ 0.55, 0.55, 0.55 ]
},
"firstperson": {
"rotation": [ 0, -135, 25 ],
"translation": [ 0, 4, 2 ],
"scale": [ 1.7, 1.7, 1.7 ]
}
}
}

View File

@ -0,0 +1,18 @@
{
"parent": "builtin/generated",
"textures": {
"layer0": "ironchest:items/goldDiamondUpgrade"
},
"display": {
"thirdperson": {
"rotation": [ -90, 0, 0 ],
"translation": [ 0, 1, -3 ],
"scale": [ 0.55, 0.55, 0.55 ]
},
"firstperson": {
"rotation": [ 0, -135, 25 ],
"translation": [ 0, 4, 2 ],
"scale": [ 1.7, 1.7, 1.7 ]
}
}
}

View File

@ -0,0 +1,18 @@
{
"parent": "builtin/generated",
"textures": {
"layer0": "ironchest:items/ironGoldUpgrade"
},
"display": {
"thirdperson": {
"rotation": [ -90, 0, 0 ],
"translation": [ 0, 1, -3 ],
"scale": [ 0.55, 0.55, 0.55 ]
},
"firstperson": {
"rotation": [ 0, -135, 25 ],
"translation": [ 0, 4, 2 ],
"scale": [ 1.7, 1.7, 1.7 ]
}
}
}

View File

@ -0,0 +1,18 @@
{
"parent": "builtin/generated",
"textures": {
"layer0": "ironchest:items/silverGoldUpgrade"
},
"display": {
"thirdperson": {
"rotation": [ -90, 0, 0 ],
"translation": [ 0, 1, -3 ],
"scale": [ 0.55, 0.55, 0.55 ]
},
"firstperson": {
"rotation": [ 0, -135, 25 ],
"translation": [ 0, 4, 2 ],
"scale": [ 1.7, 1.7, 1.7 ]
}
}
}

View File

@ -0,0 +1,18 @@
{
"parent": "builtin/generated",
"textures": {
"layer0": "ironchest:items/woodCopperUpgrade"
},
"display": {
"thirdperson": {
"rotation": [ -90, 0, 0 ],
"translation": [ 0, 1, -3 ],
"scale": [ 0.55, 0.55, 0.55 ]
},
"firstperson": {
"rotation": [ 0, -135, 25 ],
"translation": [ 0, 4, 2 ],
"scale": [ 1.7, 1.7, 1.7 ]
}
}
}

View File

@ -0,0 +1,18 @@
{
"parent": "builtin/generated",
"textures": {
"layer0": "ironchest:items/woodIronUpgrade"
},
"display": {
"thirdperson": {
"rotation": [ -90, 0, 0 ],
"translation": [ 0, 1, -3 ],
"scale": [ 0.55, 0.55, 0.55 ]
},
"firstperson": {
"rotation": [ 0, -135, 25 ],
"translation": [ 0, 4, 2 ],
"scale": [ 1.7, 1.7, 1.7 ]
}
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 679 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 661 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 546 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 396 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 396 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 762 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 719 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 784 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 787 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 604 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 527 B

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 480 B

After

Width:  |  Height:  |  Size: 480 B

Some files were not shown because too many files have changed in this diff Show More