Fix issue with Amber not being added

the field for an item's `useOnGain` was final!
This commit is contained in:
KingRainbow44 2023-04-15 01:23:32 -04:00
parent f2019aa88a
commit 2b4feba86f
No known key found for this signature in database
GPG Key ID: FC2CB64B00D257BE
2 changed files with 4 additions and 3 deletions

View File

@ -731,7 +731,8 @@ public final class ResourceLoader {
try { try {
val gadgetMap = GameData.getGadgetMappingMap(); val gadgetMap = GameData.getGadgetMappingMap();
try { 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) {} } catch (IOException | NullPointerException ignored) {}
Grasscutter.getLogger().debug("Loaded {} gadget mappings.", gadgetMap.size()); Grasscutter.getLogger().debug("Loaded {} gadget mappings.", gadgetMap.size());
} catch (Exception e) { } catch (Exception e) {

View File

@ -54,10 +54,10 @@ public class ItemData extends GameResource {
private int[] satiationParams; private int[] satiationParams;
// Usable item // Usable item
private final ItemUseTarget useTarget = ItemUseTarget.ITEM_USE_TARGET_NONE; private ItemUseTarget useTarget = ItemUseTarget.ITEM_USE_TARGET_NONE;
private List<ItemUseData> itemUse; private List<ItemUseData> itemUse;
private List<ItemUseAction> itemUseActions; private List<ItemUseAction> itemUseActions;
private final boolean useOnGain = false; private boolean useOnGain = false;
// Relic // Relic
private int mainPropDepotId; private int mainPropDepotId;