public static class DayCareEvent.PreConditionStatusUpdate extends DayCareEvent
DayCareEvent.HourGlassUsed, DayCareEvent.PostCollect, DayCareEvent.PostConditionStatusUpdate, DayCareEvent.PostDurationCalculate, DayCareEvent.PostEggCalculate, DayCareEvent.PostPokemonAdd, DayCareEvent.PostTimerBegin, DayCareEvent.PreCollect, DayCareEvent.PreConditionStatusUpdate, DayCareEvent.PreDurationCalculate, DayCareEvent.PreEggCalculate, DayCareEvent.PrePokemonAdd, DayCareEvent.PreTimerBegin, DayCareEvent.TimerComplete
Modifier and Type | Field and Description |
---|---|
protected DayCareBox |
box |
protected boolean |
canConsume |
protected DayCareCondition |
condition |
protected net.minecraft.util.text.ITextComponent |
errorMessage |
protected DayCareRequirement |
requirement |
Constructor and Description |
---|
PreConditionStatusUpdate(net.minecraft.entity.player.ServerPlayerEntity player,
PlayerPartyStorage party,
DayCareBox box,
DayCareCondition condition,
DayCareRequirement requirement,
boolean canConsume,
net.minecraft.util.text.ITextComponent errorMessage) |
Modifier and Type | Method and Description |
---|---|
DayCareBox |
getBox()
Gets the box this is in relation to
|
DayCareCondition |
getCondition()
Gets the condition being used
|
net.minecraft.util.text.ITextComponent |
getErrorMessage()
Gets the error message to display to the client
Only displayed if
isCanConsume() is false |
DayCareRequirement |
getRequirement()
Gets the requirement being used
|
boolean |
isCanConsume()
If the inventory can consume the requirement (i.e.
|
void |
setCanConsume(boolean canConsume)
Sets if they can meet the requirement
|
void |
setCondition(DayCareCondition condition)
Sets the condition being used
|
void |
setErrorMessage(net.minecraft.util.text.ITextComponent errorMessage)
Sets the error message to display to the client
Only displayed if
isCanConsume() is false |
void |
setRequirement(DayCareRequirement requirement)
Sets the requirement being used
|
getDayCare, getParty, getPlayer
protected final DayCareBox box
protected DayCareCondition condition
protected DayCareRequirement requirement
protected boolean canConsume
protected net.minecraft.util.text.ITextComponent errorMessage
public PreConditionStatusUpdate(net.minecraft.entity.player.ServerPlayerEntity player, PlayerPartyStorage party, DayCareBox box, DayCareCondition condition, DayCareRequirement requirement, boolean canConsume, net.minecraft.util.text.ITextComponent errorMessage)
public DayCareBox getBox()
public DayCareCondition getCondition()
public void setCondition(DayCareCondition condition)
condition
- The conditionpublic DayCareRequirement getRequirement()
public void setRequirement(DayCareRequirement requirement)
requirement
- The new requirement being usedpublic boolean isCanConsume()
public void setCanConsume(boolean canConsume)
canConsume
- True if they can meet the requirementpublic net.minecraft.util.text.ITextComponent getErrorMessage()
isCanConsume()
is falsepublic void setErrorMessage(net.minecraft.util.text.ITextComponent errorMessage)
isCanConsume()
is falseerrorMessage
- The error message