From 2b4feba86f2c50eacdf19c3aff17cbb49df4b18a Mon Sep 17 00:00:00 2001 From: KingRainbow44 Date: Sat, 15 Apr 2023 01:23:32 -0400 Subject: [PATCH] Fix issue with Amber not being added the field for an item's `useOnGain` was final! --- src/main/java/emu/grasscutter/data/ResourceLoader.java | 3 ++- src/main/java/emu/grasscutter/data/excels/ItemData.java | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/emu/grasscutter/data/ResourceLoader.java b/src/main/java/emu/grasscutter/data/ResourceLoader.java index 49aa7ac3d..32374e7fb 100644 --- a/src/main/java/emu/grasscutter/data/ResourceLoader.java +++ b/src/main/java/emu/grasscutter/data/ResourceLoader.java @@ -731,7 +731,8 @@ public final class ResourceLoader { try { val gadgetMap = GameData.getGadgetMappingMap(); try { - JsonUtils.loadToList(getResourcePath("Server/GadgetMapping.json"), GadgetMapping.class).forEach(entry -> gadgetMap.put(entry.getGadgetId(), entry));; + JsonUtils.loadToList(getResourcePath("Server/GadgetMapping.json"), GadgetMapping.class) + .forEach(entry -> gadgetMap.put(entry.getGadgetId(), entry));; } catch (IOException | NullPointerException ignored) {} Grasscutter.getLogger().debug("Loaded {} gadget mappings.", gadgetMap.size()); } catch (Exception e) { diff --git a/src/main/java/emu/grasscutter/data/excels/ItemData.java b/src/main/java/emu/grasscutter/data/excels/ItemData.java index 50415306b..75dd5fb9d 100644 --- a/src/main/java/emu/grasscutter/data/excels/ItemData.java +++ b/src/main/java/emu/grasscutter/data/excels/ItemData.java @@ -54,10 +54,10 @@ public class ItemData extends GameResource { private int[] satiationParams; // Usable item - private final ItemUseTarget useTarget = ItemUseTarget.ITEM_USE_TARGET_NONE; + private ItemUseTarget useTarget = ItemUseTarget.ITEM_USE_TARGET_NONE; private List itemUse; private List itemUseActions; - private final boolean useOnGain = false; + private boolean useOnGain = false; // Relic private int mainPropDepotId;