mirror of
https://github.com/GTNewHorizons/ThaumicBases.git
synced 2026-11-21 04:22:11 +00:00
Fix crash with revolver in Battlegear slot (#16)
This commit is contained in:
1 parent
28c0708398
commit
c1d96e99db
2 files changed
+5
-2
No files matched your search
@@ -1,5 +1,6 @@
|
||||
package tb.client.gui;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import tb.common.inventory.ContainerRevolver;
|
||||
@@ -43,8 +44,9 @@ public class GuiRevolver extends GuiContainer
|
||||
|
||||
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseZ)
|
||||
{
|
||||
if (Minecraft.getMinecraft().thePlayer.inventory.mainInventory[this.blockedSlot] == null)
|
||||
Minecraft.getMinecraft().thePlayer.closeScreen();
|
||||
EntityPlayer p = Minecraft.getMinecraft().thePlayer;
|
||||
if (p.inventory.mainInventory.length > this.blockedSlot && p.inventory.mainInventory[this.blockedSlot] == null)
|
||||
p.closeScreen();
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(revolverTextures);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
Reference in new issue
Block a user