Merge pull request #44 from ganymedes01/master

Bunch of fixes and cleanups. See description for details
This commit is contained in:
Zach 2015-06-15 17:42:57 -04:00
commit c55603a1f0
42 changed files with 480 additions and 513 deletions

View File

@ -1,52 +0,0 @@
—MAPPINGS NOW IN MCPBOT—
——————————
FIXES
——————————
—GameData—
private int registerBlock(Block block, String name, int idHint)
{
// handle ItemBlock-before-Block registrations
ItemBlock itemBlock = null;
for (Item item : iItemRegistry.typeSafeIterable()) // find matching ItemBlock
{
if (item instanceof ItemBlock && ((ItemBlock) item).blockInstance == block)
{
itemBlock = (ItemBlock) item;
break;
}
}
if (itemBlock != null) // has ItemBlock, adjust id and clear the slot already occupied by the corresponding item
{
idHint = iItemRegistry.getId(itemBlock);
FMLLog.fine("Found matching ItemBlock %s for Block %s at id %d", itemBlock, block, idHint);
freeSlot(idHint, block); // temporarily free the slot occupied by the Item for the block registration
}
// add
int blockId = iBlockRegistry.add(idHint, name, block, availabilityMap);
if (itemBlock != null) // verify
{
if (blockId != idHint) throw new IllegalStateException(String.format("Block at itemblock id %d insertion failed, got id %d.", idHint, blockId));
verifyItemBlockName(itemBlock);
}
//Hackery added by me which probably shouldn't be done
Iterator iterator1 = block.getBlockState().getValidStates().iterator();
while (iterator1.hasNext())
{
IBlockState iblockstate = (IBlockState)iterator1.next();
int i = blockRegistry.getIDForObject(block) << 4 | block.getMetaFromBlockState(iblockstate);
Block.field_176229_d.func_148746_a(iblockstate, i);
}
//End hackery
useSlot(blockId);
((RegistryDelegate.Delegate<Block>) block.delegate).setName(name);
return blockId;
}

View File

@ -70,12 +70,6 @@ public class BlockIronChest extends BlockContainer
return false;
}
@Override
public int getRenderType()
{
return 2;
}
@Override
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_)
{
@ -128,7 +122,7 @@ public class BlockIronChest extends BlockContainer
@Override
public int getMetaFromState(IBlockState blockState)
{
return ((IronChestType)blockState.getValue(VARIANT_PROP)).ordinal();
return ((IronChestType) blockState.getValue(VARIANT_PROP)).ordinal();
}
@Override
@ -141,7 +135,7 @@ public class BlockIronChest extends BlockContainer
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));
ItemStack stack = new ItemStack(this, 1, getMetaFromState(state));
IronChestType.values()[IronChestType.validateMeta(getMetaFromState(state))].adornItemDrop(stack);
items.add(stack);
return items;
@ -158,7 +152,7 @@ public class BlockIronChest extends BlockContainer
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState blockState, EntityLivingBase entityliving, ItemStack itemStack)
{
byte chestFacing = 0;
int facing = MathHelper.floor_double((double) ((entityliving.rotationYaw * 4F) / 360F) + 0.5D) & 3;
int facing = MathHelper.floor_double((entityliving.rotationYaw * 4F) / 360F + 0.5D) & 3;
if (facing == 0)
{
chestFacing = 2;
@ -188,7 +182,7 @@ public class BlockIronChest extends BlockContainer
@Override
public int damageDropped(IBlockState state)
{
return IronChestType.validateMeta(((IronChestType)state.getValue(VARIANT_PROP)).ordinal());
return IronChestType.validateMeta(((IronChestType) state.getValue(VARIANT_PROP)).ordinal());
}
@Override
@ -225,8 +219,7 @@ public class BlockIronChest extends BlockContainer
i1 = itemstack.stackSize;
}
itemstack.stackSize -= i1;
EntityItem entityitem = new EntityItem(world, (float) pos.getX() + f, (float) pos.getY() + (newSize > 0 ? 1 : 0) + f1, (float) pos.getZ() + f2,
new ItemStack(itemstack.getItem(), i1, itemstack.getMetadata()));
EntityItem entityitem = new EntityItem(world, pos.getX() + f, (float) pos.getY() + (newSize > 0 ? 1 : 0) + f1, pos.getZ() + f2, new ItemStack(itemstack.getItem(), i1, itemstack.getMetadata()));
float f3 = 0.05F;
entityitem.motionX = (float) random.nextGaussian() * f3;
entityitem.motionY = (float) random.nextGaussian() * f3 + 0.2F;
@ -243,20 +236,21 @@ public class BlockIronChest extends BlockContainer
@Override
public float getExplosionResistance(World world, BlockPos pos, Entity exploder, Explosion explosion)
{
TileEntity te = world.getTileEntity(pos);
if (te instanceof TileEntityIronChest)
{
TileEntityIronChest teic = (TileEntityIronChest) te;
if (teic.getType().isExplosionResistant())
{
return 10000F;
}
}
return super.getExplosionResistance(world, pos, exploder, explosion);
TileEntity te = world.getTileEntity(pos);
if (te instanceof TileEntityIronChest)
{
TileEntityIronChest teic = (TileEntityIronChest) te;
if (teic.getType().isExplosionResistant())
{
return 10000F;
}
}
return super.getExplosionResistance(world, pos, exploder, explosion);
}
@Override
public boolean hasComparatorInputOverride() {
public boolean hasComparatorInputOverride()
{
return true;
}
@ -266,12 +260,13 @@ public class BlockIronChest extends BlockContainer
TileEntity te = world.getTileEntity(pos);
if (te instanceof IInventory)
{
return Container.calcRedstoneFromInventory((IInventory)te);
return Container.calcRedstoneFromInventory((IInventory) te);
}
return 0;
}
private static final EnumFacing[] validRotationAxes = new EnumFacing[] { EnumFacing.UP, EnumFacing.DOWN };
@Override
public EnumFacing[] getValidRotations(World worldObj, BlockPos pos)
{
@ -288,7 +283,8 @@ public class BlockIronChest extends BlockContainer
if (axis == EnumFacing.UP || axis == EnumFacing.DOWN)
{
TileEntity tileEntity = worldObj.getTileEntity(pos);
if (tileEntity instanceof TileEntityIronChest) {
if (tileEntity instanceof TileEntityIronChest)
{
TileEntityIronChest icte = (TileEntityIronChest) tileEntity;
icte.rotateAround();
}

View File

@ -10,8 +10,6 @@
******************************************************************************/
package cpw.mods.ironchest;
import net.minecraft.client.Minecraft;
import net.minecraft.init.Blocks;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
@ -21,9 +19,6 @@ import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.network.NetworkRegistry;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.relauncher.Side;
@Mod(modid = "IronChest", name = "Iron Chests", dependencies = "required-after:FML@[7.2,)")
public class IronChest
@ -39,27 +34,22 @@ public class IronChest
{
Version.init(event.getVersionProperties());
event.getModMetadata().version = Version.fullVersionString();
PacketHandler.INSTANCE.ordinal();
}
@EventHandler
public void load(FMLInitializationEvent evt)
{
//Registration has been moved to init to account for the registration of inventory models
//Minecraft.getRenderItem() returns null before this stage
// 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();
RegistryHelper.registerBlock(ironChestBlock, ItemIronChest.class, "BlockIronChest");
if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getModelManager().getBlockModelShapes().registerBuiltInBlocks(ironChestBlock);
GameRegistry.registerBlock(ironChestBlock, ItemIronChest.class, "BlockIronChest");
for (IronChestType typ : IronChestType.values())
{
GameRegistry.registerTileEntityWithAlternatives(typ.clazz, "IronChest." + typ.name(), typ.name());
proxy.registerTileEntitySpecialRenderer(typ);
}
OreDictionary.registerOre("chestWood", Blocks.chest);
IronChestType.registerBlocksAndRecipes(ironChestBlock);
ChestChangerType.generateRecipes();
NetworkRegistry.INSTANCE.registerGuiHandler(instance, proxy);

View File

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

View File

@ -1,203 +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.item.ItemStack;
import net.minecraft.network.Packet;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.network.ByteBufUtils;
import net.minecraftforge.fml.common.network.FMLEmbeddedChannel;
import net.minecraftforge.fml.common.network.FMLIndexedMessageToMessageCodec;
import net.minecraftforge.fml.common.network.NetworkRegistry;
import net.minecraftforge.fml.common.network.internal.FMLProxyPacket;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.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(new BlockPos(msg.x, msg.y, msg.z));
if (te instanceof TileEntityIronChest)
{
TileEntityIronChest icte = (TileEntityIronChest) te;
icte.setFacing(msg.facing);
icte.handlePacketData(msg.type, msg.itemStacks);
}
}
}
/**
* 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;
ItemStack[] itemStacks;
}
/**
* 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.itemStacks != null);
if (msg.itemStacks != null)
{
for (ItemStack i: msg.itemStacks)
{
ByteBufUtils.writeItemStack(target, 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.itemStacks = new ItemStack[0];
if (hasStacks)
{
msg.itemStacks = new ItemStack[8];
for (int i = 0; i < msg.itemStacks.length; i++)
{
msg.itemStacks[i] = ByteBufUtils.readItemStack(dat);
}
}
}
}
/**
* 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.getPos().getX();
msg.y = tileEntityIronChest.getPos().getY();
msg.z = tileEntityIronChest.getPos().getZ();
msg.type = tileEntityIronChest.getType().ordinal();
msg.facing = tileEntityIronChest.getFacing();
msg.itemStacks = tileEntityIronChest.buildItemStackDataList();
return INSTANCE.channels.get(Side.SERVER).generatePacketFrom(msg);
}
}

View File

@ -1,38 +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 java.util.Iterator;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemBlock;
import net.minecraftforge.fml.common.registry.GameRegistry;
public class RegistryHelper
{
public static Block registerBlock(Block block, Class<? extends ItemBlock> itemclass, String name, Object... itemCtorArgs)
{
block = GameRegistry.registerBlock(block, itemclass, name, itemCtorArgs);
Iterator iterator = block.getBlockState().getValidStates().iterator();
while (iterator.hasNext())
{
IBlockState iblockstate = (IBlockState)iterator.next();
int id = Block.blockRegistry.getIDForObject(block) << 4 | block.getMetaFromState(iblockstate);
Block.BLOCK_STATE_IDS.put(iblockstate, id);
}
return block;
}
}

View File

@ -22,11 +22,14 @@ import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.network.NetworkManager;
import net.minecraft.network.Packet;
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
import net.minecraft.server.gui.IUpdatePlayerListBox;
import net.minecraft.tileentity.TileEntityLockable;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.util.Constants;
public class TileEntityIronChest extends TileEntityLockable implements IUpdatePlayerListBox, IInventory
{
@ -37,7 +40,7 @@ public class TileEntityIronChest extends TileEntityLockable implements IUpdatePl
private IronChestType type;
public ItemStack[] chestContents;
private ItemStack[] topStacks;
private int facing;
private byte facing;
private boolean inventoryTouched;
private boolean hadStuff;
private String customName;
@ -60,7 +63,7 @@ public class TileEntityIronChest extends TileEntityLockable implements IUpdatePl
return chestContents;
}
public void setContents (ItemStack[] contents)
public void setContents(ItemStack[] contents)
{
chestContents = new ItemStack[getSizeInventory()];
for (int i = 0; i < contents.length; i++)
@ -142,19 +145,18 @@ public class TileEntityIronChest extends TileEntityLockable implements IUpdatePl
return;
}
hadStuff = true;
Arrays.sort(tempCopy, new Comparator<ItemStack>() {
Arrays.sort(tempCopy, new Comparator<ItemStack>()
{
@Override
public int compare(ItemStack o1, ItemStack o2)
{
if (o1 == null)
{
return 1;
}
else if (o2 == null)
} else if (o2 == null)
{
return -1;
}
else
} else
{
return o2.stackSize - o1.stackSize;
}
@ -201,8 +203,7 @@ public class TileEntityIronChest extends TileEntityLockable implements IUpdatePl
}
markDirty();
return itemstack1;
}
else
} else
{
return null;
}
@ -241,12 +242,10 @@ public class TileEntityIronChest extends TileEntityLockable implements IUpdatePl
{
super.readFromNBT(nbttagcompound);
//10 - TAG_COMPOUND
NBTTagList nbttaglist = nbttagcompound.getTagList("Items", 10);
NBTTagList nbttaglist = nbttagcompound.getTagList("Items", Constants.NBT.TAG_COMPOUND);
this.chestContents = new ItemStack[getSizeInventory()];
//8 - TAG_STRING
if (nbttagcompound.hasKey("CustomName", 8))
if (nbttagcompound.hasKey("CustomName", Constants.NBT.TAG_STRING))
{
this.customName = nbttagcompound.getString("CustomName");
}
@ -281,7 +280,7 @@ public class TileEntityIronChest extends TileEntityLockable implements IUpdatePl
}
nbttagcompound.setTag("Items", nbttaglist);
nbttagcompound.setByte("facing", (byte)facing);
nbttagcompound.setByte("facing", facing);
if (this.hasCustomName())
{
@ -306,7 +305,7 @@ public class TileEntityIronChest extends TileEntityLockable implements IUpdatePl
{
return false;
}
return entityplayer.getDistanceSq((double) pos.getX() + 0.5D, (double) pos.getY() + 0.5D, (double) pos.getZ() + 0.5D) <= 64D;
return entityplayer.getDistanceSq(pos.getX() + 0.5D, pos.getY() + 0.5D, pos.getZ() + 0.5D) <= 64D;
}
@Override
@ -318,10 +317,12 @@ public class TileEntityIronChest extends TileEntityLockable implements IUpdatePl
this.numUsingPlayers = 0;
float var1 = 5.0F;
@SuppressWarnings("unchecked")
List<EntityPlayer> var2 = this.worldObj.getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB((double)((float)pos.getX() - var1), (double)((float)pos.getY() - var1), (double)((float)pos.getZ() - var1), (double)((float)(pos.getX() + 1) + var1), (double)((float)(pos.getY() + 1) + var1), (double)((float)(pos.getZ() + 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));
for (EntityPlayer var4 : var2) {
if (var4.openContainer instanceof ContainerIronChest) {
for (EntityPlayer var4 : var2)
{
if (var4.openContainer instanceof ContainerIronChest)
{
++this.numUsingPlayers;
}
}
@ -342,9 +343,9 @@ public class TileEntityIronChest extends TileEntityLockable implements IUpdatePl
float f = 0.1F;
if (numUsingPlayers > 0 && lidAngle == 0.0F)
{
double d = (double) pos.getX() + 0.5D;
double d1 = (double) pos.getZ() + 0.5D;
worldObj.playSoundEffect(d, (double) pos.getY() + 0.5D, d1, "random.chestopen", 0.5F, worldObj.rand.nextFloat() * 0.1F + 0.9F);
double d = pos.getX() + 0.5D;
double d1 = pos.getZ() + 0.5D;
worldObj.playSoundEffect(d, pos.getY() + 0.5D, d1, "random.chestopen", 0.5F, worldObj.rand.nextFloat() * 0.1F + 0.9F);
}
if (numUsingPlayers == 0 && lidAngle > 0.0F || numUsingPlayers > 0 && lidAngle < 1.0F)
{
@ -352,8 +353,7 @@ public class TileEntityIronChest extends TileEntityLockable implements IUpdatePl
if (numUsingPlayers > 0)
{
lidAngle += f;
}
else
} else
{
lidAngle -= f;
}
@ -364,9 +364,9 @@ public class TileEntityIronChest extends TileEntityLockable implements IUpdatePl
float f2 = 0.5F;
if (lidAngle < f2 && f1 >= f2)
{
double d2 = (double) pos.getX() + 0.5D;
double d3 = (double) pos.getZ() + 0.5D;
worldObj.playSoundEffect(d2, (double) pos.getY() + 0.5D, d3, "random.chestclosed", 0.5F, worldObj.rand.nextFloat() * 0.1F + 0.9F);
double d2 = pos.getX() + 0.5D;
double d3 = pos.getZ() + 0.5D;
worldObj.playSoundEffect(d2, pos.getY() + 0.5D, d3, "random.chestclosed", 0.5F, worldObj.rand.nextFloat() * 0.1F + 0.9F);
}
if (lidAngle < 0.0F)
{
@ -381,12 +381,10 @@ public class TileEntityIronChest extends TileEntityLockable implements IUpdatePl
if (i == 1)
{
numUsingPlayers = j;
}
else if (i == 2)
} else if (i == 2)
{
facing = (byte) j;
}
else if (i == 3)
} else if (i == 3)
{
facing = (byte) (j & 0x7);
numUsingPlayers = (j & 0xF8) >> 3;
@ -397,7 +395,10 @@ public class TileEntityIronChest extends TileEntityLockable implements IUpdatePl
@Override
public void openInventory(EntityPlayer player)
{
if (worldObj == null) return;
if (worldObj == null)
{
return;
}
numUsingPlayers++;
worldObj.addBlockEvent(pos, IronChest.ironChestBlock, 1, numUsingPlayers);
}
@ -405,12 +406,15 @@ public class TileEntityIronChest extends TileEntityLockable implements IUpdatePl
@Override
public void closeInventory(EntityPlayer player)
{
if (worldObj == null) return;
if (worldObj == null)
{
return;
}
numUsingPlayers--;
worldObj.addBlockEvent(pos, IronChest.ironChestBlock, 1, numUsingPlayers);
}
public void setFacing(int facing2)
public void setFacing(byte facing2)
{
this.facing = facing2;
}
@ -436,30 +440,65 @@ public class TileEntityIronChest extends TileEntityLockable implements IUpdatePl
@Override
public Packet getDescriptionPacket()
{
return PacketHandler.getPacket(this);
NBTTagCompound nbt = new NBTTagCompound();
nbt.setInteger("type", getType().ordinal());
nbt.setByte("facing", facing);
ItemStack[] stacks = buildItemStackDataList();
if (stacks != null)
{
NBTTagList nbttaglist = new NBTTagList();
for (int i = 0; i < stacks.length; i++)
{
if (stacks[i] != null)
{
NBTTagCompound nbttagcompound1 = new NBTTagCompound();
nbttagcompound1.setByte("Slot", (byte) i);
stacks[i].writeToNBT(nbttagcompound1);
nbttaglist.appendTag(nbttagcompound1);
}
}
nbt.setTag("stacks", nbttaglist);
}
return new S35PacketUpdateTileEntity(pos, 0, nbt);
}
public void handlePacketData(int typeData, ItemStack[] intData)
@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt)
{
TileEntityIronChest chest = this;
if (this.type.ordinal() != typeData)
if (pkt.getTileEntityType() == 0)
{
chest = updateFromMetadata(typeData);
}
if (IronChestType.values()[typeData].isTransparent() && intData != null)
{
int pos = 0;
for (int i = 0; i < chest.topStacks.length; i++)
NBTTagCompound nbt = pkt.getNbtCompound();
type = IronChestType.values()[nbt.getInteger("type")];
facing = nbt.getByte("facing");
NBTTagList tagList = nbt.getTagList("stacks", Constants.NBT.TAG_COMPOUND);
ItemStack[] stacks = new ItemStack[topStacks.length];
for (int i = 0; i < stacks.length; i++)
{
if (intData[pos] != null)
NBTTagCompound nbt1 = tagList.getCompoundTagAt(i);
int j = nbt1.getByte("Slot") & 0xff;
if (j >= 0 && j < stacks.length)
{
chest.topStacks[i] = intData[pos];
stacks[j] = ItemStack.loadItemStackFromNBT(nbt1);
}
else
}
if (type.isTransparent() && stacks != null)
{
int pos = 0;
for (int i = 0; i < topStacks.length; i++)
{
chest.topStacks[i] = null;
if (stacks[pos] != null)
{
topStacks[i] = stacks[pos];
} else
{
topStacks[i] = null;
}
pos++;
}
pos ++;
}
}
}
@ -475,8 +514,7 @@ public class TileEntityIronChest extends TileEntityLockable implements IUpdatePl
if (is != null)
{
sortList[pos++] = is;
}
else
} else
{
sortList[pos++] = null;
}
@ -494,31 +532,25 @@ public class TileEntityIronChest extends TileEntityLockable implements IUpdatePl
ItemStack var2 = this.chestContents[par1];
this.chestContents[par1] = null;
return var2;
}
else
} else
{
return null;
}
}
public void setMaxStackSize(int size)
{
}
@Override
public boolean isItemValidForSlot(int i, ItemStack itemstack)
{
return type.acceptsStack(itemstack);
}
void rotateAround()
public void rotateAround()
{
facing++;
if(facing > EnumFacing.EAST.ordinal())
{
facing = EnumFacing.NORTH.ordinal();
}
facing++;
if (facing > EnumFacing.EAST.ordinal())
{
facing = (byte) EnumFacing.NORTH.ordinal();
}
setFacing(facing);
worldObj.addBlockEvent(pos, IronChest.ironChestBlock, 2, facing);
}
@ -527,7 +559,9 @@ public class TileEntityIronChest extends TileEntityLockable implements IUpdatePl
{
}
public void removeAdornments() {}
public void removeAdornments()
{
}
@Override
public int getField(int id)
@ -536,7 +570,9 @@ public class TileEntityIronChest extends TileEntityLockable implements IUpdatePl
}
@Override
public void setField(int id, int value) {}
public void setField(int id, int value)
{
}
@Override
public int getFieldCount()
@ -568,6 +604,6 @@ public class TileEntityIronChest extends TileEntityLockable implements IUpdatePl
@Override
public boolean canRenderBreaking()
{
return true;
return true;
}
}

View File

@ -10,8 +10,12 @@
******************************************************************************/
package cpw.mods.ironchest.client;
import net.minecraft.client.renderer.tileentity.TileEntityItemStackRenderer;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.ItemModelMesher;
import net.minecraft.client.resources.model.ModelBakery;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
@ -27,15 +31,18 @@ public class ClientProxy extends CommonProxy
@Override
public void registerRenderInformation()
{
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getModelManager().getBlockModelShapes().registerBuiltInBlocks(IronChest.ironChestBlock);
ItemModelMesher mesher = Minecraft.getMinecraft().getRenderItem().getItemModelMesher();
for (IronChestType chestType : IronChestType.values())
{
if (chestType != IronChestType.WOOD)
{
ModelHelper.registerBlock(IronChest.ironChestBlock, chestType.ordinal(), "ironchest:BlockIronChest");
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());
}
}
TileEntityItemStackRenderer.instance = new IronChestRenderHelper();
}
@Override
@ -57,8 +64,7 @@ public class ClientProxy extends CommonProxy
if (te != null && te instanceof TileEntityIronChest)
{
return GUIChest.GUI.buildGUI(IronChestType.values()[ID], player.inventory, (TileEntityIronChest) te);
}
else
} else
{
return null;
}

View File

@ -1,52 +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.TileEntityItemStackRenderer;
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.item.ItemStack;
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 TileEntityItemStackRenderer
{
private Map<Integer, TileEntityIronChest> itemRenders = Maps.newHashMap();
public IronChestRenderHelper()
{
for (IronChestType typ : IronChestType.values())
{
itemRenders.put(typ.ordinal(), (TileEntityIronChest) IronChest.ironChestBlock.createNewTileEntity(null, typ.ordinal()));
}
}
@Override
public void renderByItem(ItemStack itemStack)
{
Block block = Block.getBlockFromItem(itemStack.getItem());
if (block == IronChest.ironChestBlock)
{
TileEntityRendererDispatcher.instance.renderTileEntityAt(itemRenders.get(itemStack.getMetadata()), 0.0D, 0.0D, 0.0D, 0.0F);
}
else
{
super.renderByItem(itemStack);
}
}
}

View File

@ -1,3 +0,0 @@
{
"parent": "builtin/entity"
}

View File

@ -0,0 +1,40 @@
{
"textures": {
"texture": "ironchest:model/copperchest"
},
"elements": [
{ "from": [ 1, 0, 1 ],
"to": [ 15, 10, 15 ],
"faces": {
"down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" },
"up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" },
"north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" },
"south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" },
"west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" },
"east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" }
}
},
{ "from": [ 1, 9, 1 ],
"to": [ 15, 14, 15 ],
"faces": {
"down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" },
"up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" },
"north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" },
"south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" },
"west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" },
"east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" }
}
},
{ "from": [ 7, 7, 0 ],
"to": [ 9, 11, 1 ],
"faces": {
"down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" },
"up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" },
"north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" },
"south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" },
"west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" },
"east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" }
}
}
]
}

View File

@ -0,0 +1,40 @@
{
"textures": {
"texture": "ironchest:model/crystalchest"
},
"elements": [
{ "from": [ 1, 0, 1 ],
"to": [ 15, 10, 15 ],
"faces": {
"down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" },
"up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" },
"north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" },
"south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" },
"west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" },
"east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" }
}
},
{ "from": [ 1, 9, 1 ],
"to": [ 15, 14, 15 ],
"faces": {
"down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" },
"up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" },
"north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" },
"south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" },
"west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" },
"east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" }
}
},
{ "from": [ 7, 7, 0 ],
"to": [ 9, 11, 1 ],
"faces": {
"down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" },
"up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" },
"north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" },
"south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" },
"west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" },
"east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" }
}
}
]
}

View File

@ -0,0 +1,40 @@
{
"textures": {
"texture": "ironchest:model/diamondchest"
},
"elements": [
{ "from": [ 1, 0, 1 ],
"to": [ 15, 10, 15 ],
"faces": {
"down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" },
"up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" },
"north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" },
"south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" },
"west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" },
"east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" }
}
},
{ "from": [ 1, 9, 1 ],
"to": [ 15, 14, 15 ],
"faces": {
"down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" },
"up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" },
"north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" },
"south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" },
"west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" },
"east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" }
}
},
{ "from": [ 7, 7, 0 ],
"to": [ 9, 11, 1 ],
"faces": {
"down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" },
"up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" },
"north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" },
"south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" },
"west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" },
"east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" }
}
}
]
}

View File

@ -0,0 +1,40 @@
{
"textures": {
"texture": "ironchest:model/dirtchest"
},
"elements": [
{ "from": [ 1, 0, 1 ],
"to": [ 15, 10, 15 ],
"faces": {
"down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" },
"up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" },
"north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" },
"south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" },
"west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" },
"east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" }
}
},
{ "from": [ 1, 9, 1 ],
"to": [ 15, 14, 15 ],
"faces": {
"down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" },
"up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" },
"north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" },
"south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" },
"west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" },
"east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" }
}
},
{ "from": [ 7, 7, 0 ],
"to": [ 9, 11, 1 ],
"faces": {
"down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" },
"up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" },
"north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" },
"south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" },
"west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" },
"east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" }
}
}
]
}

View File

@ -0,0 +1,40 @@
{
"textures": {
"texture": "ironchest:model/goldchest"
},
"elements": [
{ "from": [ 1, 0, 1 ],
"to": [ 15, 10, 15 ],
"faces": {
"down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" },
"up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" },
"north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" },
"south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" },
"west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" },
"east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" }
}
},
{ "from": [ 1, 9, 1 ],
"to": [ 15, 14, 15 ],
"faces": {
"down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" },
"up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" },
"north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" },
"south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" },
"west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" },
"east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" }
}
},
{ "from": [ 7, 7, 0 ],
"to": [ 9, 11, 1 ],
"faces": {
"down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" },
"up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" },
"north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" },
"south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" },
"west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" },
"east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" }
}
}
]
}

View File

@ -0,0 +1,40 @@
{
"textures": {
"texture": "ironchest:model/ironchest"
},
"elements": [
{ "from": [ 1, 0, 1 ],
"to": [ 15, 10, 15 ],
"faces": {
"down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" },
"up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" },
"north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" },
"south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" },
"west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" },
"east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" }
}
},
{ "from": [ 1, 9, 1 ],
"to": [ 15, 14, 15 ],
"faces": {
"down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" },
"up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" },
"north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" },
"south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" },
"west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" },
"east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" }
}
},
{ "from": [ 7, 7, 0 ],
"to": [ 9, 11, 1 ],
"faces": {
"down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" },
"up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" },
"north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" },
"south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" },
"west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" },
"east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" }
}
}
]
}

View File

@ -0,0 +1,40 @@
{
"textures": {
"texture": "ironchest:model/obsidianchest"
},
"elements": [
{ "from": [ 1, 0, 1 ],
"to": [ 15, 10, 15 ],
"faces": {
"down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" },
"up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" },
"north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" },
"south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" },
"west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" },
"east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" }
}
},
{ "from": [ 1, 9, 1 ],
"to": [ 15, 14, 15 ],
"faces": {
"down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" },
"up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" },
"north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" },
"south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" },
"west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" },
"east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" }
}
},
{ "from": [ 7, 7, 0 ],
"to": [ 9, 11, 1 ],
"faces": {
"down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" },
"up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" },
"north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" },
"south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" },
"west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" },
"east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" }
}
}
]
}

View File

@ -0,0 +1,40 @@
{
"textures": {
"texture": "ironchest:model/silverchest"
},
"elements": [
{ "from": [ 1, 0, 1 ],
"to": [ 15, 10, 15 ],
"faces": {
"down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" },
"up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" },
"north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" },
"south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" },
"west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" },
"east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" }
}
},
{ "from": [ 1, 9, 1 ],
"to": [ 15, 14, 15 ],
"faces": {
"down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" },
"up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" },
"north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" },
"south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" },
"west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" },
"east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" }
}
},
{ "from": [ 7, 7, 0 ],
"to": [ 9, 11, 1 ],
"faces": {
"down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" },
"up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" },
"north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" },
"south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" },
"west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" },
"east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" }
}
}
]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 679 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 661 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 546 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 396 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 396 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 382 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 762 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 719 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 784 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 787 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 586 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 593 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 604 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 527 B