mactso / HarderFarther

MIT License
1 stars 1 forks source link

Rare items spawning everywhere with high probability (or always) #4

Closed tharrmeehan closed 2 years ago

tharrmeehan commented 2 years ago

Hello mactso

First of all thanks for this cool mod. I've recently faced an issue, where mobs killed drop their rare loot regardless of distance from world spawn. (This includes the special potions) I'm using the default config (with Grim Citadels temporarily disabled) and I haven't edited anything else. I'm using Forge 40.1.60 and the latest version of your mod.

Steps to reproduce:

  1. Install this mod without any other mod
  2. Create new world
  3. Spawn Zombie (or any other mob)
  4. Kill spawned mob
  5. Mob should drop netherite scraps or something else from the rare drop table

Thanks for your help and kind regards

mactso commented 2 years ago

I think I saw and fixed this in version 19 but I will look at this tomorrow and try to get a fix out if it is still happening.

mactso commented 2 years ago

As a workaround, replace the rare loot items with something more appropriate in the loot table in the configuration file.

mactso commented 2 years ago

Okay, I checked and this should be impossible closer than 95% of the maximum distance so could you 1) Run /harderfarther reportLoot and confirm you have a good loot table. If you upgraded from a prior version, maybe it's wrong somehow. 2) run /harderfarther info and confirm the maximum distance value (30,000 by default).

mactso commented 2 years ago

Going to sleep. Will check for your response tomorrow.

tharrmeehan commented 2 years ago

Problem has been fixed, just deleted the config file. Thanks for your help.

mactso commented 2 years ago

I just duplicated this in production. I think there is a bad entry in the default configuration file.

mactso commented 2 years ago

I used the same fix. I wonder if it was a bad loot table in the prior version. I need to look at the older code in GitHub.

mactso commented 2 years ago

Okay, I've located and fixed the bug. It was happening about .56% of the time. It was essentially an array overflow. I had a bad compare and it was overrunning to the first item on next loot table if it rolled maximum value.

It will be fixed in version 20 shortly.