static ItemStack packageAnimal(ItemStack packageStack, EntityAnimal animal) {
ItemStack stackCopy = (packageStack == null) ? new ItemStack(ItemsRegistry.animalPackage) : packageStack.copy();
stackCopy.setTagInfo("hasAnimal", new NBTTagInt(1));
NBTTagCompound animalCompound = new NBTTagCompound();
animal.writeEntityToNBT(animalCompound);
stackCopy.setTagInfo("animal", animalCompound);
stackCopy.setTagInfo("animalClass", new NBTTagString(animal.getClass().getName()));
stackCopy.setTagInfo("animalHealth", new NBTTagFloat(animal.getHealth()));
return stackCopy;
}
AnimalFarmEntity.java 文件源码
java
阅读 16
收藏 0
点赞 0
评论 0
项目:Mekfarm
作者:
评论列表
文章目录