-
Notifications
You must be signed in to change notification settings - Fork 205
Port more miscellaneous blocks to MUI2 #2835
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
base: master
Are you sure you want to change the base?
Conversation
…tuff not working in multiplayer
…loc so it matches other MTEs
feat: item collects can have their auto output port toggled
# Conflicts: # src/main/java/gregtech/common/covers/filter/BaseFilterContainer.java # src/main/java/gregtech/common/metatileentities/electric/MetaTileEntityItemCollector.java
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.
It would be nice if the creative energy block saved the voltage and the amperage it was set at when the player switches from source -> sink -> back to source.
If the Alarm is powered and active with a redstone signal, opening the GUI will restart the sound loop when it probably shouldn't.
Something seems wrong with maintenance on multiblocks. If I have a controller with three problems, break the controller, place down a new one quickly, it will still have 3 problems, instead of all of them from being a new controller.
src/main/java/gregtech/common/metatileentities/storage/MetaTileEntityCreativeEnergy.java
Show resolved
Hide resolved
| .child(new ButtonWidget<>() | ||
| .size(18) | ||
| .onMousePressed(mouse -> { | ||
| guiData.getPlayer().playSound(selectedSound, 1.0f, 1.0f); |
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 should not play a sound if a sound is already playing. Alternatively cancel the playing sound and start a new one. Also, since it is a preview, I think the sound should cancel if the GUI is closed. Just in case a really long sound is used.
|
|
||
| public void setRadius(int radius) { | ||
| this.radius = radius; | ||
| GregTechAPI.soundManager.stopTileSound(getPos()); |
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.
Does this need to send custom data to update right away?
...ava/gregtech/common/metatileentities/multi/multiblockpart/MetaTileEntityDataAccessHatch.java
Show resolved
Hide resolved
| Int2ObjectMap.Entry<String> entry = findMatchingClass(toolEntries, | ||
| toolStack.getItem().getToolClasses(toolStack)); | ||
| if (entry != null) { | ||
| ToolHelper.damageItemWhenCrafting(toolStack, player); |
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 should play the tool sounds that are used to fix the maintenance issues, so the player knows that something happened. Although if we are fixing multiple issues at one time, it might be best to only play the sound of the first tool.
That is intended. Multiblocks store their maintenance state when unforming GregTech/src/main/java/gregtech/api/metatileentity/multiblock/MultiblockWithDisplayBase.java Line 287 in 875d79a
and read it back when forming. GregTech/src/main/java/gregtech/api/metatileentity/multiblock/MultiblockWithDisplayBase.java Line 190 in 875d79a
|
What
Ports the following blocks to MUI2.
Additional Information
MetaTileEntityAlarm#addSound.IMetaTileEntityGuiHolder. The actual opening of the UI is handled inMetaTileEntity, so implementingbuildUIis all that it required for implementers.Outcome
Knocks more things off of the migration list and improve how MUI GUIs are handled.