Jump to content

Recommended Posts

Posted (edited)

I think I saw this somewhere here on the forums but I can't seem to find it via any search (unless I'm just missing it). I'm looking to create my own rarities and I vaugly remember seeing that there is a built in EnumHelper or something like that? Is that was would need to be needed and placed into a class that extends the EnumRarities? Becasue I don't think you can just override the existing rarities right? 

Edited by HalestormXV
Posted
5 hours ago, diesieben07 said:

What for? What are you trying to achieve?

 I think he's trying to give Items a rarity and than base the drop of this Items on the rarity of the item itself.

 

Like, think that we put a LivingDropEvent on Zombie and say it can drop "Rusty sword [common]", "Elite sword [Rare]", "Creator's sword [Legendary]". You will have only one sword dropped by every single Zombie, the rusty will be the more common up to the rarest "Creator's sword".

Posted
3 hours ago, IlTosaerba said:

My bad, I miss the part of the EnumRarities

It is used for weighed loot probabilities. e.g. fishing, dungeon chests, etc.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
1 hour ago, Draco18s said:

It is used for weighed loot probabilities. e.g. fishing, dungeon chests, etc.

Oh, cool, so I was half right, after all. Can I use it also as random Entity (mobs) drops?

Posted
2 hours ago, HalestormXV said:

Mainly I want to use it for the color and loot. It's really just a simple use and I'm curious about it. (I know you can change color of items via lang file)

Create your own enum.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
9 hours ago, diesieben07 said:

No, it is not. Literally all EnumRarity is used for is Item::getRarity which sets the color of the name in the item stack tooltip. This color can be set to whatever you want using addInformation. There is no need to fiddle around with EnumHelper.

I must have been thinking of something else.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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.