geforkt von Mirrors/Paper
Merchant#getRecipes should return an immutable list
Dieser Commit ist enthalten in:
Ursprung
f8a55d3645
Commit
41fd1852ae
@ -16,7 +16,7 @@ public interface CraftMerchant extends Merchant {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
default List<MerchantRecipe> getRecipes() {
|
default List<MerchantRecipe> getRecipes() {
|
||||||
return Collections.unmodifiableList(Lists.transform(this.getMerchant().getOffers(), new Function<net.minecraft.world.item.trading.MerchantOffer, MerchantRecipe>() {
|
return List.copyOf(Lists.transform(this.getMerchant().getOffers(), new Function<net.minecraft.world.item.trading.MerchantOffer, MerchantRecipe>() { // Paper - javadoc says 'an immutable list of trades' - not 'an unmodifiable view of a list of trades'. fixes issue with setRecipes(getRecipes())
|
||||||
@Override
|
@Override
|
||||||
public MerchantRecipe apply(net.minecraft.world.item.trading.MerchantOffer recipe) {
|
public MerchantRecipe apply(net.minecraft.world.item.trading.MerchantOffer recipe) {
|
||||||
return recipe.asBukkit();
|
return recipe.asBukkit();
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren