mirror of
https://github.com/GTNewHorizons/EnderCore.git
synced 2026-11-18 19:29:09 +00:00
Add fixes from latest EnderIO merge
This commit is contained in:
1 parent
c6f189b9dd
commit
e71a240fb6
6 files changed
+12
-10
No files matched your search
@@ -11,7 +11,7 @@ public interface IGuiScreen {
|
||||
|
||||
void addToolTip(GuiToolTip toolTip);
|
||||
|
||||
void removeToolTip(GuiToolTip toolTip);
|
||||
boolean removeToolTip(GuiToolTip toolTip);
|
||||
|
||||
int getGuiLeft();
|
||||
|
||||
|
||||
@@ -461,8 +461,8 @@ public abstract class GuiContainerBase extends GuiContainer implements ToolTipRe
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeToolTip(GuiToolTip toolTip) {
|
||||
ttMan.removeToolTip(toolTip);
|
||||
public boolean removeToolTip(GuiToolTip toolTip) {
|
||||
return ttMan.removeToolTip(toolTip);
|
||||
}
|
||||
|
||||
protected void drawForegroundImpl(int mouseX, int mouseY) {
|
||||
|
||||
@@ -49,8 +49,8 @@ public abstract class GuiScreenBase extends GuiScreen implements ToolTipRenderer
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeToolTip(GuiToolTip toolTip) {
|
||||
ttMan.removeToolTip(toolTip);
|
||||
public boolean removeToolTip(GuiToolTip toolTip) {
|
||||
return ttMan.removeToolTip(toolTip);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -30,8 +30,8 @@ public class ToolTipManager {
|
||||
}
|
||||
}
|
||||
|
||||
public void removeToolTip(GuiToolTip toolTip) {
|
||||
toolTips.remove(toolTip);
|
||||
public boolean removeToolTip(GuiToolTip toolTip) {
|
||||
return toolTips.remove(toolTip);
|
||||
}
|
||||
|
||||
protected final void drawTooltips(ToolTipRenderer renderer, int mouseX, int mouseY) {
|
||||
|
||||
@@ -48,11 +48,12 @@ public class IconButton extends GuiButton {
|
||||
}
|
||||
|
||||
protected void setToolTip(GuiToolTip newToolTip) {
|
||||
boolean addTooltip = false;
|
||||
if (toolTip != null) {
|
||||
gui.removeToolTip(toolTip);
|
||||
addTooltip = gui.removeToolTip(toolTip);
|
||||
}
|
||||
toolTip = newToolTip;
|
||||
if (toolTip != null) {
|
||||
if (addTooltip && toolTip != null) {
|
||||
gui.addToolTip(toolTip);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,7 +246,8 @@ public class FluidUtil {
|
||||
if (source != null && source.getItem() != null) {
|
||||
|
||||
if (source.getItem() instanceof IFluidContainerItem) {
|
||||
IFluidTank targetTank = tank.getInputTank(((IFluidContainerItem) source.getItem()).getFluid(source));
|
||||
FluidStack fluid = ((IFluidContainerItem) source.getItem()).getFluid(source);
|
||||
IFluidTank targetTank = fluid != null ? tank.getInputTank(fluid) : null;
|
||||
if (targetTank != null) {
|
||||
FluidStack target = targetTank.getFluid();
|
||||
int maxDrain = targetTank.getCapacity() - (target != null ? target.amount : 0);
|
||||
|
||||
Reference in new issue
Block a user