Skip to content

Commit

Permalink
Updated traded item
Browse files Browse the repository at this point in the history
  • Loading branch information
Faboslav committed Jan 19, 2025
1 parent 6494880 commit 016c216
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import net.minecraft.util.math.random.Random;
import net.minecraft.village.TradeOffer;
import net.minecraft.village.TradeOffers;
import net.minecraft.village.TradedItem;

public class BasicTradeOffer implements TradeOffers.Factory {
private final Item itemToTrade;
Expand All @@ -28,7 +29,7 @@ public BasicTradeOffer(Item itemToTrade, Item itemToReceive, int amountToGive, i

@Override
public TradeOffer create(Entity entity, Random random) {
ItemStack in = new ItemStack(this.itemToTrade, this.amountToGive);
TradedItem in = new TradedItem(this.itemToTrade, this.amountToGive);
ItemStack out = new ItemStack(this.itemToReceive, this.amountToReceive);
return new TradeOffer(in, out, this.maxUses, this.experience, this.multiplier);
}
Expand Down

0 comments on commit 016c216

Please sign in to comment.