コード例 #1
0
ファイル: Shape.java プロジェクト: Beltzac/MetalMilkshake
  public static void writeToNBT(Shape shape, ItemStack stack) {

    NBTTagCompound compound = new NBTTagCompound();
    compound.setString("name", shape.getName());

    if (stack.getTagCompound() == null) {
      stack.setTagCompound(new NBTTagCompound());
    }

    stack.getTagCompound().setTag("shape", compound);
  }