Jump to content

How to make enums interpolate/interchange via a press of a "next" button in a gui


TheRPGAdventurer

Recommended Posts

This problem is more related to java than minecraft itself. SO i made a dragon wand item that when a dragon is right clicked with it it opens a secondary inventory and gui, then you can edit its gender, breed, skin, owner etc. my problem is that the breed characteristic is on enum and how do interchange it, interchanging the breed also interchanges the dragon's skin texture.

 

GuiDragonWand: https://pastebin.com/Ewa3ybS0

EnumDragonBreed: https://pastebin.com/eCxLDzYs

Edited by TheRPGAdventurer
Link to comment
Share on other sites

33 minutes ago, diesieben07 said:

Okay, first of all, I do not really understand your question. What do you want to be "interpolated" or "interchanged" (the two are very different things, please clarify...)?

 

About your code:

This makes no sense. values is a static method, why are you calling it on an instance? Your IDE should issue a warning about this, don't just ignore it.

Moreover, values already returns a newly created array, there is no need to clone it. Especially if you never do anything with the resulting copy.

 

You also never assign any value to newBreed, so how this is supposed to do anything in the first place is beyond me.

Something like this, if i click gender the values change from male to female "interchange" is the right word?

now i want to do this in breed, if i press next it will change to the next breed and the next one and the next one and the skins already change on its own with its breed.

 

About my code:

I dont know what to put in there to get your attention,

2018-11-03_16.17.41.png

Edited by TheRPGAdventurer
Link to comment
Share on other sites

Just now, TheRPGAdventurer said:

btw everytime when i press a method from java packages the source wont show up and keep asking me for a source

You can attach the source by going to where you installed your jdk and attaching the src.zip file.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

On 11/3/2018 at 3:30 PM, TheRPGAdventurer said:

btw everytime when i press a method from java packages the source wont show up and keep asking me for a source

I've run into this problem before, for me, it happens when I have multiple version's of java (like jdk10 and jdk8). 

The source should be in your jdk8 folder.

So, what I do is change the workspace jdk to the one in the folder.

 

Btw sorry for the images being so big... I don't know how to change the size of them

 

Go to the Properties of the JRE System Library

Spoiler

image.png.f637c4b0e789f9a739e7c4738d0450bd.png

 

 

Then go to Installed JREs... (btw it says jre-10.0.2 for example) 

Spoiler

image.png.7c393b198e486c736f9e7ec4fa6559eb.png

 

 

 

 

I use "duplicate", but "edit" is an option

Spoiler

image.png.b37bf54c789f82529cd620a9b29496b9.png

 

 

 

Now click "directory", and find your java jdk8 

Spoiler

image.png.494b1b1bb8c6a5d7bd999936c1c312d2.png

 

 

 

DO NOT SELECT THE "BIN" FOLDER,

Spoiler

image.png.af30a7ba48dd97b14ee58e5a4d46600b.png

 

Finally, name it something and check it for that workspace

Spoiler

image.png.9ccefda2aa14f4d966eb224c0559a559.png

 

 

Don't forget to set it as your jre/jdk.

That should work, as for your other problem.  It's way over my head.

 

If it didn't fix it, sorry for wasting your time.

 

Edited by DWDev
Better explanation
Link to comment
Share on other sites

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Link to comment
Share on other sites

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.