Merge remote-tracking branch 'prog/master'
|
@ -5,3 +5,10 @@ build/
|
||||||
eclipse/
|
eclipse/
|
||||||
bin/
|
bin/
|
||||||
repo/
|
repo/
|
||||||
|
/run/
|
||||||
|
.settings/
|
||||||
|
#IDEA files from Gradle
|
||||||
|
.idea/
|
||||||
|
/*.iml
|
||||||
|
/*.ipr
|
||||||
|
/*.iws
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
ironchest
|
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
|
||||||
|
|
|
@ -12,11 +12,12 @@ buildscript {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dependencies {
|
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 the forge plugin - this adds all the magic for automatically obfuscating, deobfuscating etc
|
||||||
|
|
||||||
apply plugin: 'forge'
|
apply plugin: 'forge'
|
||||||
|
|
||||||
// This is a simple flatdir repository for "uploadArchives" when you don't have a remote repo to target
|
// 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
|
// Setup the forge minecraft plugin data. Specify the preferred forge/minecraft version here
|
||||||
minecraft {
|
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
|
// This wrangles the resources for the jar files- stuff like textures and languages
|
||||||
|
@ -125,14 +127,14 @@ uploadArchives {
|
||||||
url 'https://github.com/cpw/IronChest'
|
url 'https://github.com/cpw/IronChest'
|
||||||
|
|
||||||
scm {
|
scm {
|
||||||
url 'https://github.com/cpw/IronChest'
|
url 'https://github.com/progwml6/IronChest'
|
||||||
connection 'scm:git:git://github.com/cpw/IronChest.git'
|
connection 'scm:git:git://github.com/progwml6/IronChest.git'
|
||||||
developerConnection 'scm:git:git@github.com:cpw/IronChest.git'
|
developerConnection 'scm:git:git@github.com:progwml6/IronChest.git'
|
||||||
}
|
}
|
||||||
|
|
||||||
issueManagement {
|
issueManagement {
|
||||||
system 'github'
|
system 'github'
|
||||||
url 'https://github.com/cpw/IronChest/issues'
|
url 'https://github.com/progwml6/IronChest/issues'
|
||||||
}
|
}
|
||||||
|
|
||||||
licenses {
|
licenses {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#Tue Oct 29 18:00:54 CDT 2013
|
#Wed Sep 10 01:32:34 EDT 2014
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
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,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 {
|
||||||
|
}
|
||||||
|
}
|
|
@ -10,19 +10,16 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package cpw.mods.ironchest;
|
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.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.BlockContainer;
|
import net.minecraft.block.BlockContainer;
|
||||||
import net.minecraft.block.material.Material;
|
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.creativetab.CreativeTabs;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
@ -34,37 +31,31 @@ import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
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.util.MathHelper;
|
||||||
|
import net.minecraft.world.Explosion;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
|
|
||||||
public class BlockIronChest extends BlockContainer {
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
private Random random;
|
public class BlockIronChest extends BlockContainer
|
||||||
|
{
|
||||||
@SideOnly(Side.CLIENT)
|
public static final PropertyEnum VARIANT_PROP = PropertyEnum.create("variant", IronChestType.class);
|
||||||
private IIcon[][] icons;
|
|
||||||
|
|
||||||
public BlockIronChest()
|
public BlockIronChest()
|
||||||
{
|
{
|
||||||
super(Material.iron);
|
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
this.setDefaultState(this.blockState.getBaseState().withProperty(VARIANT_PROP, IronChestType.IRON));
|
||||||
* Overridden by {@link #createTileEntity(World, int)}
|
|
||||||
*/
|
this.setBlockBounds(0.0625F, 0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);
|
||||||
@Override
|
this.setHardness(3.0F);
|
||||||
public TileEntity createNewTileEntity(World w, int i)
|
this.setUnlocalizedName("IronChest");
|
||||||
{
|
this.setCreativeTab(CreativeTabs.tabDecorations);
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -74,55 +65,22 @@ public class BlockIronChest extends BlockContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean renderAsNormalBlock()
|
public boolean isFullCube()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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;
|
TileEntity te = world.getTileEntity(pos);
|
||||||
}
|
|
||||||
|
|
||||||
@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);
|
|
||||||
|
|
||||||
if (te == null || !(te instanceof TileEntityIronChest))
|
if (te == null || !(te instanceof TileEntityIronChest))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (world.isSideSolid(i, j + 1, k, ForgeDirection.DOWN))
|
if (world.isSideSolid(pos.add(0, 1, 0), EnumFacing.DOWN))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -132,22 +90,69 @@ public class BlockIronChest extends BlockContainer {
|
||||||
return true;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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);
|
return IronChestType.makeEntity(metadata);
|
||||||
world.markBlockForUpdate(i, j, k);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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;
|
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)
|
if (facing == 0)
|
||||||
{
|
{
|
||||||
chestFacing = 2;
|
chestFacing = 2;
|
||||||
|
@ -164,36 +169,38 @@ public class BlockIronChest extends BlockContainer {
|
||||||
{
|
{
|
||||||
chestFacing = 4;
|
chestFacing = 4;
|
||||||
}
|
}
|
||||||
TileEntity te = world.getTileEntity(i, j, k);
|
TileEntity te = world.getTileEntity(pos);
|
||||||
if (te != null && te instanceof TileEntityIronChest)
|
if (te != null && te instanceof TileEntityIronChest)
|
||||||
{
|
{
|
||||||
TileEntityIronChest teic = (TileEntityIronChest) te;
|
TileEntityIronChest teic = (TileEntityIronChest) te;
|
||||||
teic.wasPlaced(entityliving, itemStack);
|
teic.wasPlaced(entityliving, itemStack);
|
||||||
teic.setFacing(chestFacing);
|
teic.setFacing(chestFacing);
|
||||||
world.markBlockForUpdate(i, j, k);
|
world.markBlockForUpdate(pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int damageDropped(int i)
|
public int damageDropped(IBlockState state)
|
||||||
{
|
{
|
||||||
return i;
|
return IronChestType.validateMeta(((IronChestType) state.getValue(VARIANT_PROP)).ordinal());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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)
|
if (tileentitychest != null)
|
||||||
{
|
{
|
||||||
tileentitychest.removeAdornments();
|
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++)
|
for (int l = newSize; l < chest.getSizeInventory(); l++)
|
||||||
{
|
{
|
||||||
ItemStack itemstack = chest.getStackInSlot(l);
|
ItemStack itemstack = chest.getStackInSlot(l);
|
||||||
|
@ -212,8 +219,7 @@ public class BlockIronChest extends BlockContainer {
|
||||||
i1 = itemstack.stackSize;
|
i1 = itemstack.stackSize;
|
||||||
}
|
}
|
||||||
itemstack.stackSize -= i1;
|
itemstack.stackSize -= i1;
|
||||||
EntityItem entityitem = new EntityItem(world, (float) xCoord + f, (float) yCoord + (newSize > 0 ? 1 : 0) + f1, (float) zCoord + f2,
|
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()));
|
||||||
new ItemStack(itemstack.getItem(), i1, itemstack.getItemDamage()));
|
|
||||||
float f3 = 0.05F;
|
float f3 = 0.05F;
|
||||||
entityitem.motionX = (float) random.nextGaussian() * f3;
|
entityitem.motionX = (float) random.nextGaussian() * f3;
|
||||||
entityitem.motionY = (float) random.nextGaussian() * f3 + 0.2F;
|
entityitem.motionY = (float) random.nextGaussian() * f3 + 0.2F;
|
||||||
|
@ -228,75 +234,62 @@ public class BlockIronChest extends BlockContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
public float getExplosionResistance(World world, BlockPos pos, Entity exploder, Explosion explosion)
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List)
|
|
||||||
{
|
{
|
||||||
for (IronChestType type : IronChestType.values())
|
TileEntity te = world.getTileEntity(pos);
|
||||||
|
if (te instanceof TileEntityIronChest)
|
||||||
{
|
{
|
||||||
if (type.isValidForCreativeMode())
|
TileEntityIronChest teic = (TileEntityIronChest) te;
|
||||||
|
if (teic.getType().isExplosionResistant())
|
||||||
{
|
{
|
||||||
par3List.add(new ItemStack(this, 1, type.ordinal()));
|
return 10000F;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return super.getExplosionResistance(world, pos, exploder, explosion);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getExplosionResistance(Entity par1Entity, World world, int x, int y, int z, double explosionX, double explosionY, double explosionZ)
|
public boolean hasComparatorInputOverride()
|
||||||
{
|
{
|
||||||
TileEntity te = world.getTileEntity(x, y, z);
|
return true;
|
||||||
if (te instanceof TileEntityIronChest)
|
|
||||||
{
|
|
||||||
TileEntityIronChest teic = (TileEntityIronChest) te;
|
|
||||||
if (teic.getType().isExplosionResistant())
|
|
||||||
{
|
|
||||||
return 10000f;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return super.getExplosionResistance(par1Entity, world, x, y, z, explosionX, explosionY, explosionZ);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getComparatorInputOverride(World par1World, int par2, int par3, int par4, int par5)
|
public int getComparatorInputOverride(World world, BlockPos pos)
|
||||||
{
|
{
|
||||||
return Container.calcRedstoneFromInventory((TileEntityIronChest) par1World.getTileEntity(par2, par3, par4));
|
TileEntity te = world.getTileEntity(pos);
|
||||||
}
|
if (te instanceof IInventory)
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void registerBlockIcons(IIconRegister par1IconRegister)
|
|
||||||
{
|
|
||||||
for (IronChestType typ: IronChestType.values())
|
|
||||||
{
|
{
|
||||||
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
|
@Override
|
||||||
public ForgeDirection[] getValidRotations(World worldObj, int x, int y, int z)
|
public EnumFacing[] getValidRotations(World worldObj, BlockPos pos)
|
||||||
{
|
{
|
||||||
return validRotationAxes;
|
return validRotationAxes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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)
|
if (worldObj.isRemote)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (axis == UP || axis == DOWN)
|
if (axis == EnumFacing.UP || axis == EnumFacing.DOWN)
|
||||||
{
|
{
|
||||||
TileEntity tileEntity = worldObj.getTileEntity(x, y, z);
|
TileEntity tileEntity = worldObj.getTileEntity(pos);
|
||||||
if (tileEntity instanceof TileEntityIronChest) {
|
if (tileEntity instanceof TileEntityIronChest)
|
||||||
|
{
|
||||||
TileEntityIronChest icte = (TileEntityIronChest) tileEntity;
|
TileEntityIronChest icte = (TileEntityIronChest) tileEntity;
|
||||||
icte.rotateAround(axis);
|
icte.rotateAround();
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -16,8 +16,10 @@ import static cpw.mods.ironchest.IronChestType.SILVER;
|
||||||
import static cpw.mods.ironchest.IronChestType.WOOD;
|
import static cpw.mods.ironchest.IronChestType.WOOD;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.common.config.Configuration;
|
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||||
|
import cpw.mods.ironchest.client.ModelHelper;
|
||||||
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
|
|
||||||
public enum ChestChangerType {
|
public enum ChestChangerType {
|
||||||
IRONGOLD(IRON, GOLD, "ironGoldUpgrade", "Iron to Gold Chest Upgrade", "mmm", "msm", "mmm"),
|
IRONGOLD(IRON, GOLD, "ironGoldUpgrade", "Iron to Gold Chest Upgrade", "mmm", "msm", "mmm"),
|
||||||
|
@ -34,7 +36,7 @@ public enum ChestChangerType {
|
||||||
private IronChestType target;
|
private IronChestType target;
|
||||||
public String itemName;
|
public String itemName;
|
||||||
public String descriptiveName;
|
public String descriptiveName;
|
||||||
private ItemChestChanger item;
|
public ItemChestChanger item;
|
||||||
private String[] recipe;
|
private String[] recipe;
|
||||||
|
|
||||||
private ChestChangerType(IronChestType source, IronChestType target, String itemName, String descriptiveName, String... recipe)
|
private ChestChangerType(IronChestType source, IronChestType target, String itemName, String descriptiveName, String... recipe)
|
||||||
|
@ -45,6 +47,10 @@ public enum ChestChangerType {
|
||||||
this.descriptiveName = descriptiveName;
|
this.descriptiveName = descriptiveName;
|
||||||
this.recipe = recipe;
|
this.recipe = recipe;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IronChestType getSource(){
|
||||||
|
return source;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean canUpgrade(IronChestType from)
|
public boolean canUpgrade(IronChestType from)
|
||||||
{
|
{
|
||||||
|
@ -56,10 +62,12 @@ public enum ChestChangerType {
|
||||||
return this.target.ordinal();
|
return this.target.ordinal();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemChestChanger buildItem(Configuration cfg)
|
public ItemChestChanger buildItem()
|
||||||
{
|
{
|
||||||
item = new ItemChestChanger(this);
|
item = new ItemChestChanger(this);
|
||||||
GameRegistry.registerItem(item, itemName);
|
GameRegistry.registerItem(item, itemName);
|
||||||
|
if(FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT)
|
||||||
|
ModelHelper.registerItem(item, "ironchest:" + itemName);
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,16 +79,16 @@ public enum ChestChangerType {
|
||||||
{
|
{
|
||||||
Object targetMaterial = IronChestType.translateOreName(targetMat);
|
Object targetMaterial = IronChestType.translateOreName(targetMat);
|
||||||
Object sourceMaterial = IronChestType.translateOreName(sourceMat);
|
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())
|
for (ChestChangerType type : values())
|
||||||
{
|
{
|
||||||
type.buildItem(cfg);
|
type.buildItem();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,9 @@ package cpw.mods.ironchest;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.BlockPos;
|
||||||
import net.minecraft.world.World;
|
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 class CommonProxy implements IGuiHandler {
|
||||||
public void registerRenderInformation()
|
public void registerRenderInformation()
|
||||||
|
@ -33,9 +34,9 @@ public class CommonProxy implements IGuiHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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)
|
if (te != null && te instanceof TileEntityIronChest)
|
||||||
{
|
{
|
||||||
TileEntityIronChest icte = (TileEntityIronChest) te;
|
TileEntityIronChest icte = (TileEntityIronChest) te;
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package cpw.mods.ironchest;
|
package cpw.mods.ironchest;
|
||||||
|
|
||||||
|
import invtweaks.api.container.ChestContainer;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.inventory.Container;
|
import net.minecraft.inventory.Container;
|
||||||
|
@ -17,6 +18,7 @@ import net.minecraft.inventory.IInventory;
|
||||||
import net.minecraft.inventory.Slot;
|
import net.minecraft.inventory.Slot;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
@ChestContainer(isLargeChest = true)
|
||||||
public class ContainerIronChest extends Container {
|
public class ContainerIronChest extends Container {
|
||||||
private IronChestType type;
|
private IronChestType type;
|
||||||
private EntityPlayer player;
|
private EntityPlayer player;
|
||||||
|
@ -27,7 +29,7 @@ public class ContainerIronChest extends Container {
|
||||||
chest = chestInventory;
|
chest = chestInventory;
|
||||||
player = ((InventoryPlayer) playerInventory).player;
|
player = ((InventoryPlayer) playerInventory).player;
|
||||||
this.type = type;
|
this.type = type;
|
||||||
chestInventory.openInventory();
|
chestInventory.openInventory(player);
|
||||||
layoutContainer(playerInventory, chestInventory, type, xSize, ySize);
|
layoutContainer(playerInventory, chestInventory, type, xSize, ySize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,7 +79,7 @@ public class ContainerIronChest extends Container {
|
||||||
public void onContainerClosed(EntityPlayer entityplayer)
|
public void onContainerClosed(EntityPlayer entityplayer)
|
||||||
{
|
{
|
||||||
super.onContainerClosed(entityplayer);
|
super.onContainerClosed(entityplayer);
|
||||||
chest.closeInventory();
|
chest.closeInventory(entityplayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void layoutContainer(IInventory playerInventory, IInventory chestInventory, IronChestType type, int xSize, int ySize)
|
protected void layoutContainer(IInventory playerInventory, IInventory chestInventory, IronChestType type, int xSize, int ySize)
|
||||||
|
@ -115,4 +117,9 @@ public class ContainerIronChest extends Container {
|
||||||
{
|
{
|
||||||
return player;
|
return player;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ChestContainer.RowSizeCallback
|
||||||
|
public int getNumColumns() {
|
||||||
|
return type.getRowLength();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,78 +11,49 @@
|
||||||
package cpw.mods.ironchest;
|
package cpw.mods.ironchest;
|
||||||
|
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.common.config.Configuration;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
import org.apache.logging.log4j.Level;
|
import net.minecraftforge.fml.common.Mod.EventHandler;
|
||||||
import cpw.mods.fml.common.FMLLog;
|
import net.minecraftforge.fml.common.Mod.Instance;
|
||||||
import cpw.mods.fml.common.Mod;
|
import net.minecraftforge.fml.common.SidedProxy;
|
||||||
import cpw.mods.fml.common.Mod.EventHandler;
|
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||||
import cpw.mods.fml.common.Mod.Instance;
|
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||||
import cpw.mods.fml.common.SidedProxy;
|
import net.minecraftforge.fml.common.network.NetworkRegistry;
|
||||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||||
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;
|
|
||||||
|
|
||||||
@Mod(modid = "IronChest", name = "Iron Chests", dependencies = "required-after:Forge@[7.0,);required-after:FML@[5.0.5,)")
|
@Mod(modid = "IronChest", name = "Iron Chests", dependencies = "required-after:FML@[7.2,)", acceptedMinecraftVersions="[1.8,1.8.8]")
|
||||||
public class IronChest {
|
public class IronChest
|
||||||
|
{
|
||||||
public static BlockIronChest ironChestBlock;
|
public static BlockIronChest ironChestBlock;
|
||||||
@SidedProxy(clientSide = "cpw.mods.ironchest.client.ClientProxy", serverSide = "cpw.mods.ironchest.CommonProxy")
|
@SidedProxy(clientSide = "cpw.mods.ironchest.client.ClientProxy", serverSide = "cpw.mods.ironchest.CommonProxy")
|
||||||
public static CommonProxy proxy;
|
public static CommonProxy proxy;
|
||||||
@Instance("IronChest")
|
@Instance("IronChest")
|
||||||
public static IronChest instance;
|
public static IronChest instance;
|
||||||
public static boolean CACHE_RENDER = true;
|
|
||||||
public static boolean OCELOTS_SITONCHESTS = true;
|
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void preInit(FMLPreInitializationEvent event)
|
public void preInit(FMLPreInitializationEvent event)
|
||||||
{
|
{
|
||||||
Version.init(event.getVersionProperties());
|
Version.init(event.getVersionProperties());
|
||||||
event.getModMetadata().version = Version.fullVersionString();
|
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
|
@EventHandler
|
||||||
public void load(FMLInitializationEvent evt)
|
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())
|
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);
|
proxy.registerTileEntitySpecialRenderer(typ);
|
||||||
}
|
}
|
||||||
IronChestType.registerBlocksAndRecipes(ironChestBlock);
|
IronChestType.registerBlocksAndRecipes(ironChestBlock);
|
||||||
ChestChangerType.generateRecipes();
|
ChestChangerType.generateRecipes();
|
||||||
NetworkRegistry.INSTANCE.registerGuiHandler(instance, proxy);
|
NetworkRegistry.INSTANCE.registerGuiHandler(instance, proxy);
|
||||||
proxy.registerRenderInformation();
|
proxy.registerRenderInformation();
|
||||||
// if (OCELOTS_SITONCHESTS)
|
MinecraftForge.EVENT_BUS.register(new OcelotsSitOnChestsHandler());
|
||||||
// {
|
|
||||||
// MinecraftForge.EVENT_BUS.register(new OcelotsSitOnChestsHandler());
|
|
||||||
// }
|
|
||||||
MinecraftForge.EVENT_BUS.register(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
|
||||||
public void modsLoaded(FMLPostInitializationEvent evt)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,21 +2,23 @@ package cpw.mods.ironchest;
|
||||||
|
|
||||||
import net.minecraft.entity.ai.EntityAIOcelotSit;
|
import net.minecraft.entity.ai.EntityAIOcelotSit;
|
||||||
import net.minecraft.entity.passive.EntityOcelot;
|
import net.minecraft.entity.passive.EntityOcelot;
|
||||||
|
import net.minecraft.util.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class IronChestAIOcelotSit extends EntityAIOcelotSit {
|
public class IronChestAIOcelotSit extends EntityAIOcelotSit
|
||||||
|
{
|
||||||
public IronChestAIOcelotSit(EntityOcelot par1EntityOcelot, float par2)
|
public IronChestAIOcelotSit(EntityOcelot par1EntityOcelot, float par2)
|
||||||
{
|
{
|
||||||
super(par1EntityOcelot, par2);
|
super(par1EntityOcelot, par2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* @Override
|
@Override
|
||||||
protected boolean func_151486_a(World world, int x, int y, int z)
|
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 true;
|
||||||
}
|
}
|
||||||
return super.func_151486_a(world, x, y, z);
|
return super.func_179488_a(world, pos);
|
||||||
}
|
}
|
||||||
*/}
|
}
|
||||||
|
|
|
@ -13,21 +13,19 @@ package cpw.mods.ironchest;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.init.Items;
|
|
||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
import net.minecraft.inventory.Slot;
|
import net.minecraft.inventory.Slot;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagByte;
|
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 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"),
|
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"),
|
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"),
|
DIAMOND(108, 12, true, "Diamond Chest", "diamondchest.png", 2, Arrays.asList("gemDiamond"), TileEntityDiamondChest.class, "GGGmPmGGG", "GGGG4Gmmm"),
|
||||||
|
@ -68,6 +66,12 @@ public enum IronChestType {
|
||||||
this.matList = new ArrayList<String>();
|
this.matList = new ArrayList<String>();
|
||||||
matList.addAll(mats);
|
matList.addAll(mats);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return name().toLowerCase();
|
||||||
|
}
|
||||||
|
|
||||||
public String getModelTexture()
|
public String getModelTexture()
|
||||||
{
|
{
|
||||||
|
@ -104,18 +108,14 @@ public enum IronChestType {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void registerTranslations()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void registerBlocksAndRecipes(BlockIronChest blockResult)
|
public static void registerBlocksAndRecipes(BlockIronChest blockResult)
|
||||||
{
|
{
|
||||||
ItemStack previous = new ItemStack(Blocks.chest);
|
Object previous = "chestWood";
|
||||||
for (IronChestType typ : values())
|
for (IronChestType typ : values())
|
||||||
{
|
{
|
||||||
generateRecipesForType(blockResult, previous, typ);
|
generateRecipesForType(blockResult, previous, typ);
|
||||||
ItemStack chest = new ItemStack(blockResult, 1, typ.ordinal());
|
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;
|
if (typ.tieredChest) previous = chest;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -131,12 +131,12 @@ public enum IronChestType {
|
||||||
mainMaterial = translateOreName(mat);
|
mainMaterial = translateOreName(mat);
|
||||||
addRecipe(new ItemStack(blockResult, 1, type.ordinal()), recipeSplit,
|
addRecipe(new ItemStack(blockResult, 1, type.ordinal()), recipeSplit,
|
||||||
'm', mainMaterial, 'P', previousTier, /* previous tier of chest */
|
'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 */
|
'0', new ItemStack(blockResult, 1, 0), /* Iron Chest */
|
||||||
'1', new ItemStack(blockResult, 1, 1), /* Gold Chest */
|
'1', new ItemStack(blockResult, 1, 1), /* Gold Chest */
|
||||||
'2', new ItemStack(blockResult, 1, 2), /* Diamond Chest */
|
'2', new ItemStack(blockResult, 1, 2), /* Diamond Chest */
|
||||||
'3', new ItemStack(blockResult, 1, 3), /* Copper 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)
|
public static Object translateOreName(String mat)
|
||||||
{
|
{
|
||||||
if (mat == "ingotIron")
|
if (mat.equals("obsidian"))
|
||||||
{
|
|
||||||
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")
|
|
||||||
{
|
{
|
||||||
return Blocks.obsidian;
|
return Blocks.obsidian;
|
||||||
}
|
}
|
||||||
else if (mat == "dirt")
|
else if (mat.equals("dirt"))
|
||||||
{
|
{
|
||||||
return Blocks.dirt;
|
return Blocks.dirt;
|
||||||
}
|
}
|
||||||
|
@ -219,33 +203,6 @@ public enum IronChestType {
|
||||||
return this == OBSIDIAN;
|
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)
|
public Slot makeSlot(IInventory chestInventory, int index, int x, int y)
|
||||||
{
|
{
|
||||||
return new ValidatingSlot(chestInventory, index, x, y, this);
|
return new ValidatingSlot(chestInventory, index, x, y, this);
|
||||||
|
@ -255,6 +212,7 @@ public enum IronChestType {
|
||||||
{
|
{
|
||||||
return itemFilter == null || itemstack == null || itemstack.getItem() == itemFilter;
|
return itemFilter == null || itemstack == null || itemstack.getItem() == itemFilter;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void adornItemDrop(ItemStack item)
|
public void adornItemDrop(ItemStack item)
|
||||||
{
|
{
|
||||||
if (this == DIRTCHEST9000)
|
if (this == DIRTCHEST9000)
|
||||||
|
@ -262,4 +220,4 @@ public enum IronChestType {
|
||||||
item.setTagInfo("dirtchest", new NBTTagByte((byte) 1));
|
item.setTagInfo("dirtchest", new NBTTagByte((byte) 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -10,96 +10,88 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package cpw.mods.ironchest;
|
package cpw.mods.ironchest;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.block.BlockChest;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.tileentity.TileEntityChest;
|
import net.minecraft.tileentity.TileEntityChest;
|
||||||
|
import net.minecraft.util.BlockPos;
|
||||||
|
import net.minecraft.util.EnumFacing;
|
||||||
import net.minecraft.world.World;
|
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;
|
private ChestChangerType type;
|
||||||
|
|
||||||
public ItemChestChanger(ChestChangerType type)
|
public ItemChestChanger(ChestChangerType type)
|
||||||
{
|
{
|
||||||
super();
|
|
||||||
setMaxStackSize(1);
|
|
||||||
this.type = type;
|
this.type = type;
|
||||||
setUnlocalizedName("ironchest:"+type.name());
|
|
||||||
setCreativeTab(CreativeTabs.tabMisc);
|
this.setMaxStackSize(1);
|
||||||
}
|
this.setUnlocalizedName("ironchest:" + type.name());
|
||||||
|
this.setCreativeTab(CreativeTabs.tabMisc);
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void registerIcons(IIconRegister par1IconRegister)
|
|
||||||
{
|
|
||||||
this.itemIcon = par1IconRegister.registerIcon("ironchest:"+type.itemName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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;
|
if (world.isRemote)
|
||||||
TileEntity te = world.getTileEntity(X, Y, Z);
|
|
||||||
TileEntityIronChest newchest;
|
|
||||||
if (te != null && te instanceof TileEntityIronChest)
|
|
||||||
{
|
|
||||||
TileEntityIronChest ironchest = (TileEntityIronChest) te;
|
|
||||||
newchest = ironchest.applyUpgradeItem(this);
|
|
||||||
if (newchest == null)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (te != null && te instanceof TileEntityChest)
|
|
||||||
{
|
|
||||||
TileEntityChest tec = (TileEntityChest) te;
|
|
||||||
if (tec.numPlayersUsing > 0)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!getType().canUpgrade(IronChestType.WOOD))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
// 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++)
|
|
||||||
{
|
|
||||||
chestContents[i] = null;
|
|
||||||
}
|
|
||||||
// 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;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
world.setTileEntity(X, Y, Z, newchest);
|
TileEntity te = world.getTileEntity(pos);
|
||||||
world.setBlockMetadataWithNotify(X, Y, Z, newchest.getType().ordinal(), 3);
|
TileEntityIronChest newchest = new TileEntityIronChest();
|
||||||
stack.stackSize = 0;
|
ItemStack[] chestContents = new ItemStack[27];
|
||||||
|
if (te != null)
|
||||||
|
{
|
||||||
|
if (te instanceof TileEntityIronChest)
|
||||||
|
{
|
||||||
|
chestContents = ((TileEntityIronChest) te).chestContents;
|
||||||
|
newchest = IronChestType.makeEntity(this.getTargetChestOrdinal(this.type.ordinal()));
|
||||||
|
if (newchest == null)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
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()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
((TileEntityIronChest) te2).setContents(chestContents);
|
||||||
|
}
|
||||||
|
|
||||||
|
stack.stackSize = player.capabilities.isCreativeMode ? stack.stackSize : stack.stackSize - 1;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,24 +14,25 @@ import net.minecraft.block.Block;
|
||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
public class ItemIronChest extends ItemBlock {
|
public class ItemIronChest extends ItemBlock
|
||||||
|
{
|
||||||
public ItemIronChest(Block block)
|
public ItemIronChest(Block block)
|
||||||
{
|
{
|
||||||
super(block);
|
super(block);
|
||||||
setMaxDamage(0);
|
|
||||||
setHasSubtypes(true);
|
this.setMaxDamage(0);
|
||||||
|
this.setHasSubtypes(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getMetadata(int i)
|
public int getMetadata(int meta)
|
||||||
{
|
{
|
||||||
return IronChestType.validateMeta(i);
|
return IronChestType.validateMeta(meta);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getUnlocalizedName(ItemStack itemstack)
|
public String getUnlocalizedName(ItemStack itemstack)
|
||||||
{
|
{
|
||||||
return "tile.ironchest:"+IronChestType.values()[itemstack.getItemDamage()].name();
|
return "tile.ironchest:" + IronChestType.values()[itemstack.getMetadata()].name();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,13 +1,15 @@
|
||||||
package cpw.mods.ironchest;
|
package cpw.mods.ironchest;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
|
||||||
import net.minecraft.entity.ai.EntityAIOcelotSit;
|
import net.minecraft.entity.ai.EntityAIOcelotSit;
|
||||||
import net.minecraft.entity.ai.EntityAITasks;
|
import net.minecraft.entity.ai.EntityAITasks;
|
||||||
import net.minecraft.entity.passive.EntityOcelot;
|
import net.minecraft.entity.passive.EntityOcelot;
|
||||||
import net.minecraftforge.event.entity.living.LivingEvent;
|
import net.minecraftforge.event.entity.living.LivingEvent;
|
||||||
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
|
|
||||||
public class OcelotsSitOnChestsHandler {
|
public class OcelotsSitOnChestsHandler {
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void changeSittingTaskForOcelots(LivingEvent.LivingUpdateEvent evt)
|
public void changeSittingTaskForOcelots(LivingEvent.LivingUpdateEvent evt)
|
||||||
{
|
{
|
||||||
|
@ -17,11 +19,8 @@ public class OcelotsSitOnChestsHandler {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
List<EntityAITasks.EntityAITaskEntry> tasks = ocelot.tasks.taskEntries;
|
List<EntityAITasks.EntityAITaskEntry> tasks = ocelot.tasks.taskEntries;
|
||||||
|
|
||||||
for (int i = 0; i < tasks.size(); i++)
|
for (EntityAITasks.EntityAITaskEntry task : tasks) {
|
||||||
{
|
if (task.priority == 6 && (task.action instanceof EntityAIOcelotSit) && !(task.action instanceof IronChestAIOcelotSit)) {
|
||||||
EntityAITasks.EntityAITaskEntry task = tasks.get(i);
|
|
||||||
if (task.priority == 6 && (task.action instanceof EntityAIOcelotSit) && !(task.action instanceof IronChestAIOcelotSit))
|
|
||||||
{
|
|
||||||
task.action = new IronChestAIOcelotSit(ocelot, 0.4F);
|
task.action = new IronChestAIOcelotSit(ocelot, 0.4F);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -10,7 +10,8 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package cpw.mods.ironchest;
|
package cpw.mods.ironchest;
|
||||||
|
|
||||||
public class TileEntityDiamondChest extends TileEntityIronChest {
|
public class TileEntityDiamondChest extends TileEntityIronChest
|
||||||
|
{
|
||||||
public TileEntityDiamondChest()
|
public TileEntityDiamondChest()
|
||||||
{
|
{
|
||||||
super(IronChestType.DIAMOND);
|
super(IronChestType.DIAMOND);
|
||||||
|
|
|
@ -12,23 +12,27 @@ package cpw.mods.ironchest;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
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.inventory.IInventory;
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.nbt.NBTTagList;
|
import net.minecraft.nbt.NBTTagList;
|
||||||
|
import net.minecraft.network.NetworkManager;
|
||||||
import net.minecraft.network.Packet;
|
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.AxisAlignedBB;
|
||||||
|
import net.minecraft.util.EnumFacing;
|
||||||
import net.minecraftforge.common.util.Constants;
|
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;
|
private int ticksSinceSync = -1;
|
||||||
public float prevLidAngle;
|
public float prevLidAngle;
|
||||||
public float lidAngle;
|
public float lidAngle;
|
||||||
|
@ -36,9 +40,10 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
|
||||||
private IronChestType type;
|
private IronChestType type;
|
||||||
public ItemStack[] chestContents;
|
public ItemStack[] chestContents;
|
||||||
private ItemStack[] topStacks;
|
private ItemStack[] topStacks;
|
||||||
private int facing;
|
private byte facing;
|
||||||
private boolean inventoryTouched;
|
private boolean inventoryTouched;
|
||||||
private boolean hadStuff;
|
private boolean hadStuff;
|
||||||
|
private String customName;
|
||||||
|
|
||||||
public TileEntityIronChest()
|
public TileEntityIronChest()
|
||||||
{
|
{
|
||||||
|
@ -58,6 +63,19 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
|
||||||
return chestContents;
|
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
|
@Override
|
||||||
public int getSizeInventory()
|
public int getSizeInventory()
|
||||||
{
|
{
|
||||||
|
@ -69,12 +87,6 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
|
||||||
return this.facing;
|
return this.facing;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getInventoryName()
|
|
||||||
{
|
|
||||||
return type.name();
|
|
||||||
}
|
|
||||||
|
|
||||||
public IronChestType getType()
|
public IronChestType getType()
|
||||||
{
|
{
|
||||||
return type;
|
return type;
|
||||||
|
@ -128,24 +140,23 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
|
||||||
}
|
}
|
||||||
if (worldObj != null)
|
if (worldObj != null)
|
||||||
{
|
{
|
||||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
worldObj.markBlockForUpdate(pos);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
hadStuff = true;
|
hadStuff = true;
|
||||||
Arrays.sort(tempCopy, new Comparator<ItemStack>() {
|
Arrays.sort(tempCopy, new Comparator<ItemStack>()
|
||||||
|
{
|
||||||
@Override
|
@Override
|
||||||
public int compare(ItemStack o1, ItemStack o2)
|
public int compare(ItemStack o1, ItemStack o2)
|
||||||
{
|
{
|
||||||
if (o1 == null)
|
if (o1 == null)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
} else if (o2 == null)
|
||||||
else if (o2 == null)
|
|
||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
{
|
{
|
||||||
return o2.stackSize - o1.stackSize;
|
return o2.stackSize - o1.stackSize;
|
||||||
}
|
}
|
||||||
|
@ -169,7 +180,7 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
|
||||||
}
|
}
|
||||||
if (worldObj != null)
|
if (worldObj != null)
|
||||||
{
|
{
|
||||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
worldObj.markBlockForUpdate(pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,8 +203,7 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
|
||||||
}
|
}
|
||||||
markDirty();
|
markDirty();
|
||||||
return itemstack1;
|
return itemstack1;
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -210,12 +220,36 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
|
||||||
markDirty();
|
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
|
@Override
|
||||||
public void readFromNBT(NBTTagCompound nbttagcompound)
|
public void readFromNBT(NBTTagCompound nbttagcompound)
|
||||||
{
|
{
|
||||||
super.readFromNBT(nbttagcompound);
|
super.readFromNBT(nbttagcompound);
|
||||||
|
|
||||||
NBTTagList nbttaglist = nbttagcompound.getTagList("Items", Constants.NBT.TAG_COMPOUND);
|
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++)
|
for (int i = 0; i < nbttaglist.tagCount(); i++)
|
||||||
{
|
{
|
||||||
NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i);
|
NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i);
|
||||||
|
@ -246,7 +280,12 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
|
||||||
}
|
}
|
||||||
|
|
||||||
nbttagcompound.setTag("Items", nbttaglist);
|
nbttagcompound.setTag("Items", nbttaglist);
|
||||||
nbttagcompound.setByte("facing", (byte)facing);
|
nbttagcompound.setByte("facing", facing);
|
||||||
|
|
||||||
|
if (this.hasCustomName())
|
||||||
|
{
|
||||||
|
nbttagcompound.setString("CustomName", this.customName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -262,30 +301,26 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (worldObj.getTileEntity(xCoord, yCoord, zCoord) != this)
|
if (worldObj.getTileEntity(pos) != this)
|
||||||
{
|
{
|
||||||
return false;
|
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
|
@Override
|
||||||
public void updateEntity()
|
public void update()
|
||||||
{
|
{
|
||||||
super.updateEntity();
|
|
||||||
// Resynchronize clients with the server state
|
// 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;
|
this.numUsingPlayers = 0;
|
||||||
float var1 = 5.0F;
|
float var1 = 5.0F;
|
||||||
@SuppressWarnings("unchecked")
|
@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)));
|
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));
|
||||||
Iterator<EntityPlayer> var3 = var2.iterator();
|
|
||||||
|
|
||||||
while (var3.hasNext())
|
for (EntityPlayer var4 : var2)
|
||||||
{
|
{
|
||||||
EntityPlayer var4 = var3.next();
|
|
||||||
|
|
||||||
if (var4.openContainer instanceof ContainerIronChest)
|
if (var4.openContainer instanceof ContainerIronChest)
|
||||||
{
|
{
|
||||||
++this.numUsingPlayers;
|
++this.numUsingPlayers;
|
||||||
|
@ -295,7 +330,7 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
|
||||||
|
|
||||||
if (worldObj != null && !worldObj.isRemote && ticksSinceSync < 0)
|
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)
|
if (!worldObj.isRemote && inventoryTouched)
|
||||||
{
|
{
|
||||||
|
@ -308,9 +343,9 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
|
||||||
float f = 0.1F;
|
float f = 0.1F;
|
||||||
if (numUsingPlayers > 0 && lidAngle == 0.0F)
|
if (numUsingPlayers > 0 && lidAngle == 0.0F)
|
||||||
{
|
{
|
||||||
double d = (double) xCoord + 0.5D;
|
double d = pos.getX() + 0.5D;
|
||||||
double d1 = (double) zCoord + 0.5D;
|
double d1 = pos.getZ() + 0.5D;
|
||||||
worldObj.playSoundEffect(d, (double) yCoord + 0.5D, d1, "random.chestopen", 0.5F, worldObj.rand.nextFloat() * 0.1F + 0.9F);
|
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)
|
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)
|
if (numUsingPlayers > 0)
|
||||||
{
|
{
|
||||||
lidAngle += f;
|
lidAngle += f;
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
{
|
{
|
||||||
lidAngle -= f;
|
lidAngle -= f;
|
||||||
}
|
}
|
||||||
|
@ -330,9 +364,9 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
|
||||||
float f2 = 0.5F;
|
float f2 = 0.5F;
|
||||||
if (lidAngle < f2 && f1 >= f2)
|
if (lidAngle < f2 && f1 >= f2)
|
||||||
{
|
{
|
||||||
double d2 = (double) xCoord + 0.5D;
|
double d2 = pos.getX() + 0.5D;
|
||||||
double d3 = (double) zCoord + 0.5D;
|
double d3 = pos.getZ() + 0.5D;
|
||||||
worldObj.playSoundEffect(d2, (double) yCoord + 0.5D, d3, "random.chestclosed", 0.5F, worldObj.rand.nextFloat() * 0.1F + 0.9F);
|
worldObj.playSoundEffect(d2, pos.getY() + 0.5D, d3, "random.chestclosed", 0.5F, worldObj.rand.nextFloat() * 0.1F + 0.9F);
|
||||||
}
|
}
|
||||||
if (lidAngle < 0.0F)
|
if (lidAngle < 0.0F)
|
||||||
{
|
{
|
||||||
|
@ -347,12 +381,10 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
|
||||||
if (i == 1)
|
if (i == 1)
|
||||||
{
|
{
|
||||||
numUsingPlayers = j;
|
numUsingPlayers = j;
|
||||||
}
|
} else if (i == 2)
|
||||||
else if (i == 2)
|
|
||||||
{
|
{
|
||||||
facing = (byte) j;
|
facing = (byte) j;
|
||||||
}
|
} else if (i == 3)
|
||||||
else if (i == 3)
|
|
||||||
{
|
{
|
||||||
facing = (byte) (j & 0x7);
|
facing = (byte) (j & 0x7);
|
||||||
numUsingPlayers = (j & 0xF8) >> 3;
|
numUsingPlayers = (j & 0xF8) >> 3;
|
||||||
|
@ -361,47 +393,32 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void openInventory()
|
public void openInventory(EntityPlayer player)
|
||||||
{
|
{
|
||||||
if (worldObj == null) return;
|
if (worldObj == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
numUsingPlayers++;
|
numUsingPlayers++;
|
||||||
worldObj.addBlockEvent(xCoord, yCoord, zCoord, IronChest.ironChestBlock, 1, numUsingPlayers);
|
worldObj.addBlockEvent(pos, IronChest.ironChestBlock, 1, numUsingPlayers);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void closeInventory()
|
public void closeInventory(EntityPlayer player)
|
||||||
{
|
{
|
||||||
if (worldObj == null) return;
|
if (worldObj == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
numUsingPlayers--;
|
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;
|
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()
|
public ItemStack[] getTopItemStacks()
|
||||||
{
|
{
|
||||||
return topStacks;
|
return topStacks;
|
||||||
|
@ -413,8 +430,8 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
|
||||||
{
|
{
|
||||||
if (l != type.ordinal())
|
if (l != type.ordinal())
|
||||||
{
|
{
|
||||||
worldObj.setTileEntity(xCoord, yCoord, zCoord, IronChestType.makeEntity(l));
|
worldObj.setTileEntity(pos, IronChestType.makeEntity(l));
|
||||||
return (TileEntityIronChest) worldObj.getTileEntity(xCoord, yCoord, zCoord);
|
return (TileEntityIronChest) worldObj.getTileEntity(pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
|
@ -423,59 +440,83 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
|
||||||
@Override
|
@Override
|
||||||
public Packet getDescriptionPacket()
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
return new S35PacketUpdateTileEntity(pos, 0, nbt);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void handlePacketData(int typeData, int[] intData)
|
@Override
|
||||||
|
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt)
|
||||||
{
|
{
|
||||||
TileEntityIronChest chest = this;
|
if (pkt.getTileEntityType() == 0)
|
||||||
if (this.type.ordinal() != typeData)
|
|
||||||
{
|
{
|
||||||
chest = updateFromMetadata(typeData);
|
NBTTagCompound nbt = pkt.getNbtCompound();
|
||||||
}
|
type = IronChestType.values()[nbt.getInteger("type")];
|
||||||
if (IronChestType.values()[typeData].isTransparent() && intData != null)
|
facing = nbt.getByte("facing");
|
||||||
{
|
|
||||||
int pos = 0;
|
NBTTagList tagList = nbt.getTagList("stacks", Constants.NBT.TAG_COMPOUND);
|
||||||
if (intData.length < chest.topStacks.length * 3)
|
ItemStack[] stacks = new ItemStack[topStacks.length];
|
||||||
|
|
||||||
|
for (int i = 0; i < stacks.length; i++)
|
||||||
{
|
{
|
||||||
return;
|
NBTTagCompound nbt1 = tagList.getCompoundTagAt(i);
|
||||||
|
int j = nbt1.getByte("Slot") & 0xff;
|
||||||
|
if (j >= 0 && j < stacks.length)
|
||||||
|
{
|
||||||
|
stacks[j] = ItemStack.loadItemStackFromNBT(nbt1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for (int i = 0; i < chest.topStacks.length; i++)
|
|
||||||
|
if (type.isTransparent() && stacks != null)
|
||||||
{
|
{
|
||||||
if (intData[pos + 2] != 0)
|
int pos = 0;
|
||||||
|
for (int i = 0; i < topStacks.length; i++)
|
||||||
{
|
{
|
||||||
Item it = Item.getItemById(intData[pos]);
|
if (stacks[pos] != null)
|
||||||
ItemStack is = new ItemStack(it, intData[pos + 2], intData[pos + 1]);
|
{
|
||||||
chest.topStacks[i] = is;
|
topStacks[i] = stacks[pos];
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
topStacks[i] = null;
|
||||||
|
}
|
||||||
|
pos++;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
chest.topStacks[i] = null;
|
|
||||||
}
|
|
||||||
pos += 3;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int[] buildIntDataList()
|
public ItemStack[] buildItemStackDataList()
|
||||||
{
|
{
|
||||||
if (type.isTransparent())
|
if (type.isTransparent())
|
||||||
{
|
{
|
||||||
int[] sortList = new int[topStacks.length * 3];
|
ItemStack[] sortList = new ItemStack[topStacks.length];
|
||||||
int pos = 0;
|
int pos = 0;
|
||||||
for (ItemStack is : topStacks)
|
for (ItemStack is : topStacks)
|
||||||
{
|
{
|
||||||
if (is != null)
|
if (is != null)
|
||||||
{
|
{
|
||||||
sortList[pos++] = Item.getIdFromItem(is.getItem());
|
sortList[pos++] = is;
|
||||||
sortList[pos++] = is.getItemDamage();
|
} else
|
||||||
sortList[pos++] = is.stackSize;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
sortList[pos++] = 0;
|
sortList[pos++] = null;
|
||||||
sortList[pos++] = 0;
|
|
||||||
sortList[pos++] = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return sortList;
|
return sortList;
|
||||||
|
@ -491,34 +532,27 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
|
||||||
ItemStack var2 = this.chestContents[par1];
|
ItemStack var2 = this.chestContents[par1];
|
||||||
this.chestContents[par1] = null;
|
this.chestContents[par1] = null;
|
||||||
return var2;
|
return var2;
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMaxStackSize(int size)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isItemValidForSlot(int i, ItemStack itemstack)
|
public boolean isItemValidForSlot(int i, ItemStack itemstack)
|
||||||
{
|
{
|
||||||
return type.acceptsStack(itemstack);
|
return type.acceptsStack(itemstack);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public void rotateAround()
|
||||||
public boolean hasCustomInventoryName()
|
|
||||||
{
|
{
|
||||||
return false;
|
facing++;
|
||||||
}
|
if (facing > EnumFacing.EAST.ordinal())
|
||||||
|
{
|
||||||
void rotateAround(ForgeDirection axis)
|
facing = (byte) EnumFacing.NORTH.ordinal();
|
||||||
{
|
}
|
||||||
setFacing((byte)ForgeDirection.getOrientation(facing).getRotation(axis).ordinal());
|
setFacing(facing);
|
||||||
worldObj.addBlockEvent(this.xCoord, this.yCoord, this.zCoord, IronChest.ironChestBlock, 2, getFacing());
|
worldObj.addBlockEvent(pos, IronChest.ironChestBlock, 2, facing);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void wasPlaced(EntityLivingBase entityliving, ItemStack itemStack)
|
public void wasPlaced(EntityLivingBase entityliving, ItemStack itemStack)
|
||||||
|
@ -527,6 +561,49 @@ public class TileEntityIronChest extends TileEntity implements IInventory {
|
||||||
|
|
||||||
public void removeAdornments()
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,8 @@ package cpw.mods.ironchest;
|
||||||
|
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
public class Version {
|
public class Version
|
||||||
|
{
|
||||||
private static String major;
|
private static String major;
|
||||||
private static String minor;
|
private static String minor;
|
||||||
private static String rev;
|
private static String rev;
|
||||||
|
|
|
@ -10,21 +10,39 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package cpw.mods.ironchest.client;
|
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.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import cpw.mods.fml.client.FMLClientHandler;
|
import net.minecraftforge.fml.client.FMLClientHandler;
|
||||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
import net.minecraftforge.fml.client.registry.ClientRegistry;
|
||||||
import cpw.mods.ironchest.CommonProxy;
|
import cpw.mods.ironchest.CommonProxy;
|
||||||
|
import cpw.mods.ironchest.IronChest;
|
||||||
import cpw.mods.ironchest.IronChestType;
|
import cpw.mods.ironchest.IronChestType;
|
||||||
import cpw.mods.ironchest.TileEntityIronChest;
|
import cpw.mods.ironchest.TileEntityIronChest;
|
||||||
|
|
||||||
public class ClientProxy extends CommonProxy {
|
public class ClientProxy extends CommonProxy
|
||||||
|
{
|
||||||
@Override
|
@Override
|
||||||
public void registerRenderInformation()
|
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
|
@Override
|
||||||
|
@ -42,12 +60,11 @@ public class ClientProxy extends CommonProxy {
|
||||||
@Override
|
@Override
|
||||||
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
|
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)
|
if (te != null && te instanceof TileEntityIronChest)
|
||||||
{
|
{
|
||||||
return GUIChest.GUI.buildGUI(IronChestType.values()[ID], player.inventory, (TileEntityIronChest) te);
|
return GUIChest.GUI.buildGUI(IronChestType.values()[ID], player.inventory, (TileEntityIronChest) te);
|
||||||
}
|
} else
|
||||||
else
|
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
135
src/main/java/cpw/mods/ironchest/client/TileEntityIronChestRenderer.java
Normal file → Executable file
|
@ -10,38 +10,33 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package cpw.mods.ironchest.client;
|
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.Map;
|
||||||
import java.util.Random;
|
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.model.ModelChest;
|
||||||
import net.minecraft.client.renderer.RenderBlocks;
|
import net.minecraft.client.renderer.GlStateManager;
|
||||||
import net.minecraft.client.renderer.entity.RenderItem;
|
import net.minecraft.client.renderer.entity.RenderEntityItem;
|
||||||
import net.minecraft.client.renderer.entity.RenderManager;
|
|
||||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||||
import net.minecraft.entity.item.EntityItem;
|
import net.minecraft.entity.item.EntityItem;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableMap;
|
import com.google.common.collect.ImmutableMap;
|
||||||
import com.google.common.collect.ImmutableMap.Builder;
|
import com.google.common.collect.ImmutableMap.Builder;
|
||||||
import com.google.common.primitives.SignedBytes;
|
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.IronChestType;
|
||||||
import cpw.mods.ironchest.MappableItemStackWrapper;
|
|
||||||
import cpw.mods.ironchest.TileEntityIronChest;
|
import cpw.mods.ironchest.TileEntityIronChest;
|
||||||
|
|
||||||
public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer {
|
public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer
|
||||||
@SuppressWarnings("unused")
|
{
|
||||||
private static Map<MappableItemStackWrapper, Integer> renderList = new HashMap<MappableItemStackWrapper, Integer>();
|
|
||||||
|
|
||||||
private static Map<IronChestType, ResourceLocation> locations;
|
private static Map<IronChestType, ResourceLocation> locations;
|
||||||
|
|
||||||
static {
|
static {
|
||||||
Builder<IronChestType, ResourceLocation> builder = ImmutableMap.<IronChestType,ResourceLocation>builder();
|
Builder<IronChestType, ResourceLocation> builder = ImmutableMap.<IronChestType,ResourceLocation>builder();
|
||||||
for (IronChestType typ : IronChestType.values()) {
|
for (IronChestType typ : IronChestType.values()) {
|
||||||
|
@ -49,31 +44,24 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer {
|
||||||
}
|
}
|
||||||
locations = builder.build();
|
locations = builder.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
private Random random;
|
private Random random;
|
||||||
|
private RenderEntityItem itemRenderer;
|
||||||
@SuppressWarnings("unused")
|
private ModelChest model;
|
||||||
private RenderBlocks renderBlocks;
|
|
||||||
|
|
||||||
private RenderItem itemRenderer;
|
|
||||||
|
|
||||||
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 },
|
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 }, };
|
{ 0.7F, 0.1F, 0.3F }, { 0.3F, 0.1F, 0.7F }, { 0.7F, 0.1F, 0.7F }, { 0.5F, 0.32F, 0.5F }, };
|
||||||
|
|
||||||
public TileEntityIronChestRenderer()
|
public TileEntityIronChestRenderer()
|
||||||
{
|
{
|
||||||
model = new ModelChest();
|
model = new ModelChest();
|
||||||
random = new Random();
|
random = new Random();
|
||||||
renderBlocks = new RenderBlocks();
|
itemRenderer = new RenderEntityItem(Minecraft.getMinecraft().getRenderManager(), Minecraft.getMinecraft().getRenderItem()){
|
||||||
itemRenderer = new RenderItem() {
|
|
||||||
@Override
|
@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);
|
return SignedBytes.saturatedCast(Math.min(stack.stackSize / 32, 15) + 1);
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public byte getMiniItemCount(ItemStack stack, byte original) {
|
|
||||||
return SignedBytes.saturatedCast(Math.min(stack.stackSize / 32, 7) + 1);
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public boolean shouldBob() {
|
public boolean shouldBob() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -82,28 +70,40 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer {
|
||||||
return false;
|
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) {
|
if (tile == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int facing = 3;
|
int facing = 3;
|
||||||
IronChestType type = tile.getType();
|
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();
|
facing = tile.getFacing();
|
||||||
type = tile.getType();
|
type = tile.getType();
|
||||||
int typ = tile.getWorldObj().getBlockMetadata(tile.xCoord, tile.yCoord, tile.zCoord);
|
IBlockState state = tile.getWorld().getBlockState(tile.getPos());
|
||||||
type = IronChestType.values()[typ];
|
type = (IronChestType)state.getValue(BlockIronChest.VARIANT_PROP);
|
||||||
}
|
}
|
||||||
bindTexture(locations.get(type));
|
|
||||||
glPushMatrix();
|
if (breakStage >= 0)
|
||||||
glEnable(32826 /* GL_RESCALE_NORMAL_EXT */);
|
{
|
||||||
glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
bindTexture(DESTROY_STAGES[breakStage]);
|
||||||
glTranslatef((float) x, (float) y + 1.0F, (float) z + 1.0F);
|
GlStateManager.matrixMode(5890);
|
||||||
glScalef(1.0F, -1F, -1F);
|
GlStateManager.pushMatrix();
|
||||||
glTranslatef(0.5F, 0.5F, 0.5F);
|
GlStateManager.scale(4.0F, 4.0F, 1.0F);
|
||||||
|
GlStateManager.translate(0.0625F, 0.0625F, 0.0625F);
|
||||||
|
GlStateManager.matrixMode(5888);
|
||||||
|
} else
|
||||||
|
bindTexture(locations.get(type));
|
||||||
|
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;
|
int k = 0;
|
||||||
if (facing == 2) {
|
if (facing == 2) {
|
||||||
k = 180;
|
k = 180;
|
||||||
|
@ -117,18 +117,26 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer {
|
||||||
if (facing == 5) {
|
if (facing == 5) {
|
||||||
k = -90;
|
k = -90;
|
||||||
}
|
}
|
||||||
glRotatef(k, 0.0F, 1.0F, 0.0F);
|
GlStateManager.rotate(k, 0.0F, 1.0F, 0.0F);
|
||||||
glTranslatef(-0.5F, -0.5F, -0.5F);
|
GlStateManager.translate(-0.5F, -0.5F, -0.5F);
|
||||||
float lidangle = tile.prevLidAngle + (tile.lidAngle - tile.prevLidAngle) * partialTick;
|
float lidangle = tile.prevLidAngle + (tile.lidAngle - tile.prevLidAngle) * partialTick;
|
||||||
lidangle = 1.0F - lidangle;
|
lidangle = 1.0F - lidangle;
|
||||||
lidangle = 1.0F - lidangle * lidangle * lidangle;
|
lidangle = 1.0F - lidangle * lidangle * lidangle;
|
||||||
model.chestLid.rotateAngleX = -((lidangle * 3.141593F) / 2.0F);
|
model.chestLid.rotateAngleX = -((lidangle * 3.141593F) / 2.0F);
|
||||||
// Render the chest itself
|
// Render the chest itself
|
||||||
model.renderAll();
|
model.renderAll();
|
||||||
glDisable(32826 /* GL_RESCALE_NORMAL_EXT */);
|
if (breakStage >= 0)
|
||||||
glPopMatrix();
|
{
|
||||||
glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
GlStateManager.matrixMode(5890);
|
||||||
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) {
|
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);
|
random.setSeed(254L);
|
||||||
float shiftX;
|
float shiftX;
|
||||||
float shiftY;
|
float shiftY;
|
||||||
|
@ -140,10 +148,9 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer {
|
||||||
shift = 8;
|
shift = 8;
|
||||||
blockScale = 0.85F;
|
blockScale = 0.85F;
|
||||||
}
|
}
|
||||||
glPushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
glDisable(2896 /* GL_LIGHTING */);
|
GlStateManager.translate((float) x, (float) y, (float) z);
|
||||||
glTranslatef((float) x, (float) y, (float) z);
|
EntityItem customitem = new EntityItem(this.getWorld());
|
||||||
EntityItem customitem = new EntityItem(field_147501_a.field_147550_f);
|
|
||||||
customitem.hoverStart = 0f;
|
customitem.hoverStart = 0f;
|
||||||
for (ItemStack item : tile.getTopItemStacks()) {
|
for (ItemStack item : tile.getTopItemStacks()) {
|
||||||
if (shift > shifts.length) {
|
if (shift > shifts.length) {
|
||||||
|
@ -157,25 +164,21 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer {
|
||||||
shiftY = shifts[shift][1];
|
shiftY = shifts[shift][1];
|
||||||
shiftZ = shifts[shift][2];
|
shiftZ = shifts[shift][2];
|
||||||
shift++;
|
shift++;
|
||||||
glPushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
glTranslatef(shiftX, shiftY, shiftZ);
|
GlStateManager.translate(shiftX, shiftY, shiftZ);
|
||||||
glRotatef(timeD, 0.0F, 1.0F, 0.0F);
|
GlStateManager.rotate(timeD, 0.0F, 1.0F, 0.0F);
|
||||||
glScalef(blockScale, blockScale, blockScale);
|
GlStateManager.scale(blockScale, blockScale, blockScale);
|
||||||
customitem.setEntityItemStack(item);
|
customitem.setEntityItemStack(item);
|
||||||
itemRenderer.doRender(customitem, 0, 0, 0, 0, 0);
|
itemRenderer.doRender(customitem, 0, 0, 0, 0, 0);
|
||||||
glPopMatrix();
|
GlStateManager.popMatrix();
|
||||||
}
|
}
|
||||||
glEnable(2896 /* GL_LIGHTING */);
|
GlStateManager.popMatrix();
|
||||||
glPopMatrix();
|
|
||||||
glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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;
|
|
||||||
}
|
|
|
@ -5,6 +5,7 @@ tile.ironchest:COPPER.name=Kupfertruhe
|
||||||
tile.ironchest:SILVER.name=Silbertruhe
|
tile.ironchest:SILVER.name=Silbertruhe
|
||||||
tile.ironchest:CRYSTAL.name=Kristalltruhe
|
tile.ironchest:CRYSTAL.name=Kristalltruhe
|
||||||
tile.ironchest:OBSIDIAN.name=Obsidiantruhe
|
tile.ironchest:OBSIDIAN.name=Obsidiantruhe
|
||||||
|
tile.ironchest:DIRTCHEST9000.name=DirtChest 9000!
|
||||||
|
|
||||||
item.ironchest:IRONGOLD.name=Eisen-zu-Goldtruhen-Upgrade
|
item.ironchest:IRONGOLD.name=Eisen-zu-Goldtruhen-Upgrade
|
||||||
item.ironchest:GOLDDIAMOND.name=Gold-zu-Diamanttruhen-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:WOODIRON.name=Holz-zu-Eisentruhen-Upgrade
|
||||||
item.ironchest:WOODCOPPER.name=Holz-zu-Kupfertruhen-Upgrade
|
item.ironchest:WOODCOPPER.name=Holz-zu-Kupfertruhen-Upgrade
|
||||||
item.ironchest:DIAMONDOBSIDIAN.name=Diamant-zu-Obsidiantruhen-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.
|
||||||
|
|
|
@ -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=Αναβάθμιση από Διαμαντένιο σε Σεντούκι Οψιδιανού
|
|
@ -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,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
|
|
@ -1,12 +1,12 @@
|
||||||
#fr_FR translated by robin4002
|
#fr_FR translated by robin4002
|
||||||
|
|
||||||
tile.ironchest:IRON.name=Coffre en fer
|
tile.ironchest:IRON.name=Coffre en Fer
|
||||||
tile.ironchest:GOLD.name=Coffre en or
|
tile.ironchest:GOLD.name=Coffre en Or
|
||||||
tile.ironchest:DIAMOND.name=Coffre en diamant
|
tile.ironchest:DIAMOND.name=Coffre en Diamant
|
||||||
tile.ironchest:COPPER.name=Coffre en cuivre
|
tile.ironchest:COPPER.name=Coffre en Cuivre
|
||||||
tile.ironchest:SILVER.name=Coffre en argent
|
tile.ironchest:SILVER.name=Coffre en Argent
|
||||||
tile.ironchest:CRYSTAL.name=Coffre en cristal
|
tile.ironchest:CRYSTAL.name=Coffre en Cristal
|
||||||
tile.ironchest:OBSIDIAN.name=Coffre en obsidian
|
tile.ironchest:OBSIDIAN.name=Coffre en Obsidienne
|
||||||
|
|
||||||
item.ironchest:IRONGOLD.name=Amélioration de coffre en fer à or
|
item.ironchest:IRONGOLD.name=Amélioration de coffre en fer à or
|
||||||
item.ironchest:GOLDDIAMOND.name=Amélioration de coffre en or à diamant
|
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:DIAMONDCRYSTAL.name=Amélioration de coffre en diamant à crital
|
||||||
item.ironchest:WOODIRON.name=Amélioration de coffre en bois à fer
|
item.ironchest:WOODIRON.name=Amélioration de coffre en bois à fer
|
||||||
item.ironchest:WOODCOPPER.name=Amélioration de coffre en bois à cuivre
|
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
|
||||||
|
|
|
@ -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.
|
|
@ -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은 환경 친화적입니다. 가이드북의 처분에는 책임이 따릅니다, 그러니 어떠한 경우라도 용암에 버리지 마세요. 우리는 매우 슬플 것입니다.
|
|
@ -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.
|
|
@ -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,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.
|
|
@ -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,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.
|
|
@ -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十分环保。请小心收藏好本手册,如果您随手丢进岩浆的话,我们可会伤心的。
|
|
@ -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十分環保。請小心收藏好本手冊,如果您隨手丟進岩漿的話,我們可會傷心的。
|
|
@ -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" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -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" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -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" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -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" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -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" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -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" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -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" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -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" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -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 ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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 ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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 ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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 ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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 ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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 ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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 ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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 ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -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 ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Before Width: | Height: | Size: 679 B |
Before Width: | Height: | Size: 661 B |
Before Width: | Height: | Size: 546 B |
Before Width: | Height: | Size: 396 B |
Before Width: | Height: | Size: 396 B |
Before Width: | Height: | Size: 382 B |
Before Width: | Height: | Size: 762 B |
Before Width: | Height: | Size: 719 B |
Before Width: | Height: | Size: 572 B |
Before Width: | Height: | Size: 784 B |
Before Width: | Height: | Size: 726 B |
Before Width: | Height: | Size: 572 B |
Before Width: | Height: | Size: 787 B |
Before Width: | Height: | Size: 726 B |
Before Width: | Height: | Size: 572 B |
Before Width: | Height: | Size: 586 B |
Before Width: | Height: | Size: 593 B |
Before Width: | Height: | Size: 604 B |
Before Width: | Height: | Size: 625 B |
Before Width: | Height: | Size: 608 B |
Before Width: | Height: | Size: 527 B |
0
src/main/resources/assets/ironchest/textures/gui/coppercontainer.png
Normal file → Executable file
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
0
src/main/resources/assets/ironchest/textures/gui/diamondcontainer.png
Normal file → Executable file
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
0
src/main/resources/assets/ironchest/textures/gui/silvercontainer.png
Normal file → Executable file
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
0
src/main/resources/assets/ironchest/textures/items/copperIronUpgrade.png
Normal file → Executable file
Before Width: | Height: | Size: 480 B After Width: | Height: | Size: 480 B |