Fix 1.13 版本下 NBT 工具失效
This commit is contained in:
parent
b4bcc5ac86
commit
13bc08df60
Binary file not shown.
@ -192,7 +192,7 @@ public class NMSHandlerImpl extends NMSHandler {
|
|||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
t.printStackTrace();
|
t.printStackTrace();
|
||||||
}
|
}
|
||||||
return CraftItemStack.asBukkitCopy((net.minecraft.server.v1_8_R3.ItemStack) nmsItem);
|
return CraftItemStack.asBukkitCopy((net.minecraft.server.v1_8_R3.ItemStack) nmsItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -233,7 +233,11 @@ public class NMSHandlerImpl extends NMSHandler {
|
|||||||
if (TabooLib.getVersionNumber() >= 11400) {
|
if (TabooLib.getVersionNumber() >= 11400) {
|
||||||
((net.minecraft.server.v1_14_R1.NBTTagList) nmsList).add(((net.minecraft.server.v1_14_R1.NBTTagList) nmsList).size(), (net.minecraft.server.v1_14_R1.NBTBase) toNBTBase(value));
|
((net.minecraft.server.v1_14_R1.NBTTagList) nmsList).add(((net.minecraft.server.v1_14_R1.NBTTagList) nmsList).size(), (net.minecraft.server.v1_14_R1.NBTBase) toNBTBase(value));
|
||||||
}
|
}
|
||||||
// 1.13-
|
// 1.13
|
||||||
|
else if (TabooLib.getVersionNumber() == 11300) {
|
||||||
|
((net.minecraft.server.v1_13_R2.NBTTagList) nmsList).add((net.minecraft.server.v1_13_R2.NBTBase) toNBTBase(value));
|
||||||
|
}
|
||||||
|
// 1.12-
|
||||||
else {
|
else {
|
||||||
((NBTTagList) nmsList).add((NBTBase) toNBTBase(value));
|
((NBTTagList) nmsList).add((NBTBase) toNBTBase(value));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user