diff options
| author | jani270 <69345714+jani270@users.noreply.github.com> | 2021-08-11 13:11:49 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-11 13:11:49 +0200 |
| commit | 55bb27aa9bd2a288c28a17502b421f4cf647570d (patch) | |
| tree | 05fc6a8fb187e1388e5a4a1131b2359392f89baf /src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java | |
| parent | 9cceb9cbf0e8da94022ddaf7d00b3565a1c83557 (diff) | |
| parent | b9969795b98665509af5ba05fc60c30e7459a52a (diff) | |
| download | notenoughupdates-55bb27aa9bd2a288c28a17502b421f4cf647570d.tar.gz notenoughupdates-55bb27aa9bd2a288c28a17502b421f4cf647570d.tar.bz2 notenoughupdates-55bb27aa9bd2a288c28a17502b421f4cf647570d.zip | |
Merge branch 'DoKM:master' into yep
Diffstat (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java')
| -rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java index a4af51ca..5ca9b316 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/Utils.java @@ -8,6 +8,7 @@ import com.mojang.authlib.Agent; import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService; import com.mojang.authlib.yggdrasil.YggdrasilUserAuthentication; import io.github.moulberry.notenoughupdates.NotEnoughUpdates; +import io.github.moulberry.notenoughupdates.miscfeatures.SlotLocking; import io.github.moulberry.notenoughupdates.util.TexLoc; import net.minecraft.block.Block; import net.minecraft.client.Minecraft; @@ -433,7 +434,11 @@ public class Utils { } public static Slot getSlotUnderMouse(GuiContainer container) { - return (Slot) getField(GuiContainer.class, container, "theSlot", "field_147006_u"); + Slot slot = (Slot) getField(GuiContainer.class, container, "theSlot", "field_147006_u"); + if(slot == null){ + slot = SlotLocking.getInstance().getRealSlot(); + } + return slot; } public static void drawTexturedRect(float x, float y, float width, float height) { |
