Create Sifting

Create Sifting

2M Downloads

Chance based results not being chance based (KubeJS integration 1.18.2).

Flabort opened this issue ยท 2 comments

commented

So I have the following code:

event.recipes.createsifterSifting([
		Item.of('kubejs:cobblestone_pebble').withChance(0.2).toJson(),
		Item.of('kubejs:granite_pebble').withChance(0.2).toJson(),
		Item.of('kubejs:diorite_pebble').withChance(0.2).toJson(),
		Item.of('kubejs:andesite_pebble').withChance(0.2).toJson(),
		Item.of('kubejs:deepslate_pebble').withChance(0.2).toJson(),
		Item.of('kubejs:calcite_pebble').withChance(0.2).toJson(),
		Item.of('kubejs:tuff_pebble').withChance(0.2).toJson(),
		Item.of('kubejs:dripstone_pebble').withChance(0.2).toJson(),
		Item.of('kubejs:myonite_pebble').withChance(0.2).toJson(),
		Item.of('kubejs:olivestone_pebble').withChance(0.2).toJson(),
		Item.of('kubejs:asurine_pebble').withChance(0.2).toJson(),
		Item.of('kubejs:crimsite_pebble').withChance(0.2).toJson(),
		Item.of('kubejs:limestone_pebble').withChance(0.2).toJson(),
		Item.of('kubejs:ochrum_pebble').withChance(0.2).toJson(),
		Item.of('kubejs:scoria_pebble').withChance(0.2).toJson(),
		Item.of('kubejs:scorchia_pebble').withChance(0.2).toJson(),
		Item.of('kubejs:veridium_pebble').withChance(0.2).toJson(),
		Item.of('kubejs:dacite_pebble').withChance(0.2).toJson(),
		Item.of('kubejs:red_pebble').withChance(0.2).toJson(),
		Item.of('kubejs:soapstone_pebble').withChance(0.2).toJson(),
		Item.of('kubejs:ether_pebble').withChance(0.2).toJson(),
		Item.of('kubejs:therium_pebble').withChance(0.2).toJson(),
		Item.of('kubejs:jasper_pebble').withChance(0.2).toJson(),
		Item.of('kubejs:shale_pebble').withChance(0.2).toJson(),
		Item.of('kubejs:myalite_pebble').withChance(0.2).toJson()
	],['minecraft:gravel','createsifter:string_mesh'])

And the expected behavior is that each pebble has a 20% chance of being dropped. But instead, they are all dropping every time.

image

commented

More info: Using the mesh in hand to sift this recipe creates all 25 outputs. Using the mesh in a sifter and powering it produces only the first 9 outputs.

My KubeJS version is 1802.5.5-build.569
My Create Sifter version is 1.18.2-1.4.0.i

commented

I figured it out on my own. I deleted .toJson() from each line, and now it works.