mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 01:29:05 +00:00
soulstone villagers and friendly npcs
This commit is contained in:
1 parent
b18d0965f2
commit
b7ad0ce29b
2 files changed
+11
-4
No files matched your search
@@ -123,8 +123,14 @@ public class CustomNpcs {
|
||||
@ConfigProp(info = "Normal players can use soulstone on animals")
|
||||
public static boolean SoulStoneAnimals = true;
|
||||
|
||||
@ConfigProp(info = "Normal players can use soulstone on villagers")
|
||||
public static boolean SoulStoneVillagers = false;
|
||||
|
||||
@ConfigProp(info = "Normal players can use soulstone on all npcs")
|
||||
public static boolean SoulStoneNPCs = false;
|
||||
|
||||
@ConfigProp(info = "Normal players can use soulstone on friendly npcs")
|
||||
public static boolean SoulStoneFriendlyNPCs = false;
|
||||
|
||||
@ConfigProp(info="When set to Minecraft it will use minecrafts font, when Default it will use OpenSans. Can only use fonts installed on your PC")
|
||||
public static String FontType = "Default";
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
package noppes.npcs.items;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
import net.minecraft.entity.passive.EntityVillager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -17,7 +19,6 @@ import noppes.npcs.controllers.ServerCloneController;
|
||||
import noppes.npcs.entity.EntityNPCInterface;
|
||||
import noppes.npcs.roles.RoleCompanion;
|
||||
import noppes.npcs.roles.RoleFollower;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class ItemSoulstoneEmpty extends Item {
|
||||
public ItemSoulstoneEmpty(){
|
||||
@@ -85,11 +86,11 @@ public class ItemSoulstoneEmpty extends Item {
|
||||
if(role.getOwner() == player)
|
||||
return !role.refuseSoulStone;
|
||||
}
|
||||
if (npc.getFaction() != null && npc.getFaction().isFriendlyToPlayer(player) && CustomNpcs.SoulStoneFriendlyNPCs) return true;
|
||||
return CustomNpcs.SoulStoneNPCs;
|
||||
}
|
||||
if(entity instanceof EntityAnimal)
|
||||
return CustomNpcs.SoulStoneAnimals;
|
||||
|
||||
if (entity instanceof EntityAnimal) return CustomNpcs.SoulStoneAnimals;
|
||||
if (entity instanceof EntityVillager) return CustomNpcs.SoulStoneVillagers;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user