Skip to content

Add switching cheat mode when clicking EMI button with ctrl#1091

Open
Taskeren wants to merge 1 commit intoemilyploszaj:1.21from
Taskeren:1.21-dev/quick-cheat-mode
Open

Add switching cheat mode when clicking EMI button with ctrl#1091
Taskeren wants to merge 1 commit intoemilyploszaj:1.21from
Taskeren:1.21-dev/quick-cheat-mode

Conversation

@Taskeren
Copy link

@Taskeren Taskeren commented Dec 9, 2025

Like JEI, when click the EMI button with ctrl pressed, it toggles the cheat mode.
I don't if I need to do something to trigger config save or something after changing the value.

And I'm sorry that my code formatter is much different to the existing style, so I'll leave it unformatted.

#263

@Taskeren
Copy link
Author

Taskeren commented Dec 9, 2025

I also want to make the button looks different depending on whether cheat mode is on or not.
But couldn't find how EMI render the text. Much appreciate if somebody can help!

@emilyploszaj
Copy link
Owner

Please do best effort to match code style in the repo and use existing utilities for keys instead of vanilla options, additionally, this doesn't handle all of the config values nor explain the behavior. Should this be the only config option that can be quick swapped in EMI by pressing the config button? EMI is not aiming to be JEI, so just because that mod does something is not justification here.

@Taskeren
Copy link
Author

Please do best effort to match code style in the repo and use existing utilities for keys instead of vanilla options, additionally, this doesn't handle all of the config values nor explain the behavior. Should this be the only config option that can be quick swapped in EMI by pressing the config button? EMI is not aiming to be JEI, so just because that mod does something is not justification here.

it's a shortcut way to swap cheat mode value, but the option now has more than 2 values, which I don't have a good idea to handle this. So I'd consider CREATIVE as a default value, and once player has used this feature, we only swap it in TRUE and FALSE.

the reason I want it in EMI is for use cases that players like me, who don't want to fully non-cheating in the game, want to grab something out from EMI during the gameplay. In this case, I would stay in survival mode, so the CREATIVE doesn't work, and changing the value in the config screen is much troublesome imo.

@Taskeren
Copy link
Author

And I'm not sure if I missed it, I don't see a util for checking if Control is down. Can you tell me where it is?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants