mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-14 01:04:16 +00:00
Fixed the Terra Shatterer's rank bar displaying if the player has an item in their cursor.
This commit is contained in:
1 parent
956e6dcb5c
commit
1a27dbc876
1 file changed
+2
-1
@@ -19,6 +19,7 @@ import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.inventory.ContainerPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.StatCollector;
|
||||
@@ -35,7 +36,7 @@ public final class TerraPickRankDisplayHandler {
|
||||
public static void render() {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
GuiScreen gui = mc.currentScreen;
|
||||
if(gui != null && gui instanceof GuiContainer) {
|
||||
if(gui != null && gui instanceof GuiContainer && mc.thePlayer != null && mc.thePlayer.inventory.getItemStack() == null) {
|
||||
GuiContainer container = (GuiContainer) gui;
|
||||
Slot slot = ReflectionHelper.getPrivateValue(GuiContainer.class, container, LibObfuscation.THE_SLOT);
|
||||
if(slot != null && slot.getHasStack()) {
|
||||
|
||||
Reference in new issue
Block a user