Fix serializing unhandled NBT + add unit test with unhandled NBT
By: md_5 <git@md-5.net>
This commit is contained in:
@@ -7,6 +7,7 @@ import java.nio.ByteBuffer;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagString;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.NamespacedKey;
|
||||
@@ -148,6 +149,7 @@ public class DeprecatedItemMetaCustomValueTest extends AbstractTestingBase {
|
||||
|
||||
private CraftMetaItem createComplexItemMeta() {
|
||||
CraftMetaItem itemMeta = (CraftMetaItem) createNewItemMeta();
|
||||
itemMeta.unhandledTags.put("unhandled-test", NBTTagString.valueOf("test"));
|
||||
itemMeta.setDisplayName("Item Display Name");
|
||||
|
||||
itemMeta.getCustomTagContainer().setCustomTag(requestKey("custom-long"), ItemTagType.LONG, 4L); //Add random primitive values
|
||||
|
||||
Reference in New Issue
Block a user