mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 01:27:27 +00:00
Added 9 more slots for quest kill objectives, and an option for kill quests to progress only if a player kills an NPC with that name.
Added quest interface support to get and modify data from specific quest types.
This commit is contained in:
1 parent
989effb5c5
commit
f876f13d77
15 files changed
+155
-32
No files matched your search
@@ -21,7 +21,6 @@ import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.village.MerchantRecipeList;
|
||||
import net.minecraftforge.event.CommandEvent;
|
||||
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingDeathEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingHurtEvent;
|
||||
@@ -43,7 +42,6 @@ import noppes.npcs.items.ItemShield;
|
||||
import noppes.npcs.items.ItemSoulstoneEmpty;
|
||||
import noppes.npcs.quests.QuestKill;
|
||||
import noppes.npcs.roles.RoleFollower;
|
||||
import noppes.npcs.scripted.event.ForgeEvent;
|
||||
|
||||
public class ServerEventsHandler {
|
||||
|
||||
@@ -309,6 +307,8 @@ public class ServerEventsHandler {
|
||||
}
|
||||
String name = entityName;
|
||||
QuestKill quest = (QuestKill) data.quest.questInterface;
|
||||
if(quest.targetType == 1 && !(entity instanceof EntityNPCInterface))
|
||||
continue;
|
||||
if(quest.targets.containsKey(entity.getCommandSenderName()))
|
||||
name = entity.getCommandSenderName();
|
||||
else if(!quest.targets.containsKey(name))
|
||||
|
||||
Reference in new issue
Block a user