mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-16 10:34:40 +00:00
level emitter
This commit is contained in:
1 parent
3567b68acb
commit
644a8a4b42
7 files changed
+4
-966
No files matched your search
@@ -1,229 +0,0 @@
|
||||
package com.glodblock.github.client.gui;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.glodblock.github.FluidCraft;
|
||||
import com.glodblock.github.client.gui.container.ContainerFluidLevelEmitter;
|
||||
import com.glodblock.github.common.parts.PartFluidLevelEmitter;
|
||||
import com.glodblock.github.network.CPacketValueConfig;
|
||||
import com.glodblock.github.util.NameConst;
|
||||
|
||||
import appeng.api.config.RedstoneMode;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.storage.data.IAEFluidStack;
|
||||
import appeng.client.gui.implementations.GuiUpgradeable;
|
||||
import appeng.client.gui.widgets.GuiImgButton;
|
||||
import appeng.client.gui.widgets.MEGuiTextField;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.localization.GuiColors;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.util.calculators.ArithHelper;
|
||||
import appeng.util.calculators.Calculator;
|
||||
|
||||
public class GuiFluidLevelEmitter extends GuiUpgradeable {
|
||||
|
||||
private MEGuiTextField amountTextField;
|
||||
|
||||
private GuiButton plus1;
|
||||
private GuiButton plus10;
|
||||
private GuiButton plus100;
|
||||
private GuiButton plus1000;
|
||||
private GuiButton minus1;
|
||||
private GuiButton minus10;
|
||||
private GuiButton minus100;
|
||||
private GuiButton minus1000;
|
||||
|
||||
private GuiButton setButton;
|
||||
|
||||
private boolean isMul = false;
|
||||
|
||||
public GuiFluidLevelEmitter(final InventoryPlayer inventoryPlayer, final PartFluidLevelEmitter te) {
|
||||
super(new ContainerFluidLevelEmitter(inventoryPlayer, te));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
|
||||
this.amountTextField = new MEGuiTextField(90, 12);
|
||||
this.amountTextField.x = this.guiLeft + 39;
|
||||
this.amountTextField.y = this.guiTop + 44;
|
||||
this.amountTextField.setFocused(true);
|
||||
((ContainerFluidLevelEmitter) this.inventorySlots).setTextField(this.amountTextField);
|
||||
this.validateText();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addButtons() {
|
||||
this.redstoneMode = new GuiImgButton(
|
||||
this.guiLeft - 18,
|
||||
this.guiTop + 8,
|
||||
Settings.REDSTONE_EMITTER,
|
||||
RedstoneMode.LOW_SIGNAL);
|
||||
|
||||
final int a = AEConfig.instance.levelByStackAmounts(0);
|
||||
final int b = AEConfig.instance.levelByStackAmounts(1);
|
||||
final int c = AEConfig.instance.levelByStackAmounts(2);
|
||||
final int d = AEConfig.instance.levelByStackAmounts(3);
|
||||
|
||||
this.buttonList.add(this.plus1 = new GuiButton(0, this.guiLeft + 20, this.guiTop + 17, 22, 20, "+" + a));
|
||||
this.buttonList.add(this.plus10 = new GuiButton(0, this.guiLeft + 48, this.guiTop + 17, 28, 20, "+" + b));
|
||||
this.buttonList.add(this.plus100 = new GuiButton(0, this.guiLeft + 82, this.guiTop + 17, 32, 20, "+" + c));
|
||||
this.buttonList.add(this.plus1000 = new GuiButton(0, this.guiLeft + 120, this.guiTop + 17, 38, 20, "+" + d));
|
||||
|
||||
this.buttonList.add(this.minus1 = new GuiButton(0, this.guiLeft + 20, this.guiTop + 63, 22, 20, "-" + a));
|
||||
this.buttonList.add(this.minus10 = new GuiButton(0, this.guiLeft + 48, this.guiTop + 63, 28, 20, "-" + b));
|
||||
this.buttonList.add(this.minus100 = new GuiButton(0, this.guiLeft + 82, this.guiTop + 63, 32, 20, "-" + c));
|
||||
this.buttonList.add(this.minus1000 = new GuiButton(0, this.guiLeft + 120, this.guiTop + 63, 38, 20, "-" + d));
|
||||
|
||||
this.buttonList.add(
|
||||
this.setButton = new GuiButton(
|
||||
0,
|
||||
this.guiLeft + 134,
|
||||
this.guiTop + 40,
|
||||
28,
|
||||
20,
|
||||
GuiText.Set.getLocal()));
|
||||
|
||||
this.buttonList.add(this.redstoneMode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawFG(final int offsetX, final int offsetY, final int mouseX, final int mouseY) {
|
||||
this.fontRendererObj.drawString(
|
||||
getGuiDisplayName(NameConst.i18n(NameConst.GUI_FLUID_LEVEL_EMITTER)),
|
||||
8,
|
||||
6,
|
||||
GuiColors.UpgradableTitle.getColor());
|
||||
this.fontRendererObj.drawString(
|
||||
GuiText.inventory.getLocal(),
|
||||
8,
|
||||
this.ySize - 96 + 3,
|
||||
GuiColors.UpgradableInventory.getColor());
|
||||
this.redstoneMode.set(this.cvb.getRedStoneMode());
|
||||
|
||||
if (isShiftKeyDown() && !isMul) {
|
||||
for (GuiButton btn : this.buttonList) {
|
||||
if (btn instanceof GuiButton) {
|
||||
btn.displayString += "000";
|
||||
}
|
||||
}
|
||||
isMul = true;
|
||||
} else if (!isShiftKeyDown() && isMul) {
|
||||
for (GuiButton btn : this.buttonList) {
|
||||
if (btn instanceof GuiButton) {
|
||||
btn.displayString = btn.displayString.substring(0, btn.displayString.lastIndexOf("000"));
|
||||
}
|
||||
}
|
||||
isMul = false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBG(final int offsetX, final int offsetY, final int mouseX, final int mouseY) {
|
||||
super.drawBG(offsetX, offsetY, mouseX, mouseY);
|
||||
this.amountTextField.drawTextBox();
|
||||
|
||||
// Without these two lines, the liquid slot will not draw properly.
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.bindTexture(this.getBackground());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void handleButtonVisibility() {}
|
||||
|
||||
@Override
|
||||
protected String getBackground() {
|
||||
return "guis/lvlemitter.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(final GuiButton btn) {
|
||||
super.actionPerformed(btn);
|
||||
|
||||
if (btn == this.setButton && this.setButton.enabled) {
|
||||
final long amount = this.getAmountLong();
|
||||
this.amountTextField.setText(Long.toString(amount));
|
||||
|
||||
FluidCraft.proxy.netHandler.sendToServer(new CPacketValueConfig(amount, 0));
|
||||
} else {
|
||||
final boolean isPlus = btn == this.plus1 || btn == this.plus10
|
||||
|| btn == this.plus100
|
||||
|| btn == this.plus1000;
|
||||
final boolean isMinus = btn == this.minus1 || btn == this.minus10
|
||||
|| btn == this.minus100
|
||||
|| btn == this.minus1000;
|
||||
|
||||
if (isPlus || isMinus) {
|
||||
long result = addOrderAmount(this.getQty(btn));
|
||||
this.amountTextField.setText(Long.toString(result));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private long addOrderAmount(final int i) {
|
||||
long resultL = getAmountLong();
|
||||
|
||||
if (resultL == 1 && i > 1) {
|
||||
resultL = 0;
|
||||
}
|
||||
|
||||
resultL += i;
|
||||
if (resultL < 1) {
|
||||
resultL = 1;
|
||||
}
|
||||
return resultL;
|
||||
}
|
||||
|
||||
private long getAmountLong() {
|
||||
String out = this.amountTextField.getText();
|
||||
double resultD = Calculator.conversion(out);
|
||||
|
||||
if (resultD <= 0 || Double.isNaN(resultD)) {
|
||||
return 0;
|
||||
} else {
|
||||
return (long) ArithHelper.round(resultD, 0);
|
||||
}
|
||||
}
|
||||
|
||||
private void validateText() {
|
||||
String text = this.amountTextField.getText();
|
||||
double resultD = Calculator.conversion(text);
|
||||
this.setButton.enabled = !Double.isNaN(resultD);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked(int xCoord, int yCoord, int btn) {
|
||||
this.amountTextField.mouseClicked(xCoord, yCoord, btn);
|
||||
super.mouseClicked(xCoord, yCoord, btn);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped(final char character, final int key) {
|
||||
if (!this.checkHotbarKeys(key)) {
|
||||
if (key == Keyboard.KEY_RETURN || key == Keyboard.KEY_NUMPADENTER) {
|
||||
this.actionPerformed(this.setButton);
|
||||
} else {
|
||||
boolean typedTextbox = this.amountTextField.textboxKeyTyped(character, key);
|
||||
if (typedTextbox) {
|
||||
this.validateText();
|
||||
} else {
|
||||
super.keyTyped(character, key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean drawUpgrades() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void update(Integer key, IAEFluidStack value) {
|
||||
((ContainerFluidLevelEmitter) this.cvb).getBus().setFluidInSlot(key, value);
|
||||
}
|
||||
}
|
||||
-115
@@ -1,115 +0,0 @@
|
||||
package com.glodblock.github.client.gui.container;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
import com.glodblock.github.client.gui.container.base.FCContainerFluidConfigurable;
|
||||
import com.glodblock.github.common.parts.PartFluidLevelEmitter;
|
||||
import com.glodblock.github.inventory.gui.GuiType;
|
||||
import com.glodblock.github.inventory.slot.OptionalFluidSlotFakeTypeOnly;
|
||||
import com.glodblock.github.loader.ItemAndBlockHolder;
|
||||
import com.glodblock.github.util.FluidPrimaryGui;
|
||||
|
||||
import appeng.api.config.RedstoneMode;
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.client.gui.widgets.MEGuiTextField;
|
||||
import appeng.container.ContainerOpenContext;
|
||||
import appeng.container.PrimaryGui;
|
||||
import appeng.container.guisync.GuiSync;
|
||||
import appeng.tile.inventory.AppEngInternalAEInventory;
|
||||
import appeng.util.Platform;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ContainerFluidLevelEmitter extends FCContainerFluidConfigurable {
|
||||
|
||||
private final PartFluidLevelEmitter lvlEmitter;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private MEGuiTextField textField;
|
||||
|
||||
@GuiSync(2)
|
||||
public long EmitterValue = -1;
|
||||
|
||||
public ContainerFluidLevelEmitter(final InventoryPlayer ip, final PartFluidLevelEmitter te) {
|
||||
super(ip, te);
|
||||
this.lvlEmitter = te;
|
||||
}
|
||||
|
||||
public PartFluidLevelEmitter getBus() {
|
||||
return this.lvlEmitter;
|
||||
}
|
||||
|
||||
public AppEngInternalAEInventory getFakeFluidInv() {
|
||||
return (AppEngInternalAEInventory) this.lvlEmitter.getInventoryByName("config");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setupConfig() {
|
||||
final IInventory inv = this.getUpgradeable().getInventoryByName("config");
|
||||
this.addSlotToContainer(new OptionalFluidSlotFakeTypeOnly(inv, null, this, 0, 17, 42, 0, 0, 0));
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void setTextField(final MEGuiTextField level) {
|
||||
this.textField = level;
|
||||
}
|
||||
|
||||
public void setLevel(final long l, final EntityPlayer player) {
|
||||
this.lvlEmitter.setReportingValue(l);
|
||||
this.EmitterValue = l;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean supportCapacity() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int availableUpgrades() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void setRedStoneMode(final RedstoneMode rsMode) {
|
||||
this.rsMode = rsMode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges() {
|
||||
this.verifyPermissions(SecurityPermissions.BUILD, false);
|
||||
|
||||
if (Platform.isServer()) {
|
||||
this.EmitterValue = this.lvlEmitter.getReportingValue();
|
||||
this.setRedStoneMode(
|
||||
(RedstoneMode) this.getUpgradeable().getConfigManager().getSetting(Settings.REDSTONE_EMITTER));
|
||||
}
|
||||
|
||||
this.standardDetectAndSendChanges();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(final String field, final Object oldValue, final Object newValue) {
|
||||
if (field.equals("EmitterValue")) {
|
||||
if (this.textField != null) {
|
||||
this.textField.setText(String.valueOf(this.EmitterValue));
|
||||
|
||||
if (String.valueOf(oldValue).equals("-1")) {
|
||||
this.textField.setCursorPositionEnd();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public PrimaryGui getPrimaryGui() {
|
||||
|
||||
ContainerOpenContext context = getOpenContext();
|
||||
return new FluidPrimaryGui(
|
||||
GuiType.FLUID_LEVEL_EMITTER,
|
||||
ItemAndBlockHolder.FLUID_LEVEL_EMITTER.stack(),
|
||||
context.getTile(),
|
||||
context.getSide());
|
||||
}
|
||||
}
|
||||
@@ -1,604 +1,10 @@
|
||||
package com.glodblock.github.common.parts;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import com.glodblock.github.api.registries.ILevelViewable;
|
||||
import com.glodblock.github.api.registries.LevelItemInfo;
|
||||
import com.glodblock.github.api.registries.LevelState;
|
||||
import com.glodblock.github.common.item.ItemFluidPacket;
|
||||
import com.glodblock.github.inventory.InventoryHandler;
|
||||
import com.glodblock.github.inventory.gui.GuiType;
|
||||
import com.glodblock.github.util.BlockPos;
|
||||
import com.glodblock.github.util.Util;
|
||||
public class PartFluidLevelEmitter extends PartLevelTerminal {
|
||||
|
||||
import appeng.api.config.RedstoneMode;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.networking.crafting.ICraftingGrid;
|
||||
import appeng.api.networking.crafting.ICraftingWatcher;
|
||||
import appeng.api.networking.crafting.ICraftingWatcherHost;
|
||||
import appeng.api.networking.events.MENetworkChannelsChanged;
|
||||
import appeng.api.networking.events.MENetworkEventSubscribe;
|
||||
import appeng.api.networking.events.MENetworkPowerStatusChange;
|
||||
import appeng.api.networking.security.BaseActionSource;
|
||||
import appeng.api.networking.storage.IBaseMonitor;
|
||||
import appeng.api.networking.storage.IStackWatcher;
|
||||
import appeng.api.networking.storage.IStackWatcherHost;
|
||||
import appeng.api.networking.ticking.IGridTickable;
|
||||
import appeng.api.networking.ticking.TickRateModulation;
|
||||
import appeng.api.networking.ticking.TickingRequest;
|
||||
import appeng.api.parts.IPartCollisionHelper;
|
||||
import appeng.api.parts.IPartRenderHelper;
|
||||
import appeng.api.storage.IMEMonitor;
|
||||
import appeng.api.storage.IMEMonitorHandlerReceiver;
|
||||
import appeng.api.storage.StorageChannel;
|
||||
import appeng.api.storage.data.IAEFluidStack;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.api.storage.data.IAEStack;
|
||||
import appeng.api.storage.data.IItemList;
|
||||
import appeng.api.util.AECableType;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.client.texture.CableBusTextures;
|
||||
import appeng.core.AEConfig;
|
||||
import appeng.core.AELog;
|
||||
import appeng.helpers.Reflected;
|
||||
import appeng.me.GridAccessException;
|
||||
import appeng.parts.automation.PartUpgradeable;
|
||||
import appeng.tile.inventory.AppEngInternalAEInventory;
|
||||
import appeng.tile.inventory.InvOperation;
|
||||
import appeng.util.Platform;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class PartFluidLevelEmitter extends PartUpgradeable
|
||||
implements IStackWatcherHost, ICraftingWatcherHost, IMEMonitorHandlerReceiver, IGridTickable, ILevelViewable {
|
||||
|
||||
private static final int FLAG_ON = 8;
|
||||
|
||||
private final AppEngInternalAEInventory config = new AppEngInternalAEInventory(this, 1);
|
||||
|
||||
private boolean prevState = false;
|
||||
|
||||
private long lastReportedValue = 0;
|
||||
private long reportingValue = 0;
|
||||
|
||||
private IStackWatcher myWatcher;
|
||||
private double centerX;
|
||||
private double centerY;
|
||||
private double centerZ;
|
||||
|
||||
private int lastWorkingTick = 0;
|
||||
private boolean delayedUpdatesQueued = false;
|
||||
|
||||
@Reflected
|
||||
public PartFluidLevelEmitter(final ItemStack is) {
|
||||
public PartFluidLevelEmitter(ItemStack is) {
|
||||
super(is);
|
||||
|
||||
this.getConfigManager().registerSetting(Settings.REDSTONE_EMITTER, RedstoneMode.LOW_SIGNAL);
|
||||
|
||||
// Workaround the emitter randomly breaking on world load
|
||||
if (MinecraftServer.getServer() != null) {
|
||||
delayedUpdatesQueued = true;
|
||||
lastWorkingTick = MinecraftServer.getServer().getTickCounter();
|
||||
}
|
||||
}
|
||||
|
||||
public long getReportingValue() {
|
||||
return this.reportingValue;
|
||||
}
|
||||
|
||||
public void setReportingValue(final long v) {
|
||||
this.reportingValue = v;
|
||||
this.updateState();
|
||||
}
|
||||
|
||||
@MENetworkEventSubscribe
|
||||
public void powerChanged(final MENetworkPowerStatusChange c) {
|
||||
this.updateState();
|
||||
}
|
||||
|
||||
private void updateState() {
|
||||
final boolean isOn = this.isLevelEmitterOn();
|
||||
if (this.prevState != isOn) {
|
||||
this.getHost().markForUpdate();
|
||||
final TileEntity te = this.getHost().getTile();
|
||||
this.prevState = isOn;
|
||||
Platform.notifyBlocksOfNeighbors(te.getWorldObj(), te.xCoord, te.yCoord, te.zCoord);
|
||||
Platform.notifyBlocksOfNeighbors(
|
||||
te.getWorldObj(),
|
||||
te.xCoord + this.getSide().offsetX,
|
||||
te.yCoord + this.getSide().offsetY,
|
||||
te.zCoord + this.getSide().offsetZ);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isLevelEmitterOn() {
|
||||
if (Platform.isClient()) {
|
||||
return (this.getClientFlags() & FLAG_ON) == FLAG_ON;
|
||||
}
|
||||
|
||||
if (!this.getProxy().isActive()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final Enum<?> redstoneEmitterSetting = this.getConfigManager().getSetting(Settings.REDSTONE_EMITTER);
|
||||
final boolean result;
|
||||
|
||||
if (redstoneEmitterSetting == RedstoneMode.LOW_SIGNAL) {
|
||||
result = this.reportingValue >= this.lastReportedValue + 1;
|
||||
} else {
|
||||
result = this.reportingValue < this.lastReportedValue + 1;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@MENetworkEventSubscribe
|
||||
public void channelChanged(final MENetworkChannelsChanged c) {
|
||||
this.updateState();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int populateFlags(final int cf) {
|
||||
return cf | (this.prevState ? FLAG_ON : 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getBreakingTexture() {
|
||||
return this.getItemStack().getIconIndex();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateWatcher(final ICraftingWatcher newWatcher) {
|
||||
this.configureWatchers();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRequestChange(final ICraftingGrid craftingGrid, final IAEItemStack what) {
|
||||
this.updateState();
|
||||
}
|
||||
|
||||
private IAEFluidStack getIAEFluidStack() {
|
||||
final FluidStack fs = ItemFluidPacket.getFluidStack(this.config.getAEStackInSlot(0));
|
||||
if (fs != null) return Util.FluidUtil.createAEFluidStack(fs);
|
||||
return null;
|
||||
}
|
||||
|
||||
// update the system...
|
||||
private void configureWatchers() {
|
||||
final IAEFluidStack myStack = this.getIAEFluidStack();
|
||||
|
||||
if (this.myWatcher != null) {
|
||||
this.myWatcher.clear();
|
||||
}
|
||||
|
||||
try {
|
||||
this.getProxy().getStorage().getFluidInventory().removeListener(this);
|
||||
if (this.myWatcher != null && myStack != null) {
|
||||
this.myWatcher.add(myStack);
|
||||
}
|
||||
|
||||
if (myStack == null) {
|
||||
this.getProxy().getStorage().getFluidInventory().addListener(this, this.getProxy().getGrid());
|
||||
}
|
||||
|
||||
this.updateReportingValue(this.getProxy().getStorage().getFluidInventory());
|
||||
} catch (final GridAccessException ignored) {}
|
||||
}
|
||||
|
||||
private void updateReportingValue(final IMEMonitor<IAEFluidStack> monitor) {
|
||||
final IAEFluidStack myStack = this.getIAEFluidStack();
|
||||
|
||||
if (myStack == null) {
|
||||
this.lastReportedValue = 0;
|
||||
for (final IAEFluidStack st : monitor.getStorageList()) {
|
||||
this.lastReportedValue += st.getStackSize();
|
||||
}
|
||||
} else {
|
||||
final IAEFluidStack r = monitor.getStorageList().findPrecise(myStack);
|
||||
if (r == null) {
|
||||
this.lastReportedValue = 0;
|
||||
} else {
|
||||
this.lastReportedValue = r.getStackSize();
|
||||
}
|
||||
}
|
||||
|
||||
this.updateState();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateWatcher(final IStackWatcher newWatcher) {
|
||||
this.myWatcher = newWatcher;
|
||||
this.configureWatchers();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStackChange(@SuppressWarnings("rawtypes") final IItemList o,
|
||||
@SuppressWarnings("rawtypes") final IAEStack fullStack,
|
||||
@SuppressWarnings("rawtypes") final IAEStack diffStack, final BaseActionSource src,
|
||||
final StorageChannel chan) {
|
||||
if (chan == StorageChannel.FLUIDS && fullStack.equals(this.getIAEFluidStack())) {
|
||||
this.lastReportedValue = fullStack.getStackSize();
|
||||
this.updateState();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValid(final Object effectiveGrid) {
|
||||
try {
|
||||
return this.getProxy().getGrid() == effectiveGrid;
|
||||
} catch (final GridAccessException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TickingRequest getTickingRequest(IGridNode node) {
|
||||
return new TickingRequest(
|
||||
AEConfig.instance.levelEmitterDelay / 2,
|
||||
AEConfig.instance.levelEmitterDelay,
|
||||
!delayedUpdatesQueued,
|
||||
true);
|
||||
}
|
||||
|
||||
private boolean canDoWork() {
|
||||
int currentTick = MinecraftServer.getServer().getTickCounter();
|
||||
return (currentTick - lastWorkingTick) > AEConfig.instance.levelEmitterDelay;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TickRateModulation tickingRequest(IGridNode node, int TicksSinceLastCall) {
|
||||
if (delayedUpdatesQueued && canDoWork()) {
|
||||
delayedUpdatesQueued = false;
|
||||
lastWorkingTick = MinecraftServer.getServer().getTickCounter();
|
||||
this.onListUpdate();
|
||||
}
|
||||
return delayedUpdatesQueued ? TickRateModulation.IDLE : TickRateModulation.SLEEP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postChange(final IBaseMonitor monitor, final Iterable<IAEStack<?>> change,
|
||||
final BaseActionSource actionSource) {
|
||||
if (canDoWork()) {
|
||||
if (delayedUpdatesQueued) {
|
||||
delayedUpdatesQueued = false;
|
||||
try {
|
||||
this.getProxy().getTick().sleepDevice(this.getProxy().getNode());
|
||||
} catch (GridAccessException e) {
|
||||
AELog.error(e, "Couldn't put level emitter to sleep after cancelling delayed updates");
|
||||
}
|
||||
}
|
||||
lastWorkingTick = MinecraftServer.getServer().getTickCounter();
|
||||
this.updateReportingValue((IMEMonitor<IAEFluidStack>) monitor);
|
||||
} else if (!delayedUpdatesQueued) {
|
||||
delayedUpdatesQueued = true;
|
||||
try {
|
||||
this.getProxy().getTick().alertDevice(this.getProxy().getNode());
|
||||
} catch (GridAccessException e) {
|
||||
AELog.error(e, "Couldn't wake up level emitter for delayed updates");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onListUpdate() {
|
||||
try {
|
||||
this.updateReportingValue(this.getProxy().getStorage().getFluidInventory());
|
||||
} catch (final GridAccessException ignored) {}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AECableType getCableConnectionType(final ForgeDirection dir) {
|
||||
return AECableType.SMART;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getBoxes(final IPartCollisionHelper bch) {
|
||||
bch.addBox(7, 7, 11, 9, 9, 16);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(final IPartRenderHelper rh, final RenderBlocks renderer) {
|
||||
rh.setTexture(this.getItemStack().getIconIndex());
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
tess.startDrawingQuads();
|
||||
this.renderTorchAtAngle(0, -0.5, 0);
|
||||
tess.draw();
|
||||
}
|
||||
|
||||
private void renderTorchAtAngle(double baseX, double baseY, double baseZ) {
|
||||
final boolean isOn = this.isLevelEmitterOn();
|
||||
final IIcon offTexture = this.getItemStack().getIconIndex();
|
||||
final IIcon IIcon = (isOn ? CableBusTextures.LevelEmitterTorchOn.getIcon() : offTexture);
|
||||
this.centerX = baseX + 0.5;
|
||||
this.centerY = baseY + 0.5;
|
||||
this.centerZ = baseZ + 0.5;
|
||||
|
||||
baseY += 7.0 / 16.0;
|
||||
|
||||
final float var16 = IIcon.getMinU();
|
||||
final float var17 = IIcon.getMaxU();
|
||||
final float var18 = IIcon.getMinV();
|
||||
final float var19 = IIcon.getMaxV();
|
||||
|
||||
final double var20b = offTexture.getInterpolatedU(7.0D);
|
||||
final double var24b = offTexture.getInterpolatedU(9.0D);
|
||||
|
||||
final double var20 = IIcon.getInterpolatedU(7.0D);
|
||||
final double var24 = IIcon.getInterpolatedU(9.0D);
|
||||
final double var22 = IIcon.getInterpolatedV(6.0D + (isOn ? 0 : 1.0D));
|
||||
final double var26 = IIcon.getInterpolatedV(8.0D + (isOn ? 0 : 1.0D));
|
||||
final double var28 = IIcon.getInterpolatedU(7.0D);
|
||||
final double var30 = IIcon.getInterpolatedV(13.0D);
|
||||
final double var32 = IIcon.getInterpolatedU(9.0D);
|
||||
final double var34 = IIcon.getInterpolatedV(15.0D);
|
||||
|
||||
final double var22b = IIcon.getInterpolatedV(9.0D);
|
||||
final double var26b = IIcon.getInterpolatedV(11.0D);
|
||||
|
||||
baseX += 0.5D;
|
||||
baseZ += 0.5D;
|
||||
final double var36 = baseX - 0.5D;
|
||||
final double var38 = baseX + 0.5D;
|
||||
final double var40 = baseZ - 0.5D;
|
||||
final double var42 = baseZ + 0.5D;
|
||||
|
||||
double toff = 0.0d;
|
||||
|
||||
if (!isOn) {
|
||||
toff = 1.0d / 16.0d;
|
||||
}
|
||||
|
||||
final Tessellator var12 = Tessellator.instance;
|
||||
if (isOn) {
|
||||
var12.setColorOpaque_F(1.0F, 1.0F, 1.0F);
|
||||
var12.setBrightness(11 << 20 | 11 << 4);
|
||||
}
|
||||
|
||||
final double TorchLen = 0.625D;
|
||||
final double var44 = 0.0625D;
|
||||
final double Zero = 0;
|
||||
final double par10 = 0;
|
||||
|
||||
final double x = baseX + Zero * (1.0D - TorchLen) - var44;
|
||||
final double x1 = baseX + Zero * (1.0D - TorchLen) + var44;
|
||||
|
||||
final double y = baseY + TorchLen - toff;
|
||||
final double var422 = 0.1915D + 1.0 / 16.0;
|
||||
final double y1 = baseY + var422;
|
||||
|
||||
final double z = baseZ + par10 * (1.0D - TorchLen) - var44;
|
||||
final double z1 = baseZ + par10 * (1.0D - TorchLen) + var44;
|
||||
|
||||
this.addVertexWithUV(x, y, z, var20, var22);
|
||||
this.addVertexWithUV(x, y, z1, var20, var26);
|
||||
this.addVertexWithUV(x1, y, z1, var24, var26);
|
||||
this.addVertexWithUV(x1, y, z, var24, var22);
|
||||
|
||||
this.addVertexWithUV(x1, y1, z, var24b, var22b);
|
||||
this.addVertexWithUV(x1, y1, z1, var24b, var26b);
|
||||
this.addVertexWithUV(x, y1, z1, var20b, var26b);
|
||||
this.addVertexWithUV(x, y1, z, var20b, var22b);
|
||||
|
||||
this.addVertexWithUV(baseX + var44 + Zero, baseY, baseZ - var44 + par10, var32, var30);
|
||||
this.addVertexWithUV(baseX + var44 + Zero, baseY, baseZ + var44 + par10, var32, var34);
|
||||
this.addVertexWithUV(baseX - var44 + Zero, baseY, baseZ + var44 + par10, var28, var34);
|
||||
this.addVertexWithUV(baseX - var44 + Zero, baseY, baseZ - var44 + par10, var28, var30);
|
||||
|
||||
this.addVertexWithUV(baseX - var44, baseY + 1.0D, var40, var16, var18);
|
||||
this.addVertexWithUV(baseX - var44 + Zero, baseY + 0.0D, var40 + par10, var16, var19);
|
||||
this.addVertexWithUV(baseX - var44 + Zero, baseY + 0.0D, var42 + par10, var17, var19);
|
||||
this.addVertexWithUV(baseX - var44, baseY + 1.0D, var42, var17, var18);
|
||||
|
||||
this.addVertexWithUV(baseX + var44, baseY + 1.0D, var42, var16, var18);
|
||||
this.addVertexWithUV(baseX + Zero + var44, baseY + 0.0D, var42 + par10, var16, var19);
|
||||
this.addVertexWithUV(baseX + Zero + var44, baseY + 0.0D, var40 + par10, var17, var19);
|
||||
this.addVertexWithUV(baseX + var44, baseY + 1.0D, var40, var17, var18);
|
||||
|
||||
this.addVertexWithUV(var36, baseY + 1.0D, baseZ + var44, var16, var18);
|
||||
this.addVertexWithUV(var36 + Zero, baseY + 0.0D, baseZ + var44 + par10, var16, var19);
|
||||
this.addVertexWithUV(var38 + Zero, baseY + 0.0D, baseZ + var44 + par10, var17, var19);
|
||||
this.addVertexWithUV(var38, baseY + 1.0D, baseZ + var44, var17, var18);
|
||||
|
||||
this.addVertexWithUV(var38, baseY + 1.0D, baseZ - var44, var16, var18);
|
||||
this.addVertexWithUV(var38 + Zero, baseY + 0.0D, baseZ - var44 + par10, var16, var19);
|
||||
this.addVertexWithUV(var36 + Zero, baseY + 0.0D, baseZ - var44 + par10, var17, var19);
|
||||
this.addVertexWithUV(var36, baseY + 1.0D, baseZ - var44, var17, var18);
|
||||
}
|
||||
|
||||
private void addVertexWithUV(double x, double y, double z, final double u, final double v) {
|
||||
final Tessellator var12 = Tessellator.instance;
|
||||
|
||||
x -= this.centerX;
|
||||
y -= this.centerY;
|
||||
z -= this.centerZ;
|
||||
|
||||
if (this.getSide() == ForgeDirection.DOWN) {
|
||||
y = -y;
|
||||
z = -z;
|
||||
}
|
||||
|
||||
if (this.getSide() == ForgeDirection.EAST) {
|
||||
final double m = x;
|
||||
x = y;
|
||||
y = m;
|
||||
y = -y;
|
||||
}
|
||||
|
||||
if (this.getSide() == ForgeDirection.WEST) {
|
||||
final double m = x;
|
||||
x = -y;
|
||||
y = m;
|
||||
}
|
||||
|
||||
if (this.getSide() == ForgeDirection.SOUTH) {
|
||||
final double m = z;
|
||||
z = y;
|
||||
y = m;
|
||||
y = -y;
|
||||
}
|
||||
|
||||
if (this.getSide() == ForgeDirection.NORTH) {
|
||||
final double m = z;
|
||||
z = -y;
|
||||
y = m;
|
||||
}
|
||||
|
||||
x += this.centerX; // + orientation.offsetX * 0.4;
|
||||
y += this.centerY; // + orientation.offsetY * 0.4;
|
||||
z += this.centerZ; // + orientation.offsetZ * 0.4;
|
||||
|
||||
var12.addVertexWithUV(x, y, z, u, v);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderStatic(final int x, final int y, final int z, final IPartRenderHelper rh,
|
||||
final RenderBlocks renderer) {
|
||||
rh.setTexture(this.getItemStack().getIconIndex());
|
||||
|
||||
renderer.renderAllFaces = true;
|
||||
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
tess.setBrightness(rh.getBlock().getMixedBrightnessForBlock(this.getHost().getTile().getWorldObj(), x, y, z));
|
||||
tess.setColorOpaque_F(1.0F, 1.0F, 1.0F);
|
||||
|
||||
this.renderTorchAtAngle(x, y, z);
|
||||
|
||||
renderer.renderAllFaces = false;
|
||||
|
||||
rh.setBounds(7, 7, 11, 9, 9, 12);
|
||||
this.renderLights(x, y, z, rh, renderer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int isProvidingStrongPower() {
|
||||
return this.prevState ? 15 : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int isProvidingWeakPower() {
|
||||
return this.prevState ? 15 : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void randomDisplayTick(final World world, final int x, final int y, final int z, final Random r) {
|
||||
if (this.isLevelEmitterOn()) {
|
||||
final ForgeDirection d = this.getSide();
|
||||
|
||||
final double d0 = d.offsetX * 0.45F + (r.nextFloat() - 0.5F) * 0.2D;
|
||||
final double d1 = d.offsetY * 0.45F + (r.nextFloat() - 0.5F) * 0.2D;
|
||||
final double d2 = d.offsetZ * 0.45F + (r.nextFloat() - 0.5F) * 0.2D;
|
||||
|
||||
world.spawnParticle("reddust", 0.5 + x + d0, 0.5 + y + d1, 0.5 + z + d2, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int cableConnectionRenderTo() {
|
||||
return 16;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate(final EntityPlayer player, final Vec3 pos) {
|
||||
if (!player.isSneaking()) {
|
||||
if (Platform.isClient()) {
|
||||
return true;
|
||||
}
|
||||
InventoryHandler.openGui(
|
||||
player,
|
||||
this.getHost().getTile().getWorldObj(),
|
||||
new BlockPos(this.getHost().getTile()),
|
||||
Objects.requireNonNull(getSide()),
|
||||
GuiType.FLUID_LEVEL_EMITTER);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSetting(final IConfigManager manager, @SuppressWarnings("rawtypes") final Enum settingName,
|
||||
@SuppressWarnings("rawtypes") final Enum newValue) {
|
||||
this.configureWatchers();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChangeInventory(final IInventory inv, final int slot, final InvOperation mc,
|
||||
final ItemStack removedStack, final ItemStack newStack) {
|
||||
if (inv == this.config) {
|
||||
this.configureWatchers();
|
||||
}
|
||||
super.onChangeInventory(inv, slot, mc, removedStack, newStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void upgradesChanged() {
|
||||
this.configureWatchers();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnectRedstone() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(final NBTTagCompound data) {
|
||||
super.readFromNBT(data);
|
||||
this.lastReportedValue = data.getLong("lastReportedValue");
|
||||
this.reportingValue = data.getLong("reportingValue");
|
||||
this.prevState = data.getBoolean("prevState");
|
||||
this.config.readFromNBT(data, "config");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(final NBTTagCompound data) {
|
||||
super.writeToNBT(data);
|
||||
data.setLong("lastReportedValue", this.lastReportedValue);
|
||||
data.setLong("reportingValue", this.reportingValue);
|
||||
data.setBoolean("prevState", this.prevState);
|
||||
this.config.writeToNBT(data, "config");
|
||||
}
|
||||
|
||||
public void setFluidInSlot(int id, IAEFluidStack fluid) {
|
||||
ItemStack tmp = ItemFluidPacket.newDisplayStack(fluid == null ? null : fluid.getFluidStack());
|
||||
this.config.setInventorySlotContents(id, tmp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IInventory getInventoryByName(final String name) {
|
||||
if (name.equals("config")) {
|
||||
return this.config;
|
||||
}
|
||||
|
||||
return super.getInventoryByName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LevelItemInfo[] getLevelItemInfoList() {
|
||||
ItemStack stack = this.config.getStackInSlot(0);
|
||||
if (stack == null) return new LevelItemInfo[] { null };
|
||||
return new LevelItemInfo[] { new LevelItemInfo(
|
||||
stack,
|
||||
this.getReportingValue(),
|
||||
-1,
|
||||
this.isProvidingStrongPower() > 0 ? LevelState.Craft : LevelState.Idle) };
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -83,7 +83,7 @@ public class PartFluidLevelEmitterAdapter implements ILevelViewable, ILevelViewa
|
||||
if (stack == null) return new LevelItemInfo[] { null };
|
||||
return new LevelItemInfo[] { new LevelItemInfo(
|
||||
stack,
|
||||
delegate.getReportingValue(),
|
||||
1, // delegate.getReportingValue()
|
||||
-1,
|
||||
delegate.isProvidingStrongPower() > 0 ? LevelState.Craft : LevelState.Idle) };
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ import com.glodblock.github.client.gui.GuiDualInterface;
|
||||
import com.glodblock.github.client.gui.GuiFluidAutoFiller;
|
||||
import com.glodblock.github.client.gui.GuiFluidIO;
|
||||
import com.glodblock.github.client.gui.GuiFluidInterface;
|
||||
import com.glodblock.github.client.gui.GuiFluidLevelEmitter;
|
||||
import com.glodblock.github.client.gui.GuiFluidPacketDecoder;
|
||||
import com.glodblock.github.client.gui.GuiFluidPatternEncoder;
|
||||
import com.glodblock.github.client.gui.GuiFluidStorageBus;
|
||||
@@ -26,7 +25,6 @@ import com.glodblock.github.client.gui.container.ContainerDualInterface;
|
||||
import com.glodblock.github.client.gui.container.ContainerFluidAutoFiller;
|
||||
import com.glodblock.github.client.gui.container.ContainerFluidIO;
|
||||
import com.glodblock.github.client.gui.container.ContainerFluidInterface;
|
||||
import com.glodblock.github.client.gui.container.ContainerFluidLevelEmitter;
|
||||
import com.glodblock.github.client.gui.container.ContainerFluidPacketDecoder;
|
||||
import com.glodblock.github.client.gui.container.ContainerFluidPatternEncoder;
|
||||
import com.glodblock.github.client.gui.container.ContainerFluidStorageBus;
|
||||
@@ -38,7 +36,6 @@ import com.glodblock.github.client.gui.container.ContainerLevelWireless;
|
||||
import com.glodblock.github.client.gui.container.ContainerMagnetFilter;
|
||||
import com.glodblock.github.client.gui.container.ContainerOCPatternEditor;
|
||||
import com.glodblock.github.client.gui.container.ContainerSuperStockReplenisher;
|
||||
import com.glodblock.github.common.parts.PartFluidLevelEmitter;
|
||||
import com.glodblock.github.common.parts.PartFluidStorageBus;
|
||||
import com.glodblock.github.common.parts.base.FCSharedFluidBus;
|
||||
import com.glodblock.github.common.tile.TileFluidAutoFiller;
|
||||
@@ -71,19 +68,6 @@ public enum GuiType {
|
||||
}
|
||||
}),
|
||||
|
||||
FLUID_LEVEL_EMITTER(new PartGuiFactory<>(PartFluidLevelEmitter.class) {
|
||||
|
||||
@Override
|
||||
protected Object createServerGui(EntityPlayer player, PartFluidLevelEmitter inv) {
|
||||
return new ContainerFluidLevelEmitter(player.inventory, inv);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Object createClientGui(EntityPlayer player, PartFluidLevelEmitter inv) {
|
||||
return new GuiFluidLevelEmitter(player.inventory, inv);
|
||||
}
|
||||
}),
|
||||
|
||||
LEVEL_MAINTAINER(new TileGuiFactory<>(TileLevelMaintainer.class) {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -11,7 +11,6 @@ import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.apache.commons.lang3.tuple.ImmutablePair;
|
||||
|
||||
import com.glodblock.github.client.gui.container.ContainerFluidLevelEmitter;
|
||||
import com.glodblock.github.util.NameConst;
|
||||
import com.glodblock.github.util.Util;
|
||||
|
||||
@@ -59,9 +58,7 @@ public class CPacketValueConfig implements IMessage {
|
||||
EntityPlayer player = ctx.getServerHandler().playerEntity;
|
||||
Container container = player.openContainer;
|
||||
if (container != null) {
|
||||
if (container instanceof ContainerFluidLevelEmitter) {
|
||||
((ContainerFluidLevelEmitter) container).setLevel(message.amount, player);
|
||||
} else if (container instanceof ContainerPlayer) {
|
||||
if (container instanceof ContainerPlayer) {
|
||||
ImmutablePair<Integer, ItemStack> result = Util.getUltraWirelessTerm(player);
|
||||
if (result != null) {
|
||||
final ItemStack wirelessTerm = result.getRight();
|
||||
|
||||
@@ -10,7 +10,6 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.glodblock.github.client.gui.GuiFluidIO;
|
||||
import com.glodblock.github.client.gui.GuiFluidInterface;
|
||||
import com.glodblock.github.client.gui.GuiFluidLevelEmitter;
|
||||
import com.glodblock.github.client.gui.GuiIngredientBuffer;
|
||||
import com.glodblock.github.client.gui.GuiLargeIngredientBuffer;
|
||||
import com.glodblock.github.util.Util;
|
||||
@@ -95,10 +94,6 @@ public class SPacketFluidUpdate implements IMessage {
|
||||
for (Map.Entry<Integer, IAEFluidStack> e : message.list.entrySet()) {
|
||||
((GuiFluidInterface) gs).update(e.getKey(), e.getValue());
|
||||
}
|
||||
} else if (gs instanceof GuiFluidLevelEmitter) {
|
||||
for (Map.Entry<Integer, IAEFluidStack> e : message.list.entrySet()) {
|
||||
((GuiFluidLevelEmitter) gs).update(e.getKey(), e.getValue());
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user