Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void addEnchantment(Enchantment ench, int level)
- {
- if (this.stackTagCompound == null)
- {
- this.setTagCompound(new NBTTagCompound());
- }
- if (!this.stackTagCompound.hasKey("ench", 9))
- {
- this.stackTagCompound.setTag("ench", new NBTTagList());
- }
- NBTTagList var3 = this.stackTagCompound.getTagList("ench", 10);
- NBTTagCompound var4 = new NBTTagCompound();
- var4.setShort("id", (short)ench.effectId);
- var4.setShort("lvl", (short)level);
- var3.appendTag(var4);
- System.out.println("Applied enchant " + ench.effectId + ", level: " + (short) (byte) level);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement