Compare commits

...
Author SHA1 Message Date
Kogepan229 ac0e0de363 Improve level terminal button clarity (#417) 2026-04-16 20:58:52 +00:00
Caelix f98e44d106 fix: ensure fluid packets drop when part is broken (#418) 2026-04-16 22:53:19 +02:00
lc-1337andKogepan229 e66050c78d Legacy stack type (#416)
Co-authored-by: Kogepan229 <[email protected]>
2026-04-07 21:23:45 +09:00
lc-1337andkoolkrafter5 4313dbb4e0 Fix storage bus not read fluid in configurated dual interface (#415)
Co-authored-by: koolkrafter5 <[email protected]>
2026-04-05 10:26:33 +02:00
11 changed files with 82 additions and 35 deletions

No files matched your search

+8 -8
View File
@@ -34,10 +34,10 @@
* For more details, see https://docs.gradle.org/8.0.1/userguide/java_library_plugin.html#sec:java_library_configurations_graph
*/
dependencies {
api('com.github.GTNewHorizons:NotEnoughItems:2.8.86-GTNH:dev')
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-885-GTNH:dev')
api('com.github.GTNewHorizons:NotEnoughItems:2.8.91-GTNH:dev')
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-894-GTNH:dev')
api('com.github.GTNewHorizons:waila:1.19.22:dev')
api("com.github.GTNewHorizons:GTNHLib:0.9.47:dev")
api("com.github.GTNewHorizons:GTNHLib:0.9.50:dev")
implementation("com.github.GTNewHorizons:WirelessCraftingTerminal:1.12.13:dev") {
exclude group: 'com.github.GTNewHorizons', module: 'Applied-Energistics-2-Unofficial'
@@ -45,17 +45,17 @@ dependencies {
compileOnly('com.github.GTNewHorizons:Baubles-Expanded:2.2.11-GTNH:dev')
compileOnly('com.github.GTNewHorizons:ExtraCells2:2.5.35:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:ForestryMC:4.11.12:dev')
compileOnly('com.github.GTNewHorizons:EnderIO:2.10.22:dev')
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.52.402:dev') {
compileOnly('com.github.GTNewHorizons:ForestryMC:4.11.13:dev')
compileOnly('com.github.GTNewHorizons:EnderIO:2.10.23:dev')
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.52.429:dev') {
exclude group: 'com.github.GTNewHorizons', module: 'AE2FluidCraft-Rework'
exclude group: 'com.github.GTNewHorizons', module: 'Applied-Energistics-2-Unofficial'
}
compileOnly('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
compileOnly('com.gregoriust.gregtech:gregtech_1.7.10:6.14.23:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:OpenComputers:1.12.22-GTNH:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.7.39-GTNH:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:OpenComputers:1.12.34-GTNH:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.7.41-GTNH:dev') { transitive = false }
runtimeOnlyNonPublishable("com.github.GTNewHorizons:DuraDisplay:1.4.2:dev")
}
@@ -49,7 +49,7 @@ public class GuiFCImgButton extends GuiButton implements ITooltip {
this.registerApp(2, "FORCE_PRIO", "DO_PRIO", "prio");
this.registerApp(3, "NOT_PRIO", "DONT_PRIO", "not_prio");
this.registerApp(4, "SUBMIT", "SUBMIT", "submit");
this.registerApp(5, "EDIT", "YES", "edit");
this.registerApp(5, "RENAME", "YES", "rename");
this.registerApp(6, "DISABLE", "DISABLE", "disable");
this.registerApp(7, "ENABLE", "ENABLE", "enable");
this.registerApp(10, "FLUID_TEM", "YES", "fluid_terminal_w");
@@ -65,7 +65,7 @@ public class GuiFCImgButton extends GuiButton implements ITooltip {
this.registerApp(22, "SWITCH", "OFF", "view");
this.registerApp(21, "SWITCH", "ENABLE", "enable");
this.registerApp(22, "SWITCH", "DISABLE", "disable");
this.registerApp(23, "CONFIG", "YES", "open_configuration");
this.registerApp(23, "OPEN_GUI", "YES", "open_gui");
this.registerApp(24, "HIGHLIGHT", "YES", "block_highlight");
this.registerApp(30, "MAGNET_CARD", "INV", "magnet_card.inv");
this.registerApp(30, "MAGNET_CARD", "ME", "magnet_card.me");
@@ -499,10 +499,10 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
entry.renameButton.yPosition = viewY + 1;
entry.configButton.yPosition = viewY + 1;
GuiFCImgButton toRender;
if (isCtrlKeyDown() && isShiftKeyDown()) {
toRender = entry.configButton;
} else if (isShiftKeyDown()) {
if (isShiftKeyDown() && entry.isInPlayerDimension()) {
toRender = entry.renameButton;
} else if (isCtrlKeyDown() && entry.isInPlayerDimension()) {
toRender = entry.configButton;
} else {
toRender = entry.highlightButton;
}
@@ -512,7 +512,16 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
// draw a tooltip
GL11.glTranslatef(0f, 0f, TOOLTIP_Z);
GL11.glDisable(GL11.GL_SCISSOR_TEST);
drawHoveringText(Arrays.asList(toRender.getMessage()), relMouseX, relMouseY);
List<String> tooltip = new ArrayList<>();
tooltip.add(toRender.getMessage());
if (entry.isInPlayerDimension()) {
tooltip.add(StatCollector.translateToLocal(NameConst.TT_KEY + "level_terminal.hint_rename"));
tooltip.add(StatCollector.translateToLocal(NameConst.TT_KEY + "level_terminal.hint_open_gui"));
} else {
tooltip.add(
StatCollector.translateToLocal(NameConst.TT_KEY + "level_terminal.hint_other_dimension"));
}
drawHoveringText(tooltip, relMouseX, relMouseY);
GL11.glTranslatef(0f, 0f, -TOOLTIP_Z);
GL11.glEnable(GL11.GL_SCISSOR_TEST);
}
@@ -1185,8 +1194,8 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
}
}
highlightButton = new GuiFCImgButton(1, 0, "HIGHLIGHT", "YES");
renameButton = new GuiFCImgButton(1, 0, "EDIT", "YES");
configButton = new GuiFCImgButton(1, 0, "CONFIG", "YES");
renameButton = new GuiFCImgButton(1, 0, "RENAME", "YES");
configButton = new GuiFCImgButton(1, 0, "OPEN_GUI", "YES");
guiHeight = 18 * rows + 1;
filteredRecipes = new boolean[rows * rowSize];
}
@@ -1206,6 +1215,10 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
return this;
}
private boolean isInPlayerDimension() {
return mc != null && mc.thePlayer != null && mc.thePlayer.dimension == this.dim;
}
public boolean mouseClicked(int mouseX, int mouseY, int mouseButton) {
if (!section.visible || mouseButton < 0 || mouseButton > 2) {
return false;
@@ -1221,16 +1234,7 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
dim,
ForgeDirection.getOrientation(side),
"");
if (isCtrlKeyDown() && isShiftKeyDown()) {
FluidCraft.proxy.netHandler.sendToServer(
new CPacketLevelTerminalCommands(
Action.EDIT,
blockPos.x,
blockPos.y,
blockPos.z,
blockPos.getDimension(),
blockPos.getSide()));
} else if (isShiftKeyDown()) {
if (isShiftKeyDown() && isInPlayerDimension()) {
FluidCraft.proxy.netHandler.sendToServer(
new CPacketLevelTerminalCommands(
Action.RENAME,
@@ -1239,7 +1243,15 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
blockPos.z,
blockPos.getDimension(),
blockPos.getSide()));
} else if (isCtrlKeyDown() && isInPlayerDimension()) {
FluidCraft.proxy.netHandler.sendToServer(
new CPacketLevelTerminalCommands(
Action.EDIT,
blockPos.x,
blockPos.y,
blockPos.z,
blockPos.getDimension(),
blockPos.getSide()));
} else {
BlockPosHighlighter.highlightBlocks(
mc.thePlayer,
@@ -27,6 +27,7 @@ import appeng.api.networking.events.MENetworkEventSubscribe;
import appeng.api.networking.events.MENetworkPowerStatusChange;
import appeng.api.networking.ticking.TickRateModulation;
import appeng.api.networking.ticking.TickingRequest;
import appeng.api.storage.IMEMonitor;
import appeng.api.storage.data.IAEFluidStack;
import appeng.helpers.ICustomButtonDataObject;
import appeng.helpers.ICustomButtonProvider;
@@ -50,6 +51,12 @@ public class PartFluidInterface extends PartInterface implements IDualHost, ICus
this.customButtonDataObject = new FluidInterfaceButtons(false);
}
@Override
public void getDrops(final List<ItemStack> drops, final boolean wrenched) {
this.fluidDuality.addDrops(drops);
super.getDrops(drops, wrenched);
}
@MENetworkEventSubscribe
public void stateChange(final MENetworkChannelsChanged c) {
fluidDuality.onChannelStateChange(c);
@@ -78,6 +85,11 @@ public class PartFluidInterface extends PartInterface implements IDualHost, ICus
return fluidDuality.getTanks();
}
@Override
public IMEMonitor<IAEFluidStack> getFluidInventory() {
return this.fluidDuality.getFluidInventory();
}
@Override
public AppEngInternalAEInventory getConfig() {
Util.mirrorFluidToPacket(this.config, fluidDuality.getConfig());
@@ -1,5 +1,7 @@
package com.glodblock.github.common.parts;
import static appeng.util.item.AEFluidStackType.FLUID_STACK_TYPE;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@@ -8,6 +10,7 @@ import com.glodblock.github.common.item.ItemFluidPacket;
import appeng.api.storage.StorageName;
import appeng.api.storage.data.IAEItemStack;
import appeng.api.storage.data.IAEStack;
import appeng.api.storage.data.IAEStackType;
import appeng.helpers.Reflected;
import appeng.parts.automation.PartLevelEmitter;
@@ -27,4 +30,9 @@ public class PartFluidLevelEmitter extends PartLevelEmitter {
this.getAEInventoryByName(StorageName.CONFIG).putAEStackInSlot(0, ItemFluidPacket.getFluidAEStack(ais));
}
}
@Override
protected IAEStackType<?> getUltraLegacyType() {
return FLUID_STACK_TYPE;
}
}
@@ -25,6 +25,7 @@ import appeng.api.implementations.items.IMemoryCard;
import appeng.api.networking.IGridNode;
import appeng.api.networking.ticking.TickRateModulation;
import appeng.api.networking.ticking.TickingRequest;
import appeng.api.storage.IMEMonitor;
import appeng.api.storage.data.IAEFluidStack;
import appeng.api.util.IConfigManager;
import appeng.helpers.DualityInterface;
@@ -50,6 +51,12 @@ public class PartFluidP2PInterface extends PartP2PInterface implements IDualHost
this.customButtonDataObject = new FluidInterfaceButtons(false);
}
@Override
public void getDrops(final List<ItemStack> drops, final boolean wrenched) {
this.dualityFluid.addDrops(drops);
super.getDrops(drops, wrenched);
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getTypeTexture() {
@@ -147,6 +154,11 @@ public class PartFluidP2PInterface extends PartP2PInterface implements IDualHost
return dualityFluid;
}
@Override
public IMEMonitor<IAEFluidStack> getFluidInventory() {
return this.dualityFluid.getFluidInventory();
}
@Override
public AppEngInternalAEInventory getConfig() {
Util.mirrorFluidToPacket(config, dualityFluid.getConfig());
@@ -32,6 +32,7 @@ import appeng.api.networking.events.MENetworkEventSubscribe;
import appeng.api.networking.events.MENetworkPowerStatusChange;
import appeng.api.networking.ticking.TickRateModulation;
import appeng.api.networking.ticking.TickingRequest;
import appeng.api.storage.IMEMonitor;
import appeng.api.storage.data.IAEFluidStack;
import appeng.api.util.IConfigManager;
import appeng.helpers.ICustomButtonDataObject;
@@ -98,6 +99,11 @@ public class TileFluidInterface extends TileInterface implements IDualHost, ICus
return fluidDuality.getTanks();
}
@Override
public IMEMonitor<IAEFluidStack> getFluidInventory() {
return this.fluidDuality.getFluidInventory();
}
@Override
public AppEngInternalAEInventory getConfig() {
Util.mirrorFluidToPacket(this.config, fluidDuality.getConfig());
@@ -153,13 +153,11 @@ ae2fc.tooltip.prio.hint=An
ae2fc.tooltip.submit=Speichern
ae2fc.tooltip.enable=An
ae2fc.tooltip.disable=Aus
ae2fc.tooltip.edit=Editieren
ae2fc.tooltip.view=Ansehen
ae2fc.tooltip.fill_pattern=Automatisches Füllen von leerer Schablone
ae2fc.tooltip.not_fill_pattern=Automatisches Füllen von leerer Schablone
ae2fc.tooltip.fill_pattern.hint=An
ae2fc.tooltip.not_fill_pattern.hint=Aus
ae2fc.tooltip.open_configuration=Konfiguration öffnen
ae2fc.tooltip.block_highlight=Block hervorheben
ae2fc.tooltip.magnet_card.off=Magnetkarte
@@ -153,14 +153,17 @@ ae2fc.tooltip.prio.hint=Enabled
ae2fc.tooltip.submit=Submit
ae2fc.tooltip.enable=Enabled
ae2fc.tooltip.disable=Disabled
ae2fc.tooltip.edit=Edit
ae2fc.tooltip.rename=Rename
ae2fc.tooltip.view=View
ae2fc.tooltip.fill_pattern=Allow auto fill blank pattern
ae2fc.tooltip.not_fill_pattern=Allow auto fill blank pattern
ae2fc.tooltip.fill_pattern.hint=Enabled
ae2fc.tooltip.not_fill_pattern.hint=Disabled
ae2fc.tooltip.open_configuration=Open configuration
ae2fc.tooltip.open_gui=Open GUI
ae2fc.tooltip.block_highlight=Highlight Block
ae2fc.tooltip.level_terminal.hint_rename=§6SHIFT§8 - §7Rename
ae2fc.tooltip.level_terminal.hint_open_gui=§6CTRL§8 - §7Open GUI
ae2fc.tooltip.level_terminal.hint_other_dimension=§eCannot perform any action: target is in another dimension
ae2fc.tooltip.magnet_card.off=Magnet Card
ae2fc.tooltip.magnet_card.off.hint=Off
@@ -153,13 +153,11 @@ ae2fc.tooltip.prio.hint=Включено
ae2fc.tooltip.submit=Подтвердить
ae2fc.tooltip.enable=Включено
ae2fc.tooltip.disable=Отключено
ae2fc.tooltip.edit=Изменить
ae2fc.tooltip.view=Вид
ae2fc.tooltip.fill_pattern=Разрешить автопополнение пустыми шаблонами
ae2fc.tooltip.not_fill_pattern=Разрешить автопополнение пустыми шаблонами
ae2fc.tooltip.fill_pattern.hint=Включено
ae2fc.tooltip.not_fill_pattern.hint=Отключено
ae2fc.tooltip.open_configuration=Открыть настройки
ae2fc.tooltip.block_highlight=Подсветить блок
ae2fc.tooltip.magnet_card.off=Магнитная карта
@@ -147,13 +147,11 @@ ae2fc.tooltip.prio.hint=启用
ae2fc.tooltip.submit=提交
ae2fc.tooltip.enable=启用
ae2fc.tooltip.disable=禁用
ae2fc.tooltip.edit=编辑
ae2fc.tooltip.view=View
ae2fc.tooltip.fill_pattern=允许自动填充空白样板
ae2fc.tooltip.not_fill_pattern=允许自动填充空白样板
ae2fc.tooltip.fill_pattern.hint=启用
ae2fc.tooltip.not_fill_pattern.hint=禁用
ae2fc.tooltip.open_configuration=Open configuration
ae2fc.tooltip.block_highlight=Highlight Block
ae2fc.tooltip.magnet_card.off=Magnet Card