mirror of
https://github.com/GTNewHorizons/EnderCore.git
synced 2026-11-19 19:49:48 +00:00
SleepyTrousers/EnderIO#3184 Fix weird rendering with overlays/stacks
This commit is contained in:
1 parent
520595e6b5
commit
1a64e5ee52
1 file changed
+1
-16
@@ -13,7 +13,6 @@ import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Timer;
|
||||
import net.minecraftforge.client.ForgeHooksClient;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
@@ -32,7 +31,6 @@ import com.enderio.core.client.gui.widget.GhostSlot;
|
||||
import com.enderio.core.client.gui.widget.GuiToolTip;
|
||||
import com.enderio.core.client.gui.widget.TextFieldEnder;
|
||||
import com.enderio.core.client.gui.widget.VScrollbar;
|
||||
import com.enderio.core.client.render.EnderWidget;
|
||||
import com.enderio.core.client.render.RenderUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
@@ -355,14 +353,7 @@ public abstract class GuiContainerBase extends GuiContainer implements ToolTipRe
|
||||
public void drawScreen(int par1, int par2, float par3) {
|
||||
int mx = realMx = par1;
|
||||
int my = realMy = par2;
|
||||
for (IGuiOverlay overlay : overlays) {
|
||||
if (overlay != null && overlay.isVisible() && isMouseInOverlay(par1, par2, overlay)) {
|
||||
mx = -5000;
|
||||
my = -5000;
|
||||
this.drawItemStack(this.mc.thePlayer.inventory.getItemStack(), par1 - this.guiLeft - 8, par2 - this.guiTop - 8, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
super.drawScreen(mx, my, par3);
|
||||
|
||||
if (draggingScrollbar == null) {
|
||||
@@ -452,12 +443,6 @@ public abstract class GuiContainerBase extends GuiContainer implements ToolTipRe
|
||||
return ghostSlotHandler.getGhostSlot(this, mouseX, mouseY);
|
||||
}
|
||||
|
||||
private boolean isMouseInOverlay(int mouseX, int mouseY, IGuiOverlay overlay) {
|
||||
int x = mouseX - getGuiLeft();
|
||||
int y = mouseY - getGuiTop();
|
||||
return overlay.getBounds().contains(x, y);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean removeToolTip(GuiToolTip toolTip) {
|
||||
return ttMan.removeToolTip(toolTip);
|
||||
|
||||
Reference in new issue
Block a user