keybinds work

This commit is contained in:
PrototypeTrousers
2023-01-31 23:24:27 -03:00
parent d6f2ed30e5
commit a0ec9ceb51
16 changed files with 275 additions and 83 deletions
@@ -19,36 +19,14 @@
package appeng.fluids.container;
import appeng.core.AEConfig;
import appeng.core.localization.PlayerMessages;
import appeng.helpers.WirelessTerminalGuiObject;
import appeng.util.Platform;
import net.minecraft.entity.player.InventoryPlayer;
public class ContainerWirelessFluidTerminal extends ContainerMEPortableFluidCell {
private final WirelessTerminalGuiObject wirelessTerminalGUIObject;
public ContainerWirelessFluidTerminal(final InventoryPlayer ip, final WirelessTerminalGuiObject gui) {
super(ip, gui);
this.wirelessTerminalGUIObject = gui;
}
@Override
public void detectAndSendChanges() {
if (Platform.isServer()) {
super.detectAndSendChanges();
if (!this.wirelessTerminalGUIObject.rangeCheck()) {
if (Platform.isServer() && this.isValidContainer()) {
this.getPlayerInv().player.sendMessage(PlayerMessages.OutOfRange.get());
}
this.setValidContainer(false);
} else {
this.setPowerMultiplier(AEConfig.instance().wireless_getDrainRate(this.wirelessTerminalGUIObject.getRange()));
}
}
}
}