[SPIGOT-1887] MonsterEgg not render type if set into inventory Created: 11/Mar/16 Updated: 11/Mar/16 Resolved: 11/Mar/16 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Major |
Reporter: | Martin Klein | Assignee: | Unassigned |
Resolution: | Invalid | Votes: | 0 |
Labels: | 1.9, bug, nbt | ||
Environment: |
It is not necessary, windows and linux system tested. |
Plugin: | Own compiled private plugin. |
Description |
Example code: @SuppressWarnings("deprecation") public static ItemStack addNBTSpawnEgg(ItemStack item, int data) { net.minecraft.server.v1_9_R1.ItemStack stack = CraftItemStack.asNMSCopy(item); NBTTagCompound tagCompound = stack.getTag(); if(tagCompound == null){ tagCompound = new NBTTagCompound(); } NBTTagCompound id = new NBTTagCompound(); id.setString("id", EntityType.fromId(data).getName()); tagCompound.set("EntityTag", id); stack.setTag(tagCompound); Debug.debug(stack.getTag().getCompound("EntityTag").getString("id")); return CraftItemStack.asBukkitCopy(stack); } That works only if i use method player.getInventory().addItem(item); But if i set this item into inventory then not render egg type, is white default monsteregg like without tag. It can be client side bug ? Debug output is OK. "Villager" etc... |
Comments |
Comment by md_5 [ 11/Mar/16 ] |
NMS not supported as a bug |