Skip to content

[MUI] Conveyor and Simple Filter#4128

Merged
jurrejelle merged 18 commits into
mui2-refactorfrom
kath/mui/filters
Feb 6, 2026
Merged

[MUI] Conveyor and Simple Filter#4128
jurrejelle merged 18 commits into
mui2-refactorfrom
kath/mui/filters

Conversation

@Spicierspace153

@Spicierspace153 Spicierspace153 commented Oct 27, 2025

Copy link
Copy Markdown
Contributor

Simple fitler is done, needs further refinement but works functionally so just need to fix jank (like panel autoclosing / shape in e.g. conveyor), but we can already merge this into the cover PR after and finish those up

@Spicierspace153
Spicierspace153 changed the base branch from 1.20.1 to mui2-refactor October 27, 2025 06:55
@Spicierspace153
Spicierspace153 changed the base branch from mui2-refactor to yo/cover-works October 27, 2025 06:56
@Spicierspace153
Spicierspace153 changed the base branch from yo/cover-works to yo/mui2/covers-p2 October 27, 2025 06:56
@github-actions github-actions Bot added the Tests: Passed Game Tests have passed on this PR label Oct 28, 2025
@jurrejelle
jurrejelle changed the base branch from yo/mui2/covers-p2 to mui2-refactor November 28, 2025 22:30
@jurrejelle
jurrejelle marked this pull request as ready for review November 28, 2025 23:00
@jurrejelle
jurrejelle requested a review from a team as a code owner November 28, 2025 23:00
@gustovafing gustovafing changed the title Mui filters [MUI] Filters Dec 3, 2025
@TarLaboratories TarLaboratories mentioned this pull request Dec 22, 2025
…ch-Modern into kath/mui/filters

# Conflicts:
#	src/main/java/com/gregtechceu/gtceu/api/cover/IMuiCover.java
#	src/main/java/com/gregtechceu/gtceu/api/cover/filter/SimpleItemFilter.java
#	src/main/java/com/gregtechceu/gtceu/api/cover/filter/SmartItemFilter.java
#	src/main/java/com/gregtechceu/gtceu/api/item/ComponentItem.java
#	src/main/java/com/gregtechceu/gtceu/common/cover/ConveyorCover.java
#	src/main/java/com/gregtechceu/gtceu/common/cover/MachineControllerCover.java
#	src/main/java/com/gregtechceu/gtceu/common/cover/voiding/ItemVoidingCover.java
@YoungOnionMC YoungOnionMC changed the title [MUI] Filters [MUI] Conveyor and Simple Filter Feb 6, 2026
Comment thread src/main/java/com/gregtechceu/gtceu/api/cover/filter/Filter.java Outdated
handler.setStackInSlot(i, stack);
}).ignoreMaxStackSize(true).accessibility(true, false))));

return new Dialog<>("simple_item_filter")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should have a hash of the current data of some sort, so you can open two dialogs of two different item filters at the same time

Comment on lines +581 to +622
/*
* @Override
* public Widget createUIWidget() {
* final var group = new WidgetGroup(0, 0, 176, 137);
* group.addWidget(new LabelWidget(10, 5, Component.translatable(getUITitle(), GTValues.VN[tier]).getString()));
*
* group.addWidget(new IntInputWidget(10, 20, 156, 20, () -> this.transferRate, this::setTransferRate)
* .setMin(1).setMax(maxItemTransferRate));
*
* final EnumSelectorWidget<DistributionMode> distributionSelector = new EnumSelectorWidget<>(146, 67, 20, 20,
* DistributionMode.values(), distributionMode, this::setDistributionMode);
*
* distributionSelector.setVisible(shouldRespectDistributionMode());
* group.addWidget(distributionSelector);
*
* ioModeSwitch = new SwitchWidget(10, 45, 20, 20,
* (clickData, value) -> {
* setIo(value ? IO.IN : IO.OUT);
* distributionSelector.setVisible(shouldRespectDistributionMode());
* ioModeSwitch.setHoverTooltips(
* LocalizationUtils.format("cover.conveyor.mode", LocalizationUtils.format(io.tooltip)));
* })
* .setTexture(
* new GuiTextureGroup(GuiTextures.VANILLA_BUTTON, IO.OUT.icon),
* new GuiTextureGroup(GuiTextures.VANILLA_BUTTON, IO.IN.icon))
* .setPressed(io == IO.IN)
* .setHoverTooltips(
* LocalizationUtils.format("cover.conveyor.mode", LocalizationUtils.format(io.tooltip)));
* group.addWidget(ioModeSwitch);
*
* group.addWidget(new EnumSelectorWidget<>(146, 107, 20, 20,
* ManualIOMode.VALUES, manualIOMode, this::setManualIOMode)
* .setHoverTooltips("cover.universal.manual_import_export.mode.description"));
*
* group.addWidget(filterHandler.createFilterSlotUI(125, 108));
* group.addWidget(filterHandler.createFilterConfigUI(10, 72, 156, 60));
*
* buildAdditionalUI(group);
*
* return group;
* }
*/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we delete this?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no

Comment thread src/main/java/com/gregtechceu/gtceu/common/item/ItemFilterBehaviour.java Outdated
Comment on lines +46 to +54
// @Override
// public ModularUI createUI(HeldItemUIFactory.HeldItemHolder holder, Player entityPlayer) {
// var held = holder.getHeld();
// return new ModularUI(176, 157, holder, entityPlayer)
// .background(GuiTextures.BACKGROUND)
// .widget(new LabelWidget(5, 5, held.getDescriptionId()))
// .widget(ItemFilter.loadFilter(held).openConfigurator((176 - 80) / 2, (60 - 55) / 2 + 15))
// .widget(UITemplate.bindPlayerInventory(entityPlayer.getInventory(), GuiTextures.SLOT, 7, 75, true));
// }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be deleted?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not yet no

@jurrejelle
jurrejelle merged commit 6c3ef94 into mui2-refactor Feb 6, 2026
4 checks passed
@jurrejelle
jurrejelle deleted the kath/mui/filters branch February 6, 2026 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.20.1 Tests: Passed Game Tests have passed on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants