From 92d43026fae5f80a05b95ce80cd4c5fd202dfd82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=9D=8F=E9=BB=91?= Date: Tue, 25 Jun 2019 15:08:42 +0800 Subject: [PATCH] 1.14 fixed --- .../scala/me/skymc/taboolib/common/nms/NMSHandlerImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/me/skymc/taboolib/common/nms/NMSHandlerImpl.java b/src/main/scala/me/skymc/taboolib/common/nms/NMSHandlerImpl.java index c9b65c5..078d16f 100644 --- a/src/main/scala/me/skymc/taboolib/common/nms/NMSHandlerImpl.java +++ b/src/main/scala/me/skymc/taboolib/common/nms/NMSHandlerImpl.java @@ -229,13 +229,13 @@ public class NMSHandlerImpl extends NMSHandler { case 9: Object nmsList = new NBTTagList(); for (me.skymc.taboolib.common.nms.nbt.NBTBase value : base.asList()) { - ((NBTTagList) nmsList).add((NBTBase) toNBTBase(value)); + ((List) SimpleReflection.getFieldValue(NBTTagList.class, nmsList, "list")).add(toNBTBase(value)); } return nmsList; case 10: Object nmsTag = new net.minecraft.server.v1_8_R3.NBTTagCompound(); for (Map.Entry entry : base.asCompound().entrySet()) { - ((net.minecraft.server.v1_8_R3.NBTTagCompound) nmsTag).set(entry.getKey(), (NBTBase) toNBTBase(entry.getValue())); + ((Map) SimpleReflection.getFieldValue(NBTTagCompound.class, nmsTag, "map")).put(entry.getKey(), toNBTBase(entry.getValue())); } return nmsTag; }