Skip to content

Conversation

@Zorbatron
Copy link
Member

@Zorbatron Zorbatron commented Jun 11, 2025

What

  • Ports all of the ME buses and hatches to use MUI2.
  • ME outputs can buffer 2^63 - 1 of a stack per slot now.
  • Adds a variable refresh rate to all ME parts (no way to change for the output parts, will be when I port then to MUI2).
  • Adds a minimum stack size filter to the stocking input parts.
  • Refactors how JEI recipe transfers are handled in GT GUIs, and makes the crafting station only accept crafting table recipes from JEI.
  • You can now set the config of the ME input parts from JEI with the + button.
  • Show if the ME part can connect from all sides in TOP/WAILA.
  • Fix MUI2 clearing popup panel SyncHandlers if the screen is being replaced (like viewing a JEI recipe), instead of only when closing.

Outcome

More MUI2 and makes the ME input parts better.

Additional Information

Closes #2571 and #2482

Zorbatron added 30 commits May 11, 2025 01:10
…g is wacked and the flow is missing from the main panel's children but this is a problem for tomorrow!!
@Zorbatron Zorbatron marked this pull request as ready for review September 20, 2025 02:39
@Zorbatron Zorbatron requested a review from a team as a code owner September 20, 2025 02:39
… opened and then it went offline (unwanted text wrapping)
Copy link
Contributor

@ALongStringOfNumbers ALongStringOfNumbers left a comment

Choose a reason for hiding this comment

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

One thing I noticed is that mod name tooltips are not shown on items/fluids in the ME inputs (Didn't check the outputs)

Should the ME fluid output (Don't know if it happens with items) be able to store fluid inside of it while it is offline?

Thoughts on allowing the item inputs to take an Oredict entry for a slot? Probably would be a bit annoying, but could be nice to have.

Using the Recipe Transfer from JEI allows for transfering pages that most likely should not be possible, like the material tree and the ore processing chart.

The Recipe Transfer Button in our JEI GUIs (specifically machines) does not active a JEI exclusion area, and so somewhat overlaps with items in the search pane. Is that something we can fix, either by moving the button inward, or adding an exclusion area for it?

It would be nice if the shift/control/alt key combos worked for scrolling fluid worked for in the Input Hatch config slots, like in Fluid Regulator when it is in Supply Exact mode. Plus having the scrolling key combo information added to the tooltip.

FluidTooltipUtil.handleFluidTooltip(tooltip, stack);
}));
text.space();
text.addLine(KeyUtil.number(TextFormatting.WHITE, wrappedStack.getStackSize(), "x"));
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be in mB or B or L, rather than x
Also, could we get the fluid name here, so it is seen quicker than hovering?

Copy link
Member Author

Choose a reason for hiding this comment

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

Right now it doesn't have the item/fluid name along with the amount since it looks ugly if the text has to wrap, but I might be able to solve it by making large numbers use scientific notation and wrap the text within the row.

Copy link
Contributor

Choose a reason for hiding this comment

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

you could have the amounts listed below the item name, maybe cut the name if it's too long, i think we have a method for that

.child(IKey.lang("gregtech.machine.me.settings.button")
.asWidget()
.heightRel(1.0f)))
.child(IKey.lang("gregtech.machine.me.settings.refresh_rate")
Copy link
Contributor

Choose a reason for hiding this comment

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

Could this get a time specification? IE ticks, seconds, etc

}
}
case setConfigID -> {
int index = buf.readVarInt();
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we ever need to check if the index is within the number of slots? I see a lot of just blind reading and using the index, and I was wondering if there was a possibility that it would ever be out of bounds of the number of slots.

}

@Override
public IRecipeTransferError receiveRecipe(@NotNull IRecipeLayout recipeLayout, boolean maxTransfer,
Copy link
Contributor

Choose a reason for hiding this comment

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

Using the recipe transfer from JEI clears the existing config to add in the ingredients of the recipe output. In my opinion it would be better to combine the existing config with the input ingredients of the target itemstack. Open to some discussion here.

}

@Override
public IRecipeTransferError receiveRecipe(@NotNull IRecipeLayout recipeLayout, boolean maxTransfer,
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be made to work with fluid containers in a recipe input? EG, our treated wood recipe with a bucket of creosote. Could the recipe transfer take the contained fluid in a fluid handler and then use that?

@Zorbatron
Copy link
Member Author

One thing I noticed is that mod name tooltips are not shown on items/fluids in the ME inputs (Didn't check the outputs)
Fixed and I'm upstreaming my fix to MUI2.

@Zorbatron
Copy link
Member Author

About the ore dict slot, I think it would be better if it was for all slots, so it would auto pull the first 16 items that matched the ore dict. But, that is something that can already be done by creating a subnet with the bus, and having an ore dict storage bus connected to the main network.

Comment on lines +1 to +6
package gregtech.client;

public class IsGuiActuallyClosing {

public static boolean isGuiActuallyClosing;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

what's the purpose of this class and its associated mixin?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

okay, in that case leave a todo here and in the mixin to remove it once our mui2 dep is updated

# Conflicts:
#	.gitignore
#	src/main/java/gregtech/api/mui/GTGuis.java
#	src/main/java/gregtech/api/mui/sync/GTFluidSyncHandler.java
#	src/main/java/gregtech/api/util/FluidTooltipUtil.java
#	src/main/java/gregtech/api/util/JEIUtil.java
#	src/main/java/gregtech/common/gui/widget/appeng/slot/AEItemConfigSlot.java
#	src/main/java/gregtech/common/gui/widget/appeng/slot/AEItemDisplayWidget.java
#	src/main/java/gregtech/common/metatileentities/workbench/CraftingRecipeLogic.java
#	src/main/resources/mixins.gregtech.mui2.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: refactor Suggestion to refactor a section of code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Configure ME buses and hatches via HEI using the [+] button Certain fluid display GUI elements aren't interactable for JEI

5 participants