Skip to content

Commit

Permalink
Fix the super bus not working with the NAE2 circuit card (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zorbatron authored Feb 12, 2025
1 parent 9c01aa6 commit c945ead
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ public void setGhostCircuitConfig(int config) {
if (this.circuitItemStackHandler.getCircuitValue() == config) {
return;
}

this.circuitItemStackHandler.setCircuitValue(config);

if (!getWorld().isRemote) {
markDirty();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import gregtech.api.capability.GregtechDataCodes;
import gregtech.api.capability.GregtechTileCapabilities;
import gregtech.api.capability.IControllable;
import gregtech.api.capability.IGhostSlotConfigurable;
import gregtech.api.capability.impl.GhostCircuitItemStackHandler;
import gregtech.api.capability.impl.ItemHandlerList;
import gregtech.api.gui.GuiTextures;
Expand All @@ -52,7 +53,8 @@
import gregtech.common.metatileentities.multi.multiblockpart.MetaTileEntityMultiblockNotifiablePart;

public class MTESuperInputBus extends MetaTileEntityMultiblockNotifiablePart
implements IMultiblockAbilityPart<IItemHandlerModifiable>, IControllable {
implements IMultiblockAbilityPart<IItemHandlerModifiable>, IControllable,
IGhostSlotConfigurable {

private boolean workingEnabled = false;
private boolean shouldReturnItems = false;
Expand Down Expand Up @@ -263,6 +265,24 @@ public boolean onScrewdriverClick(EntityPlayer playerIn, EnumHand hand, EnumFaci
return true;
}

@Override
public boolean hasGhostCircuitInventory() {
return true;
}

@Override
public void setGhostCircuitConfig(int config) {
if (this.ghostCircuitItemStackHandler.getCircuitValue() == config) {
return;
}

this.ghostCircuitItemStackHandler.setCircuitValue(config);

if (!getWorld().isRemote) {
markDirty();
}
}

@SideOnly(Side.CLIENT)
@Override
public void addInformation(ItemStack stack, @Nullable World world, @NotNull List<String> tooltip,
Expand Down

0 comments on commit c945ead

Please sign in to comment.