aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorminecraft7771 <maxim235@gmx.de>2023-03-20 23:34:51 +0100
committerminecraft7771 <maxim235@gmx.de>2023-03-20 23:34:51 +0100
commit32444bb52ccaf3004c91e133319d7f415d54e04c (patch)
treef0bf56e1a7f614c5517ec57d3637e14295b01441
parent5ac0f6021097254979cd75951dd7b6082283bc2d (diff)
downloadGT5-Unofficial-32444bb52ccaf3004c91e133319d7f415d54e04c.tar.gz
GT5-Unofficial-32444bb52ccaf3004c91e133319d7f415d54e04c.tar.bz2
GT5-Unofficial-32444bb52ccaf3004c91e133319d7f415d54e04c.zip
Override inventory stack limit
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java
index fcd3da2425..5fd10633f4 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java
@@ -51,6 +51,7 @@ import com.gtnewhorizons.modularui.api.math.Pos2d;
import com.gtnewhorizons.modularui.api.screen.ModularWindow;
import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
import com.gtnewhorizons.modularui.api.widget.Widget;
+import com.gtnewhorizons.modularui.common.internal.wrapper.BaseSlot;
import com.gtnewhorizons.modularui.common.widget.*;
import com.gtnewhorizons.modularui.common.widget.textfield.TextFieldWidget;
@@ -2833,7 +2834,13 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM
new DrawableWidget().setDrawable(TecTechUITextures.BACKGROUND_SCREEN_BLUE_NO_INVENTORY).setPos(4, 4)
.setSize(190, 171));
}
- final SlotWidget inventorySlot = new SlotWidget(inventoryHandler, 1);
+ final SlotWidget inventorySlot = new SlotWidget(new BaseSlot(inventoryHandler, 1) {
+
+ @Override
+ public int getSlotStackLimit() {
+ return getInventoryStackLimit();
+ }
+ });
if (doesBindPlayerInventory()) {
builder.widget(
inventorySlot.setBackground(getGUITextureSet().getItemSlot(), TecTechUITextures.OVERLAY_SLOT_MESH)