mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-27 23:45:55 +00:00
Update buildscript & spotlessApply (#78)
* Update buildscript & spotlessApply * Add mapping version
This commit is contained in:
1 parent
f272840987
commit
cf41b89ae4
851 files changed
+95348
-92599
No files matched your search
@@ -3,7 +3,6 @@ package crazypants.enderio.gui;
|
||||
import com.enderio.core.api.client.gui.IGuiScreen;
|
||||
import com.enderio.core.client.gui.button.CycleButton;
|
||||
import com.enderio.core.common.util.BlockCoord;
|
||||
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.machine.IRedstoneModeControlable;
|
||||
import crazypants.enderio.machine.PacketRedstoneMode;
|
||||
@@ -12,37 +11,37 @@ import crazypants.enderio.network.PacketHandler;
|
||||
|
||||
public class RedstoneModeButton extends CycleButton<RedstoneControlMode> {
|
||||
|
||||
private IRedstoneModeControlable model;
|
||||
private IRedstoneModeControlable model;
|
||||
|
||||
private BlockCoord bc;
|
||||
private BlockCoord bc;
|
||||
|
||||
private String tooltipKey = "enderio.gui.tooltip.redstoneControlMode";
|
||||
private String tooltipKey = "enderio.gui.tooltip.redstoneControlMode";
|
||||
|
||||
public RedstoneModeButton(IGuiScreen gui, int id, int x, int y, IRedstoneModeControlable model) {
|
||||
this(gui, id, x, y, model, null);
|
||||
}
|
||||
|
||||
public RedstoneModeButton(IGuiScreen gui, int id, int x, int y, IRedstoneModeControlable model, BlockCoord bc) {
|
||||
super(gui, id, x, y, RedstoneControlMode.class);
|
||||
this.model = model;
|
||||
this.bc = bc;
|
||||
setMode(model.getRedstoneControlMode());
|
||||
}
|
||||
|
||||
public void setMode(RedstoneControlMode newMode) {
|
||||
if (model == null) {
|
||||
return;
|
||||
public RedstoneModeButton(IGuiScreen gui, int id, int x, int y, IRedstoneModeControlable model) {
|
||||
this(gui, id, x, y, model, null);
|
||||
}
|
||||
super.setMode(newMode);
|
||||
model.setRedstoneControlMode(getMode());
|
||||
if (bc != null) {
|
||||
PacketHandler.INSTANCE.sendToServer(new PacketRedstoneMode(model, bc.x, bc.y, bc.z));
|
||||
}
|
||||
setTooltipKey(tooltipKey); // forces our behavior
|
||||
}
|
||||
|
||||
public void setTooltipKey(String key) {
|
||||
tooltipKey = key;
|
||||
setToolTip(EnderIO.lang.localizeExact(tooltipKey), getMode().getTooltip());
|
||||
}
|
||||
public RedstoneModeButton(IGuiScreen gui, int id, int x, int y, IRedstoneModeControlable model, BlockCoord bc) {
|
||||
super(gui, id, x, y, RedstoneControlMode.class);
|
||||
this.model = model;
|
||||
this.bc = bc;
|
||||
setMode(model.getRedstoneControlMode());
|
||||
}
|
||||
|
||||
public void setMode(RedstoneControlMode newMode) {
|
||||
if (model == null) {
|
||||
return;
|
||||
}
|
||||
super.setMode(newMode);
|
||||
model.setRedstoneControlMode(getMode());
|
||||
if (bc != null) {
|
||||
PacketHandler.INSTANCE.sendToServer(new PacketRedstoneMode(model, bc.x, bc.y, bc.z));
|
||||
}
|
||||
setTooltipKey(tooltipKey); // forces our behavior
|
||||
}
|
||||
|
||||
public void setTooltipKey(String key) {
|
||||
tooltipKey = key;
|
||||
setToolTip(EnderIO.lang.localizeExact(tooltipKey), getMode().getTooltip());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user