Create: Broken Bad

Create: Broken Bad

683k Downloads

[1.19.2 and 1.20.1] Adding trades to Nitwit villagers crashed Repurposed Structures

TelepathicGrunt opened this issue ยท 1 comments

commented

I gotten this bug report for my mod
TelepathicGrunt/RepurposedStructures#309

Upon closer look, it appears this mod is adding trades to all villagers including Nitwit villagers. But only to level 1 and 2 trades. And since Nitwits have no trades by default, the missing level 0 trades then causes my mod's code to blow up

trades.get(2).add((trader, rand) -> new MerchantOffer(
new ItemStack(CBBItems.WHITE_METH.get()),
new ItemStack(Items.EMERALD, 2),
10,8,0.02F));
trades.get(3).add((trader, rand) -> new MerchantOffer(
new ItemStack(CBBItems.BLUE_METH.get()),
new ItemStack(Items.EMERALD, 3),
10,8,0.02F));

Since Nitwits are not tradeable, this seems like a bug on Create Broken Bad side. Try and prevent adding trades to nitwits and that should make everything all good again

commented

Thanks for letting me know, i just released a fix for this which will be on Curseforge soon.