mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-05 18:27:17 +01:00
Fixed items retaining enchantment visual effects after all enchantments are lost
Issue #BUKKIT-24 - Upon removing enchantments, visual effect on item does not go away
This commit is contained in:
parent
0a2a38c25b
commit
84b0310ae8
1 changed files with 15 additions and 1 deletions
|
@ -2,10 +2,13 @@ package net.minecraft.server;
|
|||
|
||||
import java.io.DataInput;
|
||||
import java.io.DataOutput;
|
||||
import java.io.IOException; // CraftBukkit
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level; // CraftBukkit
|
||||
import java.util.logging.Logger; // CraftBukkit
|
||||
|
||||
public class NBTTagCompound extends NBTBase {
|
||||
|
||||
|
@ -28,9 +31,20 @@ public class NBTTagCompound extends NBTBase {
|
|||
NBTBase.a(nbtbase, dataoutput);
|
||||
}
|
||||
|
||||
dataoutput.writeByte(0);
|
||||
// CraftBukkit start
|
||||
try {
|
||||
dataoutput.writeByte(0);
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(NBTTagCompound.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
public void remove(String name) {
|
||||
map.remove(name);
|
||||
}
|
||||
|
||||
// CraftBukkit end
|
||||
|
||||
void load(DataInput datainput) {
|
||||
this.map.clear();
|
||||
|
||||
|
|
Loading…
Reference in a new issue