Closed Libellule505 closed 3 years ago
猪灵以物易物的无法使用quality:
猪灵以物易物创建的 LootContext
没有使用 withLuck
方法修改 luck
属性,即 luck
属性始为默认值0。
# net.minecraft.entity.monster.piglin.PiglinTasks.getBarterResponseItems
private static List<ItemStack> getBarterResponseItems(PiglinEntity p_234524_0_) {
LootTable loottable = p_234524_0_.level.getServer().getLootTables().get(LootTables.PIGLIN_BARTERING);
return loottable.getRandomItems(
(new LootContext.Builder((ServerWorld) p_234524_0_.level))
.withParameter(LootParameters.THIS_ENTITY, p_234524_0_)
.withRandom(p_234524_0_.level.random)
.create(LootParameterSets.PIGLIN_BARTER)
);
}
猪灵以物易物的无法使用quality: 猪灵以物易物创建的
LootContext
没有使用withLuck
方法修改luck
属性,即luck
属性始为默认值0。# net.minecraft.entity.monster.piglin.PiglinTasks.getBarterResponseItems private static List<ItemStack> getBarterResponseItems(PiglinEntity p_234524_0_) { LootTable loottable = p_234524_0_.level.getServer().getLootTables().get(LootTables.PIGLIN_BARTERING); return loottable.getRandomItems( (new LootContext.Builder((ServerWorld) p_234524_0_.level)) .withParameter(LootParameters.THIS_ENTITY, p_234524_0_) .withRandom(p_234524_0_.level.random) .create(LootParameterSets.PIGLIN_BARTER) ); }
原版table名 | 抽取次数rolls | 权重weight | 品质quality | 空权emptyweight |
piglin_bartering | 1 | 1 | 0 | 127 |
添加物品:春日酱的眷顾。 注:新id
god_bless_danchou_armband
旧idepic_reinforcement_stone
战利品箱子
猪灵以物易物
钓鱼宝藏池