Port to 22w14a

This commit is contained in:
shedaniel
2022-04-07 11:39:26 +08:00
parent 11aa105fbc
commit 5aa084c679
5 changed files with 11 additions and 11 deletions

View File

@@ -19,14 +19,13 @@
package dev.architectury.registry.level.entity.trade;
import net.minecraft.util.RandomSource;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.npc.VillagerTrades;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.trading.MerchantOffer;
import org.jetbrains.annotations.Nullable;
import java.util.Random;
/**
* This class is the easiest implementation of a trade object.
* All trades added by vanilla do have custom classes like {@link VillagerTrades.EmeraldForItems}, but they aren't accessible.
@@ -56,7 +55,7 @@ public record SimpleTrade(ItemStack primaryPrice, ItemStack secondaryPrice,
@Nullable
@Override
public MerchantOffer getOffer(Entity entity, Random random) {
public MerchantOffer getOffer(Entity entity, RandomSource random) {
return new MerchantOffer(this.primaryPrice, this.secondaryPrice, this.sale, this.maxTrades, this.experiencePoints, this.priceMultiplier);
}
}