private static void handleCrumbleBlock(IMCMessage message) throws Exception
{
NBTTagCompound root = message.getNBTValue();
NBTBase source = root.getTag("source");
NBTBase target = root.getTag("target");
if (source != null && source instanceof NBTTagCompound)
{
ItemStack sourceItem = ItemStack.loadItemStackFromNBT((NBTTagCompound)source);
if (target instanceof NBTTagCompound)
{
ItemStack targetItem = ItemStack.loadItemStackFromNBT((NBTTagCompound)target);
AlleleEffectCrumbling.addPairToMap(sourceItem, targetItem);
}
else
{
throw new Exception("Required tag 'target' was either empty, or not a valid ItemStack.");
}
}
else
{
throw new Exception("Required tag 'source' was either empty, or not a valid ItemStack.");
}
}
IMCManager.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:MagicBees
作者:
评论列表
文章目录