Implement metal blocks and clean up some unloc names

This commit is contained in:
tterrag1098 committed 2015-01-27 01:45:37 -05:00
1 parent 42237f0be8
commit 9a05bc03a9
12 files changed
+986 -849

No files matched your search

@@ -5,6 +5,9 @@ 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.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraftforge.common.util.ForgeDirection;
@@ -165,6 +168,18 @@ public class TileEntityPresent extends TileEntity implements IInventory {
}
autoSearch = true;
}
@Override
public Packet getDescriptionPacket() {
NBTTagCompound tag = new NBTTagCompound();
writeToNBT(tag);
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, tag);
}
@Override
public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity packet) {
readFromNBT(packet.func_148857_g());
}
/* IInventory */
@@ -188,6 +203,7 @@ public class TileEntityPresent extends TileEntity implements IInventory {
ItemStack[] inv = inventory;
if (isConnected() && slot >= inventory.length) {
inv = connection.inventory;
slot %= inventory.length;
}
if (inv[slot] != null)