Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
2a17ce2
Added a mode to Super Stock Replenisher called Full-stock Mode
Inphysible Jun 4, 2026
0ecff9c
Added a mode to Super Stock Replenisher called Full-stock Mode
Inphysible Jun 4, 2026
84b00e7
Merge branch 'superStockReplenisherFullStockMode' of https://github.c…
Inphysible Jun 4, 2026
22f0589
Added a mode to Super Stock Replenisher called Full-stock Mode
Inphysible Jun 4, 2026
5978d67
Merge branch 'superStockReplenisherFullStockMode' of https://github.c…
Inphysible Jun 4, 2026
81cc904
Added button textures to Super Stock Replenisher's Full-stock Mode an…
Inphysible Jun 4, 2026
9210402
Merge branch 'superStockReplenisherFullStockMode' of https://github.c…
Inphysible Jun 4, 2026
1726e6e
Fixed config ISEItemStack and FluidStack not being copied while check…
Inphysible Jun 5, 2026
abdc292
Minor rework and more fixes for config IAEItemStack and IAEFluidStack…
Inphysible Jun 6, 2026
71c388d
Some adjustments and fluid support
Inphysible Jun 7, 2026
9b85520
Some adjustments and fluid support
Inphysible Jun 7, 2026
368af2f
Merge
Inphysible Jun 7, 2026
e5e7ebf
Merge
Inphysible Jun 7, 2026
74cd07a
Merge
Inphysible Jun 7, 2026
1cc8392
Merge
Inphysible Jun 7, 2026
1d3a25d
Merge branch 'superStockReplenisherFullStockMode' of https://github.c…
Inphysible Jun 7, 2026
809b212
Some adjustments and fluid support
Inphysible Jun 7, 2026
f60587d
Merge branch 'superStockReplenisherFullStockMode' of https://github.c…
Inphysible Jun 7, 2026
66d41a3
Merge cleanup
Inphysible Jun 7, 2026
bd9d690
Merge branch 'superStockReplenisherFullStockMode' into master
Inphysible Jun 7, 2026
e04c050
Merge branch 'master' into superStockReplenisherFullStockMode
Inphysible Jun 7, 2026
2e8957a
ci opti image
PLASMAchicken Jun 7, 2026
6800a99
Resolve conversation: simplify if-checks
Inphysible Jun 10, 2026
57f79fc
Merge branch 'GTNewHorizons:master' into superStockReplenisherFullSto…
Inphysible Jun 10, 2026
079be1d
Merge pull request #1 from Inphysible/master
Inphysible Jun 10, 2026
47bbb3a
Resolve conversation: simplify if-checks some more
Inphysible Jun 10, 2026
78450a6
Made tickrate ramp up if Full-stock mode is on
Inphysible Jun 10, 2026
a88d51b
Made tickrate ramp up if Full-stock mode is on
Inphysible Jun 10, 2026
4fca766
Merge branch 'superStockReplenisherFullStockMode' of https://github.c…
Inphysible Jun 10, 2026
9e2abf2
Merge branch 'superStockReplenisherFullStockMode' of https://github.c…
Inphysible Jun 10, 2026
746eb5a
Merge branch 'superStockReplenisherFullStockMode' of https://github.c…
Inphysible Jun 10, 2026
d891e1c
Attempt two at making tickrate ramp up if Full-stock mode is on
Inphysible Jun 10, 2026
3722a6a
Resolve conversation: use new SyncManager class from AE2
Inphysible Jun 11, 2026
a01cda6
Resolve conversation: `CPacketSuperStockReplenisher` is no longer req…
Inphysible Jun 12, 2026
6c148a4
Resolve conversation: Removed dependency for `CPacketSuperStockReplen…
Inphysible Jun 12, 2026
92fe38f
Resolve conversation: tweaked `doWork()` to assign `TickRateModulatio…
Inphysible Jun 12, 2026
7cf5191
Merge branch 'master' into superStockReplenisherFullStockMode
lc-1337 Jun 13, 2026
00f2c62
Resolve conversation: clean up commented code
Inphysible Jun 14, 2026
0baba0c
Merge branch 'superStockReplenisherFullStockMode' of https://github.c…
Inphysible Jun 14, 2026
6ed111a
Merge branch 'master' into superStockReplenisherFullStockMode
Dream-Master Jun 15, 2026
cb3579a
Resolve conversation: use `flushPendingSync()` instead of `forceUpdat…
Inphysible Jun 18, 2026
ec7afc6
Resolve conversation: client TE and server TE synchronization
Inphysible Jun 18, 2026
37673c2
Resolved conversation: removed `postEvent()` in `setSlotsAccessible()`
Inphysible Jun 18, 2026
943a3da
Merge branch 'superStockReplenisherFullStockMode' of https://github.c…
Inphysible Jun 18, 2026
e5f64b8
Resolve conversation: `onClientChange()` updated
Inphysible Jun 18, 2026
fb3fc56
Merge branch 'GTNewHorizons:master' into superStockReplenisherFullSto…
Inphysible Jun 21, 2026
55fd5a1
Resolve conversation: complete implementation of SyncHandler function…
Inphysible Jun 21, 2026
6749872
Resolve conversation: remove useless code
Inphysible Jun 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ public GuiFCImgButton(final int x, final int y, final String idx, final String v
this.registerApp(22, "SWITCH", "DISABLE", "disable");
this.registerApp(23, "OPEN_GUI", "YES", "open_gui");
this.registerApp(24, "HIGHLIGHT", "YES", "block_highlight");
this.registerApp(26, "stock mode button", "normalMode", "Normal.mode");
this.registerApp(27, "stock mode button", "fullstockMode", "Full-stock.mode");
this.registerApp(30, "MAGNET_CARD", "INV", "magnet_card.inv");
this.registerApp(30, "MAGNET_CARD", "ME", "magnet_card.me");
this.registerApp(30, "MAGNET_CARD", "FILTER", "magnet_card.filter");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import java.util.HashMap;
import java.util.Map;

import net.minecraft.client.gui.GuiButton;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;

Expand All @@ -29,14 +30,18 @@ public class GuiSuperStockReplenisher extends AEBaseGui {
private final DecimalFormat df = new DecimalFormat("#.#");
private Map<Integer, IAEStack<?>> list = new HashMap<>();
private final ContainerSuperStockReplenisher containerSuperStockReplenisher;
private final TileSuperStockReplenisher tileSuperStockReplenisher;

private final VirtualMEPhantomSlotPrecise[] configFluidsSlots = new VirtualMEPhantomSlotPrecise[9];
private final VirtualMEPhantomSlotPrecise[] configItemsSlots = new VirtualMEPhantomSlotPrecise[63];

private GuiFCImgButton StockModeButton;

public GuiSuperStockReplenisher(InventoryPlayer ipl, TileSuperStockReplenisher tile) {
super(new ContainerSuperStockReplenisher(ipl, tile));

this.containerSuperStockReplenisher = (ContainerSuperStockReplenisher) inventorySlots;
this.tileSuperStockReplenisher = tile;

this.ySize = 251;
this.xSize = 216;
Expand All @@ -45,6 +50,15 @@ public GuiSuperStockReplenisher(InventoryPlayer ipl, TileSuperStockReplenisher t
@Override
public void initGui() {
super.initGui();

this.StockModeButton = new GuiFCImgButton(
guiLeft - 18,
guiTop + 8,
"stock mode button",
this.containerSuperStockReplenisher.isFullStockMode() ? "fullstockMode" : "normalMode",
true);
this.containerSuperStockReplenisher.setModeButton(this.StockModeButton);
buttonList.add(this.StockModeButton);
this.initSlots();
}

Expand Down Expand Up @@ -125,6 +139,19 @@ public void drawBG(int offsetX, int offsetY, int mouseX, int mouseY) {
this.drawTexturedModalRect(offsetX, offsetY, 0, 0, xSize, ySize);
}

@Override
protected void actionPerformed(final GuiButton btn) {
if (actionPerformedCustomButtons(btn)) return;
if (btn == StockModeButton) {
boolean newMode = !containerSuperStockReplenisher.isFullStockMode();
this.containerSuperStockReplenisher.setFullStockMode(newMode);
StockModeButton.set(newMode ? "fullstockMode" : "normalMode");

this.flushPendingSync();
}
super.actionPerformed(btn);
}

public void update(Map<Integer, IAEStack<?>> map) {
this.list = map;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import net.minecraft.item.ItemStack;

import com.glodblock.github.FluidCraft;
import com.glodblock.github.client.gui.GuiFCImgButton;
import com.glodblock.github.common.item.FCBaseItemCell;
import com.glodblock.github.common.tile.TileSuperStockReplenisher;
import com.glodblock.github.inventory.gui.GuiType;
Expand All @@ -27,10 +28,13 @@
import appeng.container.slot.SlotRestrictedInput;
import appeng.container.sync.SyncManager;
import appeng.container.sync.handlers.AEStackInventorySyncHandler;
import appeng.container.sync.handlers.BooleanSyncHandler;
import appeng.items.storage.ItemBasicStorageCell;
import appeng.tile.inventory.IAEStackInventory;
import appeng.util.Platform;
import appeng.util.item.AEItemStack;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

public class ContainerSuperStockReplenisher extends AEBaseContainer implements IVirtualSlotSource {

Expand All @@ -44,6 +48,11 @@ public class ContainerSuperStockReplenisher extends AEBaseContainer implements I
private final IAEStackInventory configItems;
public final AEStackInventorySyncHandler configItemsSlots;

public final BooleanSyncHandler fullStockModeSync;

@SideOnly(Side.CLIENT)
private GuiFCImgButton modeButton;

public ContainerSuperStockReplenisher(InventoryPlayer ipl, TileSuperStockReplenisher tile) {
super(ipl, tile);
this.tile = tile;
Expand All @@ -54,6 +63,11 @@ public ContainerSuperStockReplenisher(InventoryPlayer ipl, TileSuperStockRepleni
final SyncManager sm = this.getSyncManager();
this.configFluidsSlots = sm.root().aeStackInventory("fluidConfig", this.configFluids);
this.configItemsSlots = sm.root().aeStackInventory("itemConfig", this.configItems);
this.fullStockModeSync = sm.root().booleanSync("fullstockMode").onClientChange((oldValue, newValue) -> {
if (this.modeButton != null) {
this.modeButton.set(newValue ? "fullstockMode" : "normalMode");
}
}).onServerChange((oldValue, newValue) -> this.tile.setFullStockMode(newValue));

this.addSlotToContainer(
new SlotRestrictedInput(
Expand All @@ -67,6 +81,11 @@ public ContainerSuperStockReplenisher(InventoryPlayer ipl, TileSuperStockRepleni
bindPlayerInventory(ipl, 0, 251 - 82);
}

@SideOnly(Side.CLIENT)
public void setModeButton(GuiFCImgButton button) {
this.modeButton = button;
}

@Override
public ItemStack slotClick(int slotId, int clickedButton, int mode, EntityPlayer player) {
if (slotId == 0 && player.inventory.getItemStack() == null && isConfigurated()) return null;
Expand Down Expand Up @@ -95,6 +114,9 @@ public void detectAndSendChanges() {
FluidCraft.proxy.netHandler.sendTo(new SPacketSuperStockReplenisherUpdate(tmp), (EntityPlayerMP) g);
}
}

if (Platform.isServer()) this.setFullStockMode(this.tile.isFullStockMode());

}

this.lastUpdated++;
Expand Down Expand Up @@ -158,4 +180,20 @@ public void updateVirtualSlot(StorageName invName, int slotId, IAEStack<?> aes)
}
}
}

public TileSuperStockReplenisher getTile() {
return this.tile;
}

public boolean isFullStockMode() {
return this.fullStockModeSync.get();
}

public void setFullStockMode(final boolean fullStockMode) {
this.fullStockModeSync.set(fullStockMode);
}

public void markDirty() {
this.fullStockModeSync.markDirty();
}
}
Loading
Loading