Mojira Archive
MC-151480

"minecraft:binomial" RNG is broken, game complains about wanting "min"/"max" values, then applies uniform distribution

Modifying a loot table from the normal "min","max","type":"minecraft:uniform" RNG type to any type of "minecraft:binomial" RNG generator causes errors and empty chests (in my case I modified end city chest loot tables then loaded them).

  • Replace "min"/"max" values in any chest's loot table with "n","p" values and "type" set to "minecraft:binomial".
  • Spawn a chest with the loot table
  • It will be empty every time no matter the values

The output logs complain about "min" and "max" being missing, but once they are provided, it looks like it's simply doing uniform distribution. It's as if binomial distribution isn't working at all.

 

Example function:

 

["function": "set_attributes",                            
    "modifiers": [{                                    
        "name": "damage",                                    
        "attribute": "generic.attackDamage",                 
        "operation": "addition",                                    
        "slot": "mainhand",                                    
        "amount": {                                        
            "n": 10,                                        
            "p": 0.1,                                        
            "type": "minecraft:binomial"                                    
        }                                
    }                            
]

 

On the other hand, constants work fine. If "amount" is set to any integer, it works great.

 

Invalid

George K

2019-05-11, 08:09 AM

2020-04-11, 11:58 PM

2020-04-11, 11:57 PM

0

2

Unconfirmed

Loot tables

Minecraft 1.14, Minecraft 1.14.1 Pre-Release 1, Minecraft 1.14.1 Pre-Release 2

-