Ex Compressum

Ex Compressum

22M Downloads

Heavy Sieve short changing player with Compressed Blocks?

Opened this issue ยท 2 comments

commented

Forge 36.0.58
ExCompressum_1.16.5-4.0.2
exnihilosequentia-1.16-2.0.2.3

So 1 dirt block is set to 100% chance of 2 pebbles when used in a normal sieve (exnihilosequentia)
Therefore 1 compressed dirt in a heavy sieve should be 9 dirt x 2 pebbles = 18 pebbles returned?

It does not. anywhere between 1 and 5 pebbles get returned with a heavySieveDefaultRolls = 10 value

I may be very wrong but thats what I would expect?

commented

I think the problem lies in HeavySieveRegistry.rollSieveRewards(...) at
https://github.com/blay09/ExCompressum/blob/b89548ec2e55e1d6272971e741702649f2c5168b/src/main/java/net/blay09/mods/excompressum/registry/heavysieve/HeavySieveRegistry.java#L48
When a heavy sieve generates drops, it builds a loot table (in fact two different loot tables) to determine the output. This means that for each roll only at most one output is generated (the probabilities for the various possible outputs are scaled by their total sum).
You can check this experimentally by creating a new sievable material which has two outputs with 100% drop each. If a stack of this material is sieved through a normal sieve, you get a stack of each drop as expected. If a stack of this is sieved through a heavy sieve, you get a total of heavySieveDefaultRolls (as set in the config) stacks, but split roughly half between each material.
A solution could be to just simulate the normal sieving heavySieveDefaultRolls number of times, i.e. call ExNihilo.rollSieveRewards(...) the appropriate number of times and adding the rewards together.
This probably will change the signature of the function HeavySieveRegistry.rollSieveRewards(...) and thus the two (?) places where it is called need to change as well.

commented

lol was about to post a new issues and seen this here the heavy sieve rolls are really borked

heavy sieve full stack of gravel

2021-04-26_19 00 45

normal sieve 5 stacks of gravel

2021-04-26_19 00 52

test ran multiple times to account for %