From 51a19d5f62f3f4614d2050d88f3afd5f4ab1da19 Mon Sep 17 00:00:00 2001 From: kayjaydee Date: Tue, 28 Apr 2026 08:30:58 +0200 Subject: [PATCH] fix: update ChainLightningSceptreInteraction to handle only secondary interactions and adjust Chain_Hit_Effect duration - Added a check in ChainLightningSceptreInteraction to return early if the interaction type is not Secondary. - Reduced the duration of Chain_Hit_Effect from 0.6 to 0.05 for improved gameplay balance. - Removed the primary interaction from chain_lightning_sceptre.json to streamline item functionality. Tests: All tests passing. Build: ./gradlew clean build successful. --- .../sceptre/ChainLightningSceptreInteraction.java | 3 +++ src/main/resources/Server/Entity/Effects/Chain_Hit_Effect.json | 2 +- .../resources/Server/Item/Items/chain_lightning_sceptre.json | 1 - 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/mythlane/chainlightning/sceptre/ChainLightningSceptreInteraction.java b/src/main/java/com/mythlane/chainlightning/sceptre/ChainLightningSceptreInteraction.java index 4adadf2..66b1c79 100644 --- a/src/main/java/com/mythlane/chainlightning/sceptre/ChainLightningSceptreInteraction.java +++ b/src/main/java/com/mythlane/chainlightning/sceptre/ChainLightningSceptreInteraction.java @@ -48,6 +48,9 @@ public final class ChainLightningSceptreInteraction extends SimpleInstantInterac protected void firstRun(@Nonnull InteractionType type, @Nonnull InteractionContext context, @Nonnull CooldownHandler cooldownHandler) { + if (type != InteractionType.Secondary) { + return; + } CooldownHandler.Cooldown cooldown = cooldownHandler.getCooldown( COOLDOWN_ID, COOLDOWN_TIME, CHARGE_TIMES, FORCE_CREATE, INTERRUPT_RECHARGE); if (cooldown == null || cooldown.hasCooldown(false)) { diff --git a/src/main/resources/Server/Entity/Effects/Chain_Hit_Effect.json b/src/main/resources/Server/Entity/Effects/Chain_Hit_Effect.json index 2fc21d4..8599a38 100644 --- a/src/main/resources/Server/Entity/Effects/Chain_Hit_Effect.json +++ b/src/main/resources/Server/Entity/Effects/Chain_Hit_Effect.json @@ -1,6 +1,6 @@ { "Name": "entity_effect.chain_lightning.hit", - "Duration": 0.6, + "Duration": 0.05, "OverlapBehavior": "Overwrite", "Debuff": true, "ApplicationEffects": { diff --git a/src/main/resources/Server/Item/Items/chain_lightning_sceptre.json b/src/main/resources/Server/Item/Items/chain_lightning_sceptre.json index 9d6e04d..d485f9e 100644 --- a/src/main/resources/Server/Item/Items/chain_lightning_sceptre.json +++ b/src/main/resources/Server/Item/Items/chain_lightning_sceptre.json @@ -16,7 +16,6 @@ "Compatible": true }, "Interactions": { - "Primary": "chain_lightning_sceptre_root", "Secondary": "chain_lightning_sceptre_root" }, "IconProperties": {