@SubscribeEvent
public void rotAttachCapability(AttachCapabilitiesEvent<ItemStack> event)
{
ItemStack stack = event.getObject();
if(isRottingItem(stack) && MINECRAFT_DATE != -1) //All items instead?
{
NBTTagCompound compound = stack.getTagCompound();
if(compound == null || !compound.hasKey(CREATION_TIME_TAG))
stack.setTagInfo(CREATION_TIME_TAG,new NBTTagLong(MINECRAFT_DATE));
//event.addCapability(ROT,new Rot());
}
}
RotHandler.java 文件源码
java
阅读 20
收藏 0
点赞 0
评论 0
项目:BetterWithAddons
作者:
评论列表
文章目录