Get an NBTTagCompound from this stack's NBT data. @param key The NBTTagCompound to get @param create Whether a new, empty compound should be created if none is present yet
(String key, boolean create)
| 549 | * @param create Whether a new, empty compound should be created if none is present yet |
| 550 | */ |
| 551 | public NBTTagCompound getSubCompound(String key, boolean create) |
| 552 | { |
| 553 | if (this.stackTagCompound != null && this.stackTagCompound.hasKey(key, 10)) |
| 554 | { |
| 555 | return this.stackTagCompound.getCompoundTag(key); |
| 556 | } |
| 557 | else if (create) |
| 558 | { |
| 559 | NBTTagCompound nbttagcompound = new NBTTagCompound(); |
| 560 | this.setTagInfo(key, nbttagcompound); |
| 561 | return nbttagcompound; |
| 562 | } |
| 563 | else |
| 564 | { |
| 565 | return null; |
| 566 | } |
| 567 | } |
| 568 | |
| 569 | public NBTTagList getEnchantmentTagList() |
| 570 | { |
no test coverage detected