Add IStorageBus#getPartName for storage bus GUI titles (#26041) (#1538)

This commit is contained in:
vVv authored and GitHub committed 2026-08-23 14:53:32 +07:00
1 parent bd81ed4454
commit 7bd067b55f
3 files changed
+14 -1

No files matched your search

@@ -16,6 +16,8 @@ import appeng.tile.inventory.IIAEStackInventory;
import appeng.transformer.annotations.Integration.Interface;
import appeng.util.IConfigManagerHost;
import buildcraft.api.transport.IPipeConnection;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@Interface(iname = IntegrationType.BuildCraftTransport, iface = "buildcraft.api.transport.IPipeConnection")
public interface IStorageBus
@@ -33,4 +35,7 @@ public interface IStorageBus
default IItemList getItemList() {
return getStackType().createList();
}
@SideOnly(Side.CLIENT)
String getPartName();
}
@@ -51,10 +51,12 @@ public class GuiStorageBus extends GuiUpgradeable {
private GuiImgButton extractionMode;
private VirtualMEPhantomSlot[] configSlots;
private final ContainerStorageBus containerStorageBus;
private final IStorageBus storageBus;
public GuiStorageBus(final InventoryPlayer inventoryPlayer, final IStorageBus te) {
super(new ContainerStorageBus(inventoryPlayer, te));
this.containerStorageBus = (ContainerStorageBus) inventorySlots;
this.storageBus = te;
this.ySize = 251;
}
@@ -115,7 +117,7 @@ public class GuiStorageBus extends GuiUpgradeable {
@Override
public void drawFG(final int offsetX, final int offsetY, final int mouseX, final int mouseY) {
this.fontRendererObj.drawString(
this.getGuiDisplayName(GuiText.StorageBus.getLocal()),
this.getGuiDisplayName(this.storageBus.getPartName()),
8,
6,
ColorUtils.guiTextColorGray.getColor());
@@ -514,6 +514,12 @@ public class PartStorageBus extends PartUpgradeable implements IStorageBus {
return false;
}
@Override
@SideOnly(Side.CLIENT)
public String getPartName() {
return this.getItemStack().getDisplayName();
}
@Override
public TickingRequest getTickingRequest(final IGridNode node) {
return new TickingRequest(