A way to check if the world is hardcore or not?

Started by ItzDaSnowyBoi on

Topic category: Help with modding (Java Edition)

Last seen on 10:27, 15. May 2023
Joined Apr 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
A way to check if the world is hardcore or not?

as the title says itself is there a way to check if the world has hardcore mode enabled or not? I want to make a hardcore mode-specific item but I'm having trouble figuring out how I would do this, I'm open to suggestions too if anyone has any.

Last seen on 01:37, 22. Apr 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Not sure if this is possible…
Thu, 04/13/2023 - 19:30

Not sure if this is possible, since there is a block that does check the difficulty in the given world, but it only checks for peaceful, easy, normal, and hard mode. Don't know if this helps, but you might be able to lock the procedure doing the check, and change the code to check if the mode is hardcore like this:

For under the block that checks the difficulty, put your stuff here or something like that

 

 

 

 

Then you can lock the procedure and edit this line from "HARD" to "HARDCORE"

Hope this somewhat works, because I'm not sure if this will work