Ejemplo n.º 1
0
 /**
  * Loads the CustomWood entity from a NBTTag, as to load from a savefile.
  *
  * @param tag the tag to load the entity data from.
  */
 @Override
 public void readFromNBT(NBTTagCompound tag) {
   super.readFromNBT(tag);
   this.setMaterial(tag);
 }
Ejemplo n.º 2
0
 @Override
 public void writeToNBT(NBTTagCompound tag) {
   tag.setString(Names.NBT.material, Block.blockRegistry.getNameForObject(this.getMaterial()));
   tag.setInteger(Names.NBT.materialMeta, this.getMaterialMeta());
   super.writeToNBT(tag);
 }