diff --git a/src/main/java/com/gmail/nossr50/commands/skills/TamingCommand.java b/src/main/java/com/gmail/nossr50/commands/skills/TamingCommand.java index 50e7ac7a9..ce97ad822 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/TamingCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/TamingCommand.java @@ -12,6 +12,7 @@ import com.gmail.nossr50.datatypes.skills.SkillType; import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.skills.taming.Taming; import com.gmail.nossr50.util.Permissions; +import com.gmail.nossr50.util.StringUtils; public class TamingCommand extends SkillCommand { private String goreChance; @@ -91,9 +92,13 @@ public class TamingCommand extends SkillCommand { if (canCallWild) { messages.add(LocaleLoader.getString("Effects.Template", LocaleLoader.getString("Taming.Effect.12"), LocaleLoader.getString("Taming.Effect.13"))); - messages.add(LocaleLoader.getString("Taming.Effect.14", Config.getInstance().getTamingCOTWCost(EntityType.OCELOT))); - messages.add(LocaleLoader.getString("Taming.Effect.15", Config.getInstance().getTamingCOTWCost(EntityType.WOLF))); - messages.add(LocaleLoader.getString("Taming.Effect.20", Config.getInstance().getTamingCOTWCost(EntityType.HORSE))); + int costOcelot = Config.getInstance().getTamingCOTWCost(EntityType.OCELOT); + String itemOcelot = StringUtils.getPrettyItemString(Config.getInstance().getTamingCOTWMaterial(EntityType.OCELOT)); + int costWolf = Config.getInstance().getTamingCOTWCost(EntityType.WOLF); + String itemWolf = StringUtils.getPrettyItemString(Config.getInstance().getTamingCOTWMaterial(EntityType.WOLF)); + int costHorse = Config.getInstance().getTamingCOTWCost(EntityType.HORSE); + String itemHorse = StringUtils.getPrettyItemString(Config.getInstance().getTamingCOTWMaterial(EntityType.HORSE)); + messages.add(LocaleLoader.getString("Taming.Effect.14", costOcelot, itemOcelot, costWolf, itemWolf, costHorse, itemHorse)); } return messages; diff --git a/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java b/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java index 6016ac2fa..244fd1682 100644 --- a/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java +++ b/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java @@ -362,7 +362,8 @@ public class TamingManager extends SkillManager { return true; } - int summonAmount = summonedEntities.get(entityType).size(); + List trackedEntities = getTrackedEntities(entityType); + int summonAmount = trackedEntities == null ? 0 : trackedEntities.size(); if (summonAmount >= maxAmountSummons) { player.sendMessage(LocaleLoader.getString("Taming.Summon.Fail.TooMany", maxAmountSummons)); @@ -382,6 +383,10 @@ public class TamingManager extends SkillManager { summonedEntities.get(livingEntity.getType()).add(trackedEntity); } + protected static List getTrackedEntities(EntityType entityType) { + return summonedEntities.get(entityType); + } + protected static void removeFromTracker(TrackedTamingEntity trackedEntity) { summonedEntities.get(trackedEntity.getLivingEntity().getType()).remove(trackedEntity); } diff --git a/src/main/resources/locale/locale_en_US.properties b/src/main/resources/locale/locale_en_US.properties index 48806d3a4..bca452e6e 100644 --- a/src/main/resources/locale/locale_en_US.properties +++ b/src/main/resources/locale/locale_en_US.properties @@ -340,9 +340,7 @@ Taming.Effect.10=Shock Proof Taming.Effect.11=Explosive Damage Reduction Taming.Effect.12=Call of the Wild Taming.Effect.13=Summon an animal to your side -Taming.Effect.14=[[GRAY]]COTW (Ocelot): Crouch and left-click with {0} Fish in hand -Taming.Effect.15=[[GRAY]]COTW (Wolf): Crouch and left-click with {0} Bones in hand -Taming.Effect.20=[[GRAY]]COTW (Horse): Crouch and left-click with {0} Apples in hand +Taming.Effect.14=[[GRAY]]COTW: Crouch and left-click with\n {0} {1} (Ocelot), {2} {3} (Wolf), {4} {5} (Horse) Taming.Effect.16=Fast Food Service Taming.Effect.17=Chance for wolves to heal on attack Taming.Effect.18=Holy Hound