From 0005fcf96f4ab1bd7174df0886944c70c7d45e0b Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 23 Jul 2023 03:19:10 +0000 Subject: [PATCH] Format code [skip actions] --- .../game/entity/gadget/GadgetGatherObject.java | 5 +++-- .../grasscutter/game/entity/gadget/GadgetObject.java | 12 +++++++----- .../emu/grasscutter/scripts/SceneScriptManager.java | 3 ++- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/main/java/emu/grasscutter/game/entity/gadget/GadgetGatherObject.java b/src/main/java/emu/grasscutter/game/entity/gadget/GadgetGatherObject.java index b29271038..23bf615d9 100644 --- a/src/main/java/emu/grasscutter/game/entity/gadget/GadgetGatherObject.java +++ b/src/main/java/emu/grasscutter/game/entity/gadget/GadgetGatherObject.java @@ -59,8 +59,9 @@ public final class GadgetGatherObject extends GadgetContent { GameItem item = new GameItem(itemData, 1); player.getInventory().addItem(item, ActionReason.Gather); - var ScriptArgs = new ScriptArgs(getGadget().getGroupId(), EventType.EVENT_GATHER, getGadget().getConfigId()); - if(getGadget().getMetaGadget() != null){ + var ScriptArgs = + new ScriptArgs(getGadget().getGroupId(), EventType.EVENT_GATHER, getGadget().getConfigId()); + if (getGadget().getMetaGadget() != null) { ScriptArgs.setEventSource(getGadget().getMetaGadget().config_id); } getGadget().getScene().getScriptManager().callEvent(ScriptArgs); diff --git a/src/main/java/emu/grasscutter/game/entity/gadget/GadgetObject.java b/src/main/java/emu/grasscutter/game/entity/gadget/GadgetObject.java index c3284e937..15d07dce6 100644 --- a/src/main/java/emu/grasscutter/game/entity/gadget/GadgetObject.java +++ b/src/main/java/emu/grasscutter/game/entity/gadget/GadgetObject.java @@ -36,16 +36,18 @@ public class GadgetObject extends GadgetContent { GameItem item = new GameItem(itemData, 1); player.getInventory().addItem(item, ActionReason.Gather); - var ScriptArgs = new ScriptArgs(getGadget().getGroupId(), EventType.EVENT_GATHER, getGadget().getConfigId()); - if(getGadget().getMetaGadget() != null){ + var ScriptArgs = + new ScriptArgs(getGadget().getGroupId(), EventType.EVENT_GATHER, getGadget().getConfigId()); + if (getGadget().getMetaGadget() != null) { ScriptArgs.setEventSource(getGadget().getMetaGadget().config_id); } getGadget().getScene().getScriptManager().callEvent(ScriptArgs); getGadget() - .getScene() - .broadcastPacket( - new PacketGadgetInteractRsp(getGadget(), InteractTypeOuterClass.InteractType.INTERACT_TYPE_GATHER)); + .getScene() + .broadcastPacket( + new PacketGadgetInteractRsp( + getGadget(), InteractTypeOuterClass.InteractType.INTERACT_TYPE_GATHER)); return true; } diff --git a/src/main/java/emu/grasscutter/scripts/SceneScriptManager.java b/src/main/java/emu/grasscutter/scripts/SceneScriptManager.java index 324f87692..622355671 100644 --- a/src/main/java/emu/grasscutter/scripts/SceneScriptManager.java +++ b/src/main/java/emu/grasscutter/scripts/SceneScriptManager.java @@ -221,7 +221,8 @@ public class SceneScriptManager { if (suiteData == null) { return 0; } - Grasscutter.getLogger().error("Group {} suite {} nvm, I found it. This is BAD", group.id, suiteIndex); + Grasscutter.getLogger() + .error("Group {} suite {} nvm, I found it. This is BAD", group.id, suiteIndex); } int prevSuiteIndex = groupInstance.getActiveSuiteId();