CraftTweaker

CraftTweaker

151M Downloads

1.20 Example is incorrect for crafttweaker.api.loot.LootTable.getRandomItems

Milkdrop opened this issue ยท 0 comments

commented

Hello!

The documentation example for crafttweaker.api.loot.LootTable.getRandomItems seems to be:
getRandomItems(new LootContextBuilder(level).withParameter<Vec3>(...).withParameter<Entity>(...).create(LootContextParamSets.gift()))

Whereas it seems that the 1.20 way of doing it is:
getRandomItems(LootContextBuilder.create(LootParamsBuilder.create(level).withParameter<Vec3>(...).withParameter<Entity>(...).build(LootContextParamSets.gift())).create())