示例#1
0
  @Override
  public void readFromNBT(NBTTagCompound nbttagcompound) {
    super.readFromNBT(nbttagcompound);

    if (nbttagcompound.hasKey("moniker")) {
      moniker = NBTUtil.func_152459_a(nbttagcompound.getCompoundTag("moniker"));
    }
  }
示例#2
0
  /* SAVING & LOADING */
  @Override
  public void writeToNBT(NBTTagCompound nbttagcompound) {
    super.writeToNBT(nbttagcompound);

    if (this.moniker != null) {
      NBTTagCompound nbt = new NBTTagCompound();
      NBTUtil.func_152460_a(nbt, moniker);
      nbttagcompound.setTag("moniker", nbt);
    }
  }