Guest User

TileEntitySapphireCrop

a guest
Jul 3rd, 2014
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.67 KB | None | 0 0
  1. package sometimesHardcoreSometimes;
  2.  
  3. import net.minecraft.item.ItemStack;
  4. import net.minecraft.nbt.NBTTagCompound;
  5. import net.minecraft.nbt.NBTTagList;
  6. import net.minecraft.tileentity.TileEntity;
  7.  
  8. public class TileEntitySapphireCrop extends TileEntity
  9. {
  10.     int bAmt;
  11.    
  12.     public int getBerryAmount()
  13.     {
  14.         return bAmt;
  15.     }
  16.    
  17.     public void setBerryAmount(int that)
  18.     {
  19.         this.bAmt = that;
  20.     }
  21.    
  22.     public void readFromNBT(NBTTagCompound nbt)
  23.     {
  24.         super.readFromNBT(nbt);
  25.         this.bAmt = nbt.getInteger("bAmt");
  26.     }
  27.  
  28.     public void writeToNBT(NBTTagCompound nbt)
  29.     {
  30.         super.writeToNBT(nbt);
  31.         nbt.setInteger("bAmt", bAmt);
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment