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