mirror of
https://github.com/architectury/architectury-api.git
synced 2026-03-28 03:56:59 -05:00
Port to 22w14a
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user