Skip to content

Commit

Permalink
remove PhantomItemSlot.java, it's not necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
ghzdude committed Jan 22, 2024
1 parent 01df244 commit f5d0798
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 34 deletions.
32 changes: 0 additions & 32 deletions src/main/java/gregtech/api/mui/slot/PhantomItemSlot.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import gregtech.api.gui.widgets.ToggleButtonWidget;
import gregtech.api.mui.GTGuiTextures;
import gregtech.api.mui.GTGuis;
import gregtech.api.mui.slot.PhantomItemSlot;
import gregtech.api.util.TextFormattingUtil;

import net.minecraft.item.ItemStack;
Expand All @@ -19,6 +18,7 @@
import com.cleanroommc.modularui.utils.Color;
import com.cleanroommc.modularui.value.sync.BooleanSyncValue;
import com.cleanroommc.modularui.value.sync.GuiSyncManager;
import com.cleanroommc.modularui.value.sync.SyncHandlers;
import com.cleanroommc.modularui.widget.Widget;
import com.cleanroommc.modularui.widgets.CycleButtonWidget;
import com.cleanroommc.modularui.widgets.ItemSlot;
Expand Down Expand Up @@ -90,6 +90,7 @@ public void initUI(Consumer<gregtech.api.gui.Widget> widgetGroup) {
return GTGuis.createPanel("simple_item_filter", 176, 166);
}

@SuppressWarnings("UnstableApiUsage")
@Override
public @NotNull Widget<?> createWidgets(GuiSyncManager syncManager) {
SlotGroup filterInventory = new SlotGroup("filter_inv", 3, 1000, true);
Expand Down Expand Up @@ -117,7 +118,8 @@ public void initUI(Consumer<gregtech.api.gui.Widget> widgetGroup) {
tooltip.addLine(
IKey.format("Count: %s", TextFormattingUtil.formatNumbers(count)));
})
.slot(new PhantomItemSlot(this.filterReader, index, this::getMaxTransferSize)
.slot(SyncHandlers.phantomItemSlot(this.filterReader, index)
.ignoreMaxStackSize(true)
.slotGroup(filterInventory)
.changeListener((newItem, onlyAmountChanged, client, init) -> {
if (onlyAmountChanged && !init) {
Expand Down

0 comments on commit f5d0798

Please sign in to comment.