public class HoldTradeOffersTask extends Task<VillagerEntity>
Task.Status
Modifier and Type | Field and Description |
---|---|
private ItemStack |
customerHeldStack |
private int |
offerIndex |
private List<ItemStack> |
offers |
private int |
offerShownTicks |
private int |
ticksLeft |
requiredMemoryStates
Constructor and Description |
---|
HoldTradeOffersTask(int minRunTime,
int maxRunTime) |
Modifier and Type | Method and Description |
---|---|
private LivingEntity |
findPotentialCustomer(VillagerEntity villager) |
void |
finishRunning(ServerWorld serverWorld,
VillagerEntity villagerEntity,
long long2) |
private void |
holdOffer(VillagerEntity villager) |
private boolean |
isPossible(TradeOffer offer) |
void |
keepRunning(ServerWorld serverWorld,
VillagerEntity villagerEntity,
long long2) |
private void |
loadPossibleOffers(VillagerEntity villager) |
private void |
refreshShownOffer(VillagerEntity villager) |
void |
run(ServerWorld serverWorld,
VillagerEntity villagerEntity,
long long2) |
private void |
setupOffers(LivingEntity customer,
VillagerEntity villager) |
boolean |
shouldKeepRunning(ServerWorld serverWorld,
VillagerEntity villagerEntity,
long long2) |
boolean |
shouldRun(ServerWorld serverWorld,
VillagerEntity villagerEntity) |
getStatus, isTimeLimitExceeded, stop, tick, toString, tryStarting
private int offerShownTicks
private int offerIndex
private int ticksLeft
public boolean shouldRun(ServerWorld serverWorld, VillagerEntity villagerEntity)
shouldRun
in class Task<VillagerEntity>
public boolean shouldKeepRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)
shouldKeepRunning
in class Task<VillagerEntity>
public void run(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)
run
in class Task<VillagerEntity>
public void keepRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)
keepRunning
in class Task<VillagerEntity>
public void finishRunning(ServerWorld serverWorld, VillagerEntity villagerEntity, long long2)
finishRunning
in class Task<VillagerEntity>
private void setupOffers(LivingEntity customer, VillagerEntity villager)
private void holdOffer(VillagerEntity villager)
private void loadPossibleOffers(VillagerEntity villager)
private boolean isPossible(TradeOffer offer)
private LivingEntity findPotentialCustomer(VillagerEntity villager)
private void refreshShownOffer(VillagerEntity villager)