diff --git a/src/main/java/codechicken/nei/LayoutManager.java b/src/main/java/codechicken/nei/LayoutManager.java index c6cf4fa0..dfe92f91 100644 --- a/src/main/java/codechicken/nei/LayoutManager.java +++ b/src/main/java/codechicken/nei/LayoutManager.java @@ -104,7 +104,7 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH public static Button delete; public static ButtonCycled gamemode; public static Button rain; - public static Button magnet; + public static ButtonCycled magnet; public static Button[] timeButtons = new Button[4]; public static Button heal; @@ -600,7 +600,7 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH return getStateTip("rain", state); } }; - magnet = new Button() { + magnet = new ButtonCycled(2) { @Override public boolean onButtonPress(boolean rightclick) { diff --git a/src/main/java/codechicken/nei/LayoutStyleMinecraft.java b/src/main/java/codechicken/nei/LayoutStyleMinecraft.java index 0c0f1bdf..521dc64e 100644 --- a/src/main/java/codechicken/nei/LayoutStyleMinecraft.java +++ b/src/main/java/codechicken/nei/LayoutStyleMinecraft.java @@ -31,7 +31,8 @@ public class LayoutStyleMinecraft extends LayoutStyle { LayoutManager.gamemode.icons[0] = new Image(132, 12, 12, 12); LayoutManager.gamemode.icons[1] = new Image(156, 12, 12, 12); LayoutManager.gamemode.icons[2] = new Image(168, 12, 12, 12); - LayoutManager.magnet.icon = new Image(180, 24, 12, 12); + LayoutManager.magnet.icons[0] = new Image(180, 24, 12, 12); + LayoutManager.magnet.icons[1] = new Image(180, 36, 12, 12); LayoutManager.timeButtons[0].icon = new Image(132, 24, 12, 12); LayoutManager.timeButtons[1].icon = new Image(120, 24, 12, 12); LayoutManager.timeButtons[2].icon = new Image(144, 24, 12, 12); @@ -86,6 +87,7 @@ public class LayoutStyleMinecraft extends LayoutStyle { LayoutManager.options.index = NEIClientConfig.getCheatMode(); LayoutManager.magnet.state = 0x4 | (NEIClientConfig.getMagnetMode() ? 1 : 0); + LayoutManager.magnet.index = (LayoutManager.magnet.state & 0x1) != 0 ? 1 : 0; if (NEIClientConfig.canPerformAction("delete")) { layoutButton(LayoutManager.delete); diff --git a/src/main/resources/assets/nei/textures/nei_sprites.png b/src/main/resources/assets/nei/textures/nei_sprites.png index 0e5365fb..f10796e3 100644 Binary files a/src/main/resources/assets/nei/textures/nei_sprites.png and b/src/main/resources/assets/nei/textures/nei_sprites.png differ