Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spawn eggs, potions, etc. are way too rare #27

Open
Seeloewen opened this issue Jun 20, 2024 · 2 comments
Open

Spawn eggs, potions, etc. are way too rare #27

Seeloewen opened this issue Jun 20, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request Needs investigation Issues that have to be confirmed or further checked

Comments

@Seeloewen
Copy link
Owner

With an update a few years ago, stuff like potions, enchanted books and so on was moved into it's own loot table. This was made to combat those items appearing way to often. This worked fine in the past, however with the recently increasing amount of items they've gotten too rare and the chances need to be increased.

@Seeloewen Seeloewen added the enhancement New feature or request label Jun 20, 2024
@Seeloewen Seeloewen self-assigned this Jun 20, 2024
@Seeloewen Seeloewen added this to the Version 1.5.0 milestone Jun 21, 2024
@Seeloewen
Copy link
Owner Author

I've increased the chances for special loot tables by 7 times in the latest release 1.5.0. This sounds like a lot, but you still only get a few special items every 30-40 items. I will keep an eye on the changes and adapt them if necessary.

@Seeloewen Seeloewen added the Needs investigation Issues that have to be confirmed or further checked label Jun 21, 2024
@Seeloewen
Copy link
Owner Author

As requested by a user, I did the math for the chances for specific items:

First, it selects a random number between 1 and 1100. This number corresponds to a type of item:

1 to 7 are enchanted books
8 to 15 are potions
16 to 23 are lingering potions
24 to 31 are splash potions
32 to 39 are tipped arrows
40 to 47 are suspicious stews
48 to 55 are goat horns
56 to 63 are paintings
64 to 71 are command blocks
72 to 79 are spawn eggs
80 to 89 are other creative-only items
90 to 1100 are all other normal items

After the type was rolled, it rolls a number again, depending on the amount of items in the previously rolled group (loot table). This depends on the amount of items in the loot table.

To use a creeper spawn egg as an example, the chance for getting a spawn egg in general is 8/1100 and the chance for getting a creeper spawn egg in that loot table is 1/77, so the chance for getting a creeper spawn egg is (8/1000) * (1/77) which is approximately 0.00009 or 0.009%.
For comparison, the chances for a normal item, for example a cobblestone is 90/1100 * 1/1126 which is approximately 0.00007 or 0.007%, so you see they are pretty close.

As you can see, the chances float around 0.008% which would be a chance that I could target for all items. I'd have to do the math though to get all items to approximately that chance though. Shouldn't be too hard.

@Seeloewen Seeloewen removed this from the Version 1.5.0 milestone Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Needs investigation Issues that have to be confirmed or further checked
Projects
Development

No branches or pull requests

1 participant