private void handleTaskRequest(EntityPlayer player, DataReader dr) { int questId = dr.readData(DataBitHelper.QUESTS); int taskId = dr.readData(DataBitHelper.TASKS); Quest quest = Quest.getQuest(questId); if (quest != null && taskId >= 0 && taskId < quest.getTasks().size()) { QuestTask task = quest.getTasks().get(taskId); task.onUpdate(player, dr); } }
private void handleSelectTask(EntityPlayer player, DataReader dr) { int questId = dr.readData(DataBitHelper.QUESTS); int taskId = dr.readData(DataBitHelper.TASKS); Quest quest = Quest.getQuest(questId); if (quest != null && taskId >= 0 && taskId < quest.getTasks().size()) { QuestingData data = QuestingData.getQuestingData(player); data.selectedQuest = questId; data.selectedTask = taskId; } }