Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package org.freefourms.geforce.securitycraft.tileentity;
- import net.minecraft.nbt.NBTTagCompound;
- import net.minecraft.tileentity.TileEntityChest;
- public class TileEntityKeypadChest extends TileEntityChest{
- private int passcode;
- public int getKeypadCode(){
- return passcode;
- }
- public void setKeypadCode(int par1){
- passcode = par1;
- }
- /**
- * Writes a tile entity to NBT.
- */
- public void writeToNBT(NBTTagCompound par1NBTTagCompound)
- {
- super.writeToNBT(par1NBTTagCompound);
- par1NBTTagCompound.setInteger("passcode", this.passcode);
- }
- /**
- * Reads a tile entity from NBT.
- */
- public void readFromNBT(NBTTagCompound par1NBTTagCompound)
- {
- super.readFromNBT(par1NBTTagCompound);
- if (par1NBTTagCompound.hasKey("passcode"))
- {
- this.passcode = par1NBTTagCompound.getInteger("passcode");
- }
- }
- /**
- * Returns the name of the inventory
- */
- public String getInventoryName()
- {
- return "Protected chest";
- }
- /**
- * Performs the check for adjacent chests to determine if this chest is double or not.
- */
- @Override
- public void checkForAdjacentChests() {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment