Skip to content

Conversation

@ghzdude
Copy link
Contributor

@ghzdude ghzdude commented Jul 30, 2024

What

Ports Quantum chests and tanks to MUI2

Implementation Details

quantum/creative tanks/chest now use mui2

Outcome

another step on the road to MUI2

@ghzdude ghzdude added the type: refactor Suggestion to refactor a section of code label Jul 30, 2024
@ghzdude ghzdude force-pushed the gh-port-qstorage-mui2 branch from f7f2760 to 9df4c9c Compare October 26, 2024 18:39
@ghzdude ghzdude force-pushed the gh-port-qstorage-mui2 branch from e59faf0 to e598eea Compare December 28, 2024 02:32
@ghzdude ghzdude force-pushed the gh-port-qstorage-mui2 branch from 231aeeb to fc626a3 Compare January 5, 2025 23:53
@ghzdude ghzdude marked this pull request as ready for review January 6, 2025 00:13
@ghzdude ghzdude requested a review from a team as a code owner January 6, 2025 00:13
@ghzdude ghzdude force-pushed the gh-port-qstorage-mui2 branch from 3faf81d to 978f1eb Compare January 6, 2025 03:37
@ghzdude ghzdude force-pushed the gh-port-qstorage-mui2 branch from 5630c26 to 1fda908 Compare June 23, 2025 02:28
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.

It feels kinda weird to have Item/Fluid Amount and the very top, and then the count at the very bottom. When there is nothing in the chest/tank there is just a big space between them. It might be best to make this into 1 line at the very top, and then display the item/fluid name below

The items displayed in the Quantum Chest don't seem to rotate any more

When taking all fluids from a locked quantum tank, the fluid name is no longer displayed in the GUI, even though the locked fluid remains in the slot in the display.

Did Quantum Storages display in the GUI if they were connected to a quantum network or not before? I am not seeing that now.

In the Creative Chest, I clicked in a stack of items, which did not populate the slot on the first time, only when I clicked again. This is only on first place of the creative chest

add methods to disable automatic io in update
add methods to disable automatic io in update
fix issue with fluid hatch not saving locked fluid
simplify and sync toggle lock fluid
simplify syncing locked fluid
fixed missing fluid name when locked without fluid for qtanks
don't draw fluid slot background
new constants
add todo
@ghzdude
Copy link
Contributor Author

ghzdude commented Oct 22, 2025

The items displayed in the Quantum Chest don't seem to rotate any more

they rotate for me, just very slowly

In the Creative Chest, I clicked in a stack of items, which did not populate the slot on the first time, only when I clicked again. This is only on first place of the creative chest

this should be fixed now, along with the other notes

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.

For some reason, middle clicking in creative copies the contents of the quantum tank to NBT when the item is placed in the players inventory (This is intended), but it does not work with the quantum chest.

return this.creativeHandler;
}

protected class ModifiableHandler extends QuantumChestItemHandler implements IItemHandlerModifiable {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this even needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I need a handler to use for the item slot that is able to insert/extract like a normal handler but with simplified logic
I can't use the creative handler because it doesn't allow inserting stacks
and i can't use the regular quantum item handler because the super class can't "store" items (maxStoredItems = 0)
the old ui just set the stack directly, but that's no longer the case with mui2 as it attempts to insert the item
mui2 rc6 split the phantom item slot into it's own class, instead of being just a different synchandler

@Override
public void setStackInSlot(int slot, ItemStack stack) {
virtualItemStack = GTUtility.copy(1, stack);
itemsStoredInside = stack.isEmpty() ? 0 : 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know if the creative chest would even care about these, since there can only be 1 item in the slot, and it is never storing anything virtualized.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have to update this since it's what is displayed in the item slot

@ghzdude
Copy link
Contributor Author

ghzdude commented Oct 25, 2025

Quantum Tanks writing to NBT with just a middle click is from #2169

However using ctrl-click (vanilla's way of copying TE's nbt to the pick item) is from #2428 and supports anything with the write/read to nbt methods

i could add support to chests like in 2169, but i feel it'd be redundant

edit: moving the getPickItem() method from the quantum tank up into the abstract quantum storage class causes issues with the quantum chest. i don't know why

@ghzdude ghzdude merged commit c622751 into GregTechCEu:master Oct 27, 2025
3 checks passed
@github-project-automation github-project-automation bot moved this from Medium to Done in MUI2 Port Oct 27, 2025
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

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants