Пример #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);
 }
Пример #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);
  }
Пример #3
0
 @Override
 public org.bukkit.inventory.ItemStack compundToItemStack(TagCompound compound) {
   return CraftItemStack.asBukkitCopy(ItemStackNBTConverter.compundToItemStack(compound));
 }
Пример #4
0
 @Override
 public TagCompound itemStackToCompund(org.bukkit.inventory.ItemStack itemStack) {
   return ItemStackNBTConverter.itemStackToCompund(itemStack);
 }