@Override public void applyTagToEntity(TagCompound tag, Entity bukkitEntity) { net.minecraft.server.v1_9_R1.Entity entity = ((CraftEntity) bukkitEntity).getHandle(); NBTTagCompound vanillaNBT = (NBTTagCompound) ItemStackNBTConverter.compoundToVanillaCompound(tag); entity.f(vanillaNBT); }
@Override public TagCompound entityToTag(Entity bukkitEntity) { net.minecraft.server.v1_9_R1.Entity entity = ((CraftEntity) bukkitEntity).getHandle(); NBTTagCompound vanillaNBT = new NBTTagCompound(); entity.e(vanillaNBT); return (TagCompound) ItemStackNBTConverter.vanillaCompoundToCompound(vanillaNBT); }