mirror of
https://github.com/CivMC/Civ.git
synced 2026-07-18 00:20:44 +00:00
Merge pull request #565 from MrJeremyFisher/fuel-IO-fix
Change fuel button to left shift
This commit is contained in:
@@ -83,8 +83,8 @@ public abstract class IClickable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when a player middle (mouse wheell) clicks this clickable, overwrite to define
|
* Called when a player middle (mouse wheel) clicks this clickable, overwrite to define
|
||||||
* special behavior for this
|
* special behavior for this. Only functions in creative mode.
|
||||||
*
|
*
|
||||||
* @param clicker Player who clicked
|
* @param clicker Player who clicked
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import com.github.igotyou.FactoryMod.FactoryModManager;
|
|||||||
import com.github.igotyou.FactoryMod.FactoryModPlayerSettings;
|
import com.github.igotyou.FactoryMod.FactoryModPlayerSettings;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import net.kyori.adventure.text.Component;
|
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.Style;
|
||||||
import net.kyori.adventure.text.format.TextColor;
|
import net.kyori.adventure.text.format.TextColor;
|
||||||
import net.kyori.adventure.text.format.TextDecoration;
|
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)))
|
.append(Component.text(dirState.displayName).color(TextColor.color(dirState.color)))
|
||||||
.asComponent());
|
.asComponent());
|
||||||
ItemUtils.addComponentLore(display,
|
ItemUtils.addComponentLore(display,
|
||||||
Component.text("L/M/R click to toggle I/F/O")
|
Component.text("Left click to toggle Input", NamedTextColor.WHITE, TextDecoration.BOLD),
|
||||||
.style(Style.style(TextDecoration.BOLD))
|
Component.text("Shift + left click to toggle Fuel", NamedTextColor.WHITE, TextDecoration.BOLD),
|
||||||
.color(TextColor.color(255, 255, 255)));
|
Component.text("Right click to toggle Output", NamedTextColor.WHITE, TextDecoration.BOLD)
|
||||||
|
);
|
||||||
FactoryModManager fmMgr = FactoryMod.getInstance().getManager();
|
FactoryModManager fmMgr = FactoryMod.getInstance().getManager();
|
||||||
return new Clickable(display) {
|
return new Clickable(display) {
|
||||||
private ClickableInventory inventory;
|
private ClickableInventory inventory;
|
||||||
@@ -129,7 +131,7 @@ public class IOConfigSection extends StaticDisplaySection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onMiddleClick(Player player) {
|
protected void onShiftLeftClick(Player player) {
|
||||||
if (!ioSelector.isFuel(dir)) {
|
if (!ioSelector.isFuel(dir)) {
|
||||||
if (iofProvider.getFuelCount() >= fmMgr.getMaxFuelChests()) {
|
if (iofProvider.getFuelCount() >= fmMgr.getMaxFuelChests()) {
|
||||||
player.sendMessage(ChatColor.RED + "This factory is at the maximum number of fuel inputs.");
|
player.sendMessage(ChatColor.RED + "This factory is at the maximum number of fuel inputs.");
|
||||||
|
|||||||
Reference in New Issue
Block a user