Fix MethodMapping and its usage in ItemUtils

This commit is contained in:
Christian Koop 2021-12-11 15:00:24 +01:00
parent f6caad3983
commit b033c059a3
No known key found for this signature in database
GPG Key ID: 89A8181384E010A3
2 changed files with 4 additions and 4 deletions

View File

@ -10,9 +10,9 @@ public enum MethodMapping {
MC_ITEM_STACK__SET_TAG("setTag", "setTag", "c", ClassMapping.NBT_TAG_COMPOUND.getClazz()),
MC_NBT_TAG_COMPOUND__SET("set", "set", "a", String.class, ClassMapping.NBT_BASE.getClazz()),
MC_NBT_TAG_COMPOUND__SET_SHORT("setShort", "setShort", "a", String.class),
MC_NBT_TAG_COMPOUND__SET_SHORT("setShort", "setShort", "a", String.class, short.class),
MC_NBT_TAG_COMPOUND__SET_STRING("setString", "setString", "a", String.class, String.class),
MC_NBT_TAG_COMPOUND__REMOVE("remove", "remove", "r", String.class, short.class),
MC_NBT_TAG_COMPOUND__REMOVE("remove", "remove", "r", String.class),
CB_ITEM_STACK__AS_NMS_COPY("asNMSCopy", "asNMSCopy", ItemStack.class),
CB_ITEM_STACK__AS_CRAFT_MIRROR("asCraftMirror", "asCraftMirror", ClassMapping.ITEM_STACK.getClazz()),

View File

@ -217,8 +217,8 @@ public class ItemUtils {
mc_NBTTagCompound_remove = MethodMapping.MC_NBT_TAG_COMPOUND__REMOVE.getMethod(mc_NBTTagCompound);
mc_NBTTagCompound_setShort = MethodMapping.MC_NBT_TAG_COMPOUND__SET_SHORT.getMethod(mc_NBTTagCompound);
mc_NBTTagCompound_setString = MethodMapping.MC_NBT_TAG_COMPOUND__SET_STRING.getMethod(mc_NBTTagCompound);
cb_CraftItemStack_asNMSCopy = MethodMapping.CB_ITEM_STACK__AS_NMS_COPY.getMethod(mc_ItemStack);
cb_CraftItemStack_asCraftMirror = MethodMapping.CB_ITEM_STACK__AS_CRAFT_MIRROR.getMethod(mc_ItemStack);
cb_CraftItemStack_asNMSCopy = MethodMapping.CB_ITEM_STACK__AS_NMS_COPY.getMethod(cb_ItemStack);
cb_CraftItemStack_asCraftMirror = MethodMapping.CB_ITEM_STACK__AS_CRAFT_MIRROR.getMethod(cb_ItemStack);
mc_NBTTagList_add = MethodMapping.MC_NBT_TAG_LIST__ADD.getMethod(mc_NBTTagList);
} catch (Exception ex) {
Logger.getLogger(ItemUtils.class.getName()).log(Level.SEVERE, null, ex);