From d1b652b013d1b54c76750f0342bc70d678df8dc7 Mon Sep 17 00:00:00 2001 From: bm01 Date: Fri, 20 Apr 2012 15:29:12 +0200 Subject: [PATCH] Added natural Iron Golems to exp table --- src/main/java/com/gmail/nossr50/Combat.java | 6 ++++++ src/main/java/com/gmail/nossr50/config/LoadProperties.java | 3 ++- src/main/resources/config.yml | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/Combat.java b/src/main/java/com/gmail/nossr50/Combat.java index d3c2d6be9..9824afbdc 100644 --- a/src/main/java/com/gmail/nossr50/Combat.java +++ b/src/main/java/com/gmail/nossr50/Combat.java @@ -7,6 +7,7 @@ import org.bukkit.entity.Animals; import org.bukkit.entity.Arrow; import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; +import org.bukkit.entity.IronGolem; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.entity.Wolf; @@ -441,6 +442,11 @@ public class Combat { baseXP = LoadProperties.magmacubeXP; break; + case IRON_GOLEM: + if (!((IronGolem) target).isPlayerCreated()) + baseXP = LoadProperties.irongolemXP; + break; + case PIG_ZOMBIE: baseXP = LoadProperties.pigzombieXP; break; diff --git a/src/main/java/com/gmail/nossr50/config/LoadProperties.java b/src/main/java/com/gmail/nossr50/config/LoadProperties.java index c0b002099..1465c3571 100644 --- a/src/main/java/com/gmail/nossr50/config/LoadProperties.java +++ b/src/main/java/com/gmail/nossr50/config/LoadProperties.java @@ -120,7 +120,7 @@ public class LoadProperties extends ConfigLoader{ public static double pvpxprewardmodifier; public static double animalXP, creeperXP, skeletonXP, spiderXP, ghastXP, slimeXP, zombieXP, pigzombieXP, endermanXP, cavespiderXP, silverfishXP, - blazeXP, magmacubeXP, enderdragonXP; + blazeXP, magmacubeXP, enderdragonXP, irongolemXP; /* XP Formula Multiplier */ public static double tamingxpmodifier, miningxpmodifier, repairxpmodifier, woodcuttingxpmodifier, @@ -475,6 +475,7 @@ public class LoadProperties extends ConfigLoader{ blazeXP = config.getDouble("Experience.Combat.Multiplier.Blaze", 3.0); magmacubeXP = config.getDouble("Experience.Combat.Multiplier.Magma_Cube", 2.0); enderdragonXP = config.getDouble("Experience.Combat.Multiplier.Ender_Dragon", 8.0); + irongolemXP = config.getDouble("Experience.Combat.Multiplier.Iron_Golem", 2.0); detonatorID = config.getInt("Skills.Mining.Detonator_ID", 259); } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index f42edde87..f42ddf16c 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -271,6 +271,7 @@ Experience: Ender_Dragon: 8.0 Slime: 2.0 Ghast: 3.0 + Iron_Golem: 2.0 # # Settings for commands ###