mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-22 13:10:13 +00:00
Fixed right click on color / redstone buttons.
This commit is contained in:
1 parent
d54d9b4423
commit
9fae6dc2f1
6 files changed
+15
-4
No files matched your search
@@ -88,8 +88,7 @@ public class BlockFluidEio extends BlockFluidClassic {
|
||||
} else if(this == EnderIO.blockNutrientDistillation && entity instanceof EntityPlayerMP) {
|
||||
long time = entity.worldObj.getTotalWorldTime();
|
||||
EntityPlayerMP player = (EntityPlayerMP) entity;
|
||||
if(time % Config.nutrientFoodBoostDelay == 0 && player.getEntityData().getLong("eioLastFoodBoost") != time)
|
||||
{
|
||||
if(time % Config.nutrientFoodBoostDelay == 0 && player.getEntityData().getLong("eioLastFoodBoost") != time) {
|
||||
int food = player.getFoodStats().getFoodLevel();
|
||||
float sat = player.getFoodStats().getSaturationLevel();
|
||||
player.getFoodStats().setFoodLevel(food + 1);
|
||||
|
||||
@@ -59,7 +59,7 @@ public class ColorButton extends IconButtonEIO {
|
||||
if(colorIndex < 0) {
|
||||
colorIndex = ItemDye.field_150923_a.length - 1;
|
||||
}
|
||||
setColorIndex(colorIndex);
|
||||
setColorIndex(colorIndex);
|
||||
}
|
||||
|
||||
public int getColorIndex() {
|
||||
@@ -85,6 +85,7 @@ public class ColorButton extends IconButtonEIO {
|
||||
if(r.contains(mouseX, mouseY)) {
|
||||
if(rightMouseDown && Mouse.getEventButton() == 1 && !Mouse.getEventButtonState()) {
|
||||
prevColor();
|
||||
gui.doActionPerformed(this);
|
||||
}
|
||||
rightMouseDown = Mouse.getEventButton() == 1 && Mouse.getEventButtonState();
|
||||
} else {
|
||||
|
||||
@@ -93,6 +93,7 @@ public class RedstoneModeButton extends IconButtonEIO {
|
||||
if(r.contains(mouseX, mouseY)) {
|
||||
if(rightMouseDown && Mouse.getEventButton() == 1 && !Mouse.getEventButtonState()) {
|
||||
prevMode();
|
||||
gui.doActionPerformed(this);
|
||||
}
|
||||
rightMouseDown = Mouse.getEventButton() == 1 && Mouse.getEventButtonState();
|
||||
} else {
|
||||
|
||||
@@ -271,6 +271,9 @@ public abstract class GuiContainerBase extends GuiContainer implements ToolTipRe
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void doActionPerformed(GuiButton guiButton) {
|
||||
actionPerformed(guiButton);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -221,5 +221,10 @@ public abstract class GuiScreenBase extends GuiScreen implements ToolTipRenderer
|
||||
public void removeButton(GuiButton button) {
|
||||
buttonList.remove(button);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doActionPerformed(GuiButton guiButton) {
|
||||
actionPerformed(guiButton);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -21,6 +21,8 @@ public interface IGuiScreen {
|
||||
void removeButton(GuiButton button);
|
||||
|
||||
int getOverlayOffsetX();
|
||||
|
||||
void doActionPerformed(GuiButton but);
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user