Package com.pixelmonmod.pixelmon.quests
Class QuestProgress
java.lang.Object
com.pixelmonmod.pixelmon.quests.QuestProgress
- All Implemented Interfaces:
ISaveData
-
Constructor Summary
ConstructorDescriptionQuestProgress
(Quest quest, QuestData parent) QuestProgress
(net.minecraft.nbt.CompoundTag nbt, QuestData data) -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
complete
(net.minecraft.server.level.ServerPlayer player) void
completeObjective
(int index) Ticks the completed countvoid
fail
(net.minecraft.server.level.ServerPlayer player) getDataLong
(String key) getDataString
(String key) int
getObjectiveQuantityComplete
(int index) int
getObjectiveTotalQuantity
(int index) getQuest()
short
getStage()
void
void
boolean
boolean
boolean
isFailed()
boolean
isObjectiveComplete
(int index) boolean
boolean
void
readFromNBT
(net.minecraft.nbt.CompoundTag nbt) void
reopen()
void
resetObjective
(int index) void
sendTo
(net.minecraft.server.level.ServerPlayer player) void
setAbandonable
(boolean abandonable) void
void
boolean
setStage
(short stage) void
start()
void
writeToNBT
(net.minecraft.nbt.CompoundTag nbt)
-
Constructor Details
-
QuestProgress
-
QuestProgress
-
-
Method Details
-
start
public void start() -
fail
public void fail(net.minecraft.server.level.ServerPlayer player) -
complete
public void complete(net.minecraft.server.level.ServerPlayer player) -
isStarted
public boolean isStarted() -
isComplete
public boolean isComplete() -
isFailed
public boolean isFailed() -
initQuantities
public void initQuantities() -
reopen
public void reopen() -
getDataLong
-
getDataString
-
getData
-
getDataLongMap
-
getDataStringMap
-
getDataUUIDs
-
setData
-
setData
-
sendTo
public void sendTo(net.minecraft.server.level.ServerPlayer player) -
getStage
public short getStage() -
getCurrentStage
-
getNextStage
-
setStage
public boolean setStage(short stage) -
moveStage
public boolean moveStage(QuestData quest, Stage oldStage, short newStageID) throws InvalidQuestArgsException - Throws:
InvalidQuestArgsException
-
completeObjective
public void completeObjective(int index) Ticks the completed count- Parameters:
index
-
-
resetObjective
public void resetObjective(int index) -
isObjectiveComplete
public boolean isObjectiveComplete(int index) -
getObjectiveQuantityComplete
public int getObjectiveQuantityComplete(int index) -
getObjectiveTotalQuantity
public int getObjectiveTotalQuantity(int index) -
canProgress
public boolean canProgress() -
getMarkerType
-
getMarkers
-
getQuestFilename
-
getQuest
-
invalidate
public void invalidate() -
getIdentifier
-
isAbandonable
public boolean isAbandonable() -
setAbandonable
public void setAbandonable(boolean abandonable) -
writeToNBT
public void writeToNBT(net.minecraft.nbt.CompoundTag nbt) - Specified by:
writeToNBT
in interfaceISaveData
-
readFromNBT
public void readFromNBT(net.minecraft.nbt.CompoundTag nbt) - Specified by:
readFromNBT
in interfaceISaveData
-
getParent
-