Class BasicTrade
java.lang.Object
io.github.vampirestudios.vampirelib.village.BasicTrade
- All Implemented Interfaces:
net.minecraft.world.entity.npc.VillagerTrades.ItemListing
public class BasicTrade
extends Object
implements net.minecraft.world.entity.npc.VillagerTrades.ItemListing
A default, exposed implementation of ITrade. All of the other implementations of ITrade (in VillagerTrades) are not public.
This class contains everything needed to make a MerchantOffer, the actual "trade" object shown in trading guis.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBasicTrade(int emeralds, net.minecraft.world.item.ItemStack forSale, int maxTrades, int xp) BasicTrade(int emeralds, net.minecraft.world.item.ItemStack forSale, int maxTrades, int xp, float mult) BasicTrade(net.minecraft.world.item.ItemStack price, net.minecraft.world.item.ItemStack forSale, int maxTrades, int xp, float priceMult) BasicTrade(net.minecraft.world.item.ItemStack price, net.minecraft.world.item.ItemStack price2, net.minecraft.world.item.ItemStack forSale, int maxTrades, int xp, float priceMult) -
Method Summary
Modifier and TypeMethodDescription@Nullable net.minecraft.world.item.trading.MerchantOffergetOffer(net.minecraft.world.entity.Entity merchant, net.minecraft.util.RandomSource rand)
-
Field Details
-
price
protected final net.minecraft.world.item.ItemStack price -
price2
protected final net.minecraft.world.item.ItemStack price2 -
forSale
protected final net.minecraft.world.item.ItemStack forSale -
maxTrades
protected final int maxTrades -
xp
protected final int xp -
priceMult
protected final float priceMult
-
-
Constructor Details
-
BasicTrade
public BasicTrade(net.minecraft.world.item.ItemStack price, net.minecraft.world.item.ItemStack price2, net.minecraft.world.item.ItemStack forSale, int maxTrades, int xp, float priceMult) -
BasicTrade
public BasicTrade(net.minecraft.world.item.ItemStack price, net.minecraft.world.item.ItemStack forSale, int maxTrades, int xp, float priceMult) -
BasicTrade
public BasicTrade(int emeralds, net.minecraft.world.item.ItemStack forSale, int maxTrades, int xp, float mult) -
BasicTrade
public BasicTrade(int emeralds, net.minecraft.world.item.ItemStack forSale, int maxTrades, int xp)
-
-
Method Details
-
getOffer
@Nullable public @Nullable net.minecraft.world.item.trading.MerchantOffer getOffer(net.minecraft.world.entity.Entity merchant, net.minecraft.util.RandomSource rand) - Specified by:
getOfferin interfacenet.minecraft.world.entity.npc.VillagerTrades.ItemListing
-