-
Notifications
You must be signed in to change notification settings - Fork 204
Port Multiblocks to MUI2 #2672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port Multiblocks to MUI2 #2672
Conversation
55fefcd to
4dad110
Compare
6b5159d to
87fdbca
Compare
2b804a0 to
0dfce00
Compare
622b1f6 to
277c8ee
Compare
2978280 to
1c82647
Compare
src/main/java/gregtech/api/metatileentity/multiblock/ui/MultiblockUIBuilder.java
Show resolved
Hide resolved
src/main/java/gregtech/api/metatileentity/multiblock/ui/MultiblockUIFactory.java
Outdated
Show resolved
Hide resolved
src/main/java/gregtech/api/metatileentity/multiblock/ui/MultiblockUIBuilder.java
Outdated
Show resolved
Hide resolved
src/main/java/gregtech/api/metatileentity/multiblock/ui/MultiblockUIBuilder.java
Outdated
Show resolved
Hide resolved
src/main/java/gregtech/api/metatileentity/multiblock/MultiblockWithDisplayBase.java
Outdated
Show resolved
Hide resolved
src/main/java/gregtech/common/metatileentities/multi/MetaTileEntityLargeBoiler.java
Outdated
Show resolved
Hide resolved
| * @param maxLines the maximum number of lines to print until truncating with {@code ...} | ||
| */ | ||
| public MultiblockUIBuilder addRecipeOutputLine(AbstractRecipeLogic arl, int maxLines) { | ||
| // todo doing this every tick on the server is probably not good |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we somehow check if the previous recipe is the same as the current one? Or if we are calling this method before the recipe completes?
Since we have the expected recipe duration, we should be able to only call this method after the expected amount of time passes (Would probably need to track that time). Pausing the recipe or low power situations would need to adjust this expected recipe completion time as well.
src/main/java/gregtech/api/metatileentity/multiblock/ui/MultiblockUIBuilder.java
Outdated
Show resolved
Hide resolved
src/main/java/gregtech/api/metatileentity/multiblock/ui/MultiblockUIBuilder.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got this error when messing around with the LBB,
[19:55:11] [Client thread/INFO] [modularui]: unit WIDTH of widget Flow was already used and will be overwritten with unit RIGHT. Was messing with the throttle screen, adding in large numbers, and negative numbers, trying to break it. Actually, I think this happens when mousing over the bars displayed at the bottom of some multiblocks.
If you add letters to the throttle adjuster in the LBB, it will spit out an error into the log, which is a bit overkill in my opinion. https://pastebin.com/GhSeRQd7
For some reason, the syntax checker didn't error on the letter a though.
Since you changed the multiblock button textures to overlays, any buttons that have no functionality are now no longer automatically depressed.
Running a recipe in the PA caused the display to start showing all possible texts, see discord for video.
This was what showed up in the logs https://pastebin.com/QritzP9H
I noticed that the large boilers are not formed in JEI, not sure if that is because of this PR or not.
The coke oven should use the primitive theme, and actually needs to be ported.
The primitive theme in the PBF feels a little brighter to me than it was before, but maybe this is just me going insane. I would prefer it a little dimmer if possible, but I am not sure if it is different at all than on master.
Would be cool if the logo was used for warnings about different recipe start failure conditions, eg, not high enough voltage, no fluid input, etc.
Something is wrong with the chanced outputs display, see discord for the implosion compressor video, but it is showing 2500/s. The recipe is actually 25% chance at 1 item per second (base time, not counting overclocks, which I was doing)
Having an issue running the recipe Enderpearl dust + dynamite in implosion compressor.
Same issue with a recipe in the pyrolyse. These are newly constructed multiblock structures, so something with the previous recipe cache might be going wrong.
In the display of an invalid structure, the GT Logo should be red, not the normal blue.
In the Fusion Reactor GUI, for some reason the tooltip for the ECE is moved really far to the left. Doesn't happen when not in the GUI

Fusion Reactor doesn't have the 2 bottom bars still (One for energy stored, one for heat)
src/main/java/gregtech/common/metatileentities/multi/MetaTileEntityLargeBoiler.java
Show resolved
Hide resolved
...ch/common/metatileentities/multi/electric/generator/MetaTileEntityLargeCombustionEngine.java
Show resolved
Hide resolved
src/main/java/gregtech/common/metatileentities/multi/electric/MetaTileEntityPyrolyseOven.java
Show resolved
Hide resolved
src/main/java/gregtech/common/metatileentities/multi/electric/MetaTileEntityMultiSmelter.java
Outdated
Show resolved
Hide resolved
src/main/java/gregtech/common/metatileentities/multi/electric/MetaTileEntityMultiSmelter.java
Outdated
Show resolved
Hide resolved
this is from MUI2. i don't know where it's being caused but it happens for every multiblock.
i assume you mean "pressed" as in "selected/activated". this is fixed now.
attempting to cache the recipe in the builder was causing the problem. i removed it and it works now, thought i'll revisit this later.
the chance was being passed into the parameter for count, and vice versa. it was also being divided by zero if no recipes were being run.
these recipes run for me
this is a MUI2 issue present in all UIs using the "next to mouse" option for tooltips |
this is from mui2's default math parser for text field widgets, i've replaced it with a custom validator so it doesn't log an error |
|
Server crash opening the GUI of a Processing Array on a server https://pastebin.com/Zb8nfMnU |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The power button in the multiblock GUI has the default button sound now, rather than the custom sound that it had before
I am having issues getting the Fusion Reactor to run, can you get it to run recipe correctly?
The recipe outputs is not applied to the Research Station. You could maybe add on the output to the Researching line that comes up when the RS is running.
The tooltips in the HPCA GUI diagram are not correct. It it showing 0s for all parts, even parts that provide computation and cooling.

Probably not related to this PR, but the auto build on the Active Transformer builds an invalid structure.
src/main/java/gregtech/common/metatileentities/multi/MetaTileEntityCokeOven.java
Outdated
Show resolved
Hide resolved
src/main/java/gregtech/common/metatileentities/multi/MetaTileEntityCokeOven.java
Outdated
Show resolved
Hide resolved
src/main/java/gregtech/common/metatileentities/multi/MetaTileEntityMultiblockTank.java
Show resolved
Hide resolved
i was not aware the power button had a unique sound. (this is what happens when i haven't played gt in forever)
i am also not able to run a fusion reactor recipe, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Tooltips in the HPCA are still wrong. In an HPCA with 8 basic coolers, and 1 advanced Computation Unit, it is displaying that there is 4L of coolant required, which is false. The PCB Coolant is only for the active coolers, which there are none of in the structure.
Also, is the tooltip supposed to display the total stats when hovering over the diagram in the middle, or the individual stats of each block when hovering over each block in the diagram in the middle?
The Distillation Tower might need to be special cased for the recipe outputs, as you can build a Distillation Tower without a fluid output hatch on a layer, and it will auto void that fluid output corresponding to that layer. Since this is the case, do we even show the output that is auto voided in the recipe outputs? It might be a bit confusing for it to show up, when it is being purposely voided. However, voided fluid or item outputs still show in the list when using the voiding mode button, so showing it in the Distillation Tower is consistent. Not sure what the best thing to do here would be.
After completing a research in the Research Station, the Researching xxx text in not removed from the GUI
When there is a GUI with a scrollbar, the scrollbar overlaps the Gregtech logo a little bit in one of the corners, which doesn't really look that good in my opinion. Not sure what we can do about it though, because moving the logo gets it out of line with the 3 buttons, and I am not sure if we can move the scrollbar.
The warning text is not displaying for some reason in the Extreme Combusion Engine. I have an IV Dynamo hatch, the controller says it is producing LuV voltage, but the warning is not coming up that the dynamo tier is too low. So either the amount being produced is incorrect, or the warning is being swallowed somewhere.
Something is off with the Combustion Engines on this branch. On master, they keep running when the dynamo hatch is full, but on this branch they stop, but keep displaying that they are working. So I think something is not synced correctly somewhere.
| this.internal.clear(); | ||
| clear(); | ||
| onRebuild(); | ||
| runAction(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this just be markDirty(), since all this is called if the structure is dirty during build? Or does this not guarantee that build will be called?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this actually used to be markDirty(), but it causes problems when using the builder in tooltips since they only "build" when they are hovered. so i just ensure that the builder is rebuilt on sync instead of waiting
...main/java/gregtech/common/metatileentities/multi/electric/MetaTileEntityResearchStation.java
Outdated
Show resolved
Hide resolved
| public MultiblockUIBuilder addEnergyUsageLine(IEnergyContainer energyContainer) { | ||
| if (!isStructureFormed || energyContainer == null) return this; | ||
| boolean hasEnergy = getSyncer().syncBoolean(energyContainer.getEnergyCapacity() > 0); | ||
| if (!hasEnergy) return this; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure when this would ever happen, but do we want to add a special warning text just in case? Something like "Energy Hatch does not provide any energy capacity."
src/main/java/gregtech/api/metatileentity/multiblock/ui/MultiblockUIBuilder.java
Outdated
Show resolved
Hide resolved
src/main/java/gregtech/api/metatileentity/multiblock/ui/MultiblockUIBuilder.java
Outdated
Show resolved
Hide resolved
src/main/java/gregtech/api/metatileentity/multiblock/ui/MultiblockUIBuilder.java
Show resolved
Hide resolved
src/main/java/gregtech/api/metatileentity/multiblock/ui/MultiblockUIBuilder.java
Show resolved
Hide resolved
...ch/common/metatileentities/multi/electric/generator/MetaTileEntityLargeCombustionEngine.java
Show resolved
Hide resolved
| * Added if the structure is formed, if the amperage is greater than zero and if the max voltage is greater than | ||
| * zero. | ||
| */ | ||
| public MultiblockUIBuilder addEnergyProductionAmpsLine(long maxVoltage, int amperage) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be something other than gray maybe. And instead of being displayed as Max EU/t, it could maybe be Producing...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line shows the max EU/t the multi is capable of producing. Do you think there should be a line for the EU/t the multiblock is producing currently (from the recipe), or change this line fundamentally?
i've decided to keep with master behavior and show the total stats, but showing individual stats would also be possible
master has the same behavior. the listed max eut is for the boosted amount (4A IV) while the actual eut is 1A IV. it shows no warning in the icon, but it does for the oxygen bar tooltip.
the combustion engine is not supposed to produce (and void) power when the dynamo hatch is full. the observed behavior is the same for master and this branch. |
...tech/common/metatileentities/multi/electric/centralmonitor/MetaTileEntityCentralMonitor.java
Outdated
Show resolved
Hide resolved
| controllable = (IControllable) mte; | ||
| } | ||
|
|
||
| var detail = GTGuiTextures.BUTTON_POWER_DETAIL.asIcon().size(18, 6).marginTop(24); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/main/java/gregtech/common/metatileentities/multi/electric/MetaTileEntityCleanroom.java
Outdated
Show resolved
Hide resolved
ALongStringOfNumbers
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The HPCA continues playing its running sound after disabling it with the power button. Same with Network Switch and Data Bank.
…tLocalizedName()`
…f deprecating it, since it is completely unused
wrap voltage name with IKey instead of appending TextFormatting simplify fluid drill's drilled fluid line add todo

What
Ports every multiblock with a UI to use MUI2.
Implementation Details
MultiMapMultiblockControllerwill need to be updated (GCYM) or overrideusesMui2()to return false.KeyUtilsto replaceTextComponantUtilcreateUIFactory()to create needed sync values and return a configuredMultiblockUIFactorycreateUIFactory()is called duringwriteInitialSyncData()andreceiveInitialSyncData()so that values can be synced correctly before the ui is openedCurrently ported multis are:
Outcome
multiblock uis are fancier