From a2efe0c706766b38954d41ccfc3919a999094cb5 Mon Sep 17 00:00:00 2001 From: MrJeremyFisher Date: Mon, 15 Jul 2024 19:00:59 -0400 Subject: [PATCH 1/2] Change fuel button to left shift --- .../vg/civcraft/mc/civmodcore/inventory/gui/IClickable.java | 4 ++-- .../github/igotyou/FactoryMod/utility/IOConfigSection.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/civmodcore-paper/src/main/java/vg/civcraft/mc/civmodcore/inventory/gui/IClickable.java b/plugins/civmodcore-paper/src/main/java/vg/civcraft/mc/civmodcore/inventory/gui/IClickable.java index 76a1d377a..926c187c5 100644 --- a/plugins/civmodcore-paper/src/main/java/vg/civcraft/mc/civmodcore/inventory/gui/IClickable.java +++ b/plugins/civmodcore-paper/src/main/java/vg/civcraft/mc/civmodcore/inventory/gui/IClickable.java @@ -83,8 +83,8 @@ public abstract class IClickable { } /** - * Called when a player middle (mouse wheell) clicks this clickable, overwrite to define - * special behavior for this + * Called when a player middle (mouse wheel) clicks this clickable, overwrite to define + * special behavior for this. Only functions in creative mode. * * @param clicker Player who clicked */ diff --git a/plugins/factorymod-paper/src/main/java/com/github/igotyou/FactoryMod/utility/IOConfigSection.java b/plugins/factorymod-paper/src/main/java/com/github/igotyou/FactoryMod/utility/IOConfigSection.java index e0a2a87d0..be91dba04 100644 --- a/plugins/factorymod-paper/src/main/java/com/github/igotyou/FactoryMod/utility/IOConfigSection.java +++ b/plugins/factorymod-paper/src/main/java/com/github/igotyou/FactoryMod/utility/IOConfigSection.java @@ -87,7 +87,7 @@ public class IOConfigSection extends StaticDisplaySection { .append(Component.text(dirState.displayName).color(TextColor.color(dirState.color))) .asComponent()); ItemUtils.addComponentLore(display, - Component.text("L/M/R click to toggle I/F/O") + Component.text("L/LS/R click to toggle I/F/O") .style(Style.style(TextDecoration.BOLD)) .color(TextColor.color(255, 255, 255))); FactoryModManager fmMgr = FactoryMod.getInstance().getManager(); @@ -129,7 +129,7 @@ public class IOConfigSection extends StaticDisplaySection { } @Override - protected void onMiddleClick(Player player) { + protected void onShiftLeftClick(Player player) { if (!ioSelector.isFuel(dir)) { if (iofProvider.getFuelCount() >= fmMgr.getMaxFuelChests()) { player.sendMessage(ChatColor.RED + "This factory is at the maximum number of fuel inputs."); From 575ae0ea2bc3631dc749f0ba2dbd8ac46ea57982 Mon Sep 17 00:00:00 2001 From: MrJeremyFisher Date: Mon, 16 Dec 2024 16:38:30 -0500 Subject: [PATCH 2/2] Requested changes --- .../igotyou/FactoryMod/utility/IOConfigSection.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/factorymod-paper/src/main/java/com/github/igotyou/FactoryMod/utility/IOConfigSection.java b/plugins/factorymod-paper/src/main/java/com/github/igotyou/FactoryMod/utility/IOConfigSection.java index be91dba04..4233cc042 100644 --- a/plugins/factorymod-paper/src/main/java/com/github/igotyou/FactoryMod/utility/IOConfigSection.java +++ b/plugins/factorymod-paper/src/main/java/com/github/igotyou/FactoryMod/utility/IOConfigSection.java @@ -5,6 +5,7 @@ import com.github.igotyou.FactoryMod.FactoryModManager; import com.github.igotyou.FactoryMod.FactoryModPlayerSettings; import java.util.UUID; import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.format.NamedTextColor; import net.kyori.adventure.text.format.Style; import net.kyori.adventure.text.format.TextColor; import net.kyori.adventure.text.format.TextDecoration; @@ -87,9 +88,10 @@ public class IOConfigSection extends StaticDisplaySection { .append(Component.text(dirState.displayName).color(TextColor.color(dirState.color))) .asComponent()); ItemUtils.addComponentLore(display, - Component.text("L/LS/R click to toggle I/F/O") - .style(Style.style(TextDecoration.BOLD)) - .color(TextColor.color(255, 255, 255))); + Component.text("Left click to toggle Input", NamedTextColor.WHITE, TextDecoration.BOLD), + Component.text("Shift + left click to toggle Fuel", NamedTextColor.WHITE, TextDecoration.BOLD), + Component.text("Right click to toggle Output", NamedTextColor.WHITE, TextDecoration.BOLD) + ); FactoryModManager fmMgr = FactoryMod.getInstance().getManager(); return new Clickable(display) { private ClickableInventory inventory;