Example #1
0
 @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);
 }
Example #2
0
  @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);
  }