Jump to content

Recommended Posts

Posted (edited)

I've been looking around in the classes Difficulty and DifficultyInstance. I'm wondering how can I create a new constant to put with the others like easy,normal,hard mode setting? In other words can I make a new difficulty setting called Insane. Is there any documentation I can read about this? any mods I can look at? Or can someone give me a helping hand to get this to work?

Edited by ImperialDragon99
Posted

Threads Merged.

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted (edited)
  On 9/29/2019 at 11:02 AM, diesieben07 said:

You have to do a lot of hacks to make this work.

You basically have to use the events in GuiScreenEvent (InitGuiEvent.Post for the initial setup and MouseClickedEvent.Pre to hijack the clicking of the button) to modify the difficultyButton in OptionsScreen so that it also displays your difficulty and performs the appropriate action if it's selected (send a custom packet to the server). You then have to store if your difficulty is enabled in the world (using capabilities) and then use events, etc. to make it do what you want.

Expand  

Do you know what they renamed GuiButton, GuiOptions too? Also is there an easy way to figure out what the new class names are? Do you know what button id the difficulty is or is there an easy way for me to check. Last thing could you be more specific on how to do this i'm very confused.

Edited by ImperialDragon99

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.