Skip to content

Commit

Permalink
patches from testing
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jul 23, 2018
1 parent f9b1bd3 commit 40ff820
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/main/java/org/mcmonkey/sentinel/SentinelTarget.java
Original file line number Diff line number Diff line change
Expand Up @@ -242,17 +242,17 @@ public class SentinelTarget {
// == Begin Materials ==
if (v1_13) {
// Sword
addAllMaterials(SWORD_MATERIALS, "DIAMOND_SWORD", "IRON_SWORD", "STONE_SWORD", "GOLDEN_SWORD", "WOOD_SWORD");
addAllMaterials(SWORD_MATERIALS, "DIAMOND_SWORD", "IRON_SWORD", "STONE_SWORD", "GOLDEN_SWORD", "WOODEN_SWORD");
WEAPON_DAMAGE_MULTIPLIERS.put(getMaterial("DIAMOND_SWORD"), 7.0);
WEAPON_DAMAGE_MULTIPLIERS.put(getMaterial("IRON_SWORD"), 6.0);
WEAPON_DAMAGE_MULTIPLIERS.put(getMaterial("STONE_SWORD"), 5.0);
WEAPON_DAMAGE_MULTIPLIERS.put(getMaterial("GOLDEN_SWORD"), 4.0);
WEAPON_DAMAGE_MULTIPLIERS.put(getMaterial("WOOD_SWORD"), 4.0);
WEAPON_DAMAGE_MULTIPLIERS.put(getMaterial("WOODEN_SWORD"), 4.0);
// Pickaxe
addAllMaterials(PICKAXE_MATERIALS, "DIAMOND_PICKAXE", "IRON_PICKAXE", "STONE_PICKAXE", "GOLDEN_PICKAXE", "WOOD_PICKAXE");
addAllMaterials(PICKAXE_MATERIALS, "DIAMOND_PICKAXE", "IRON_PICKAXE", "STONE_PICKAXE", "GOLDEN_PICKAXE", "WOODEN_PICKAXE");
allMaterialsTo(WEAPON_DAMAGE_MULTIPLIERS, PICKAXE_MATERIALS, 2.0);
// Axe
addAllMaterials(AXE_MATERIALS, "DIAMOND_AXE", "IRON_AXE", "STONE_AXE", "GOLDEN_AXE", "WOOD_AXE");
addAllMaterials(AXE_MATERIALS, "DIAMOND_AXE", "IRON_AXE", "STONE_AXE", "GOLDEN_AXE", "WOODEN_AXE");
allMaterialsTo(WEAPON_DAMAGE_MULTIPLIERS, AXE_MATERIALS, 3.0);
// Bow
BOW_MATERIALS.add(getMaterial("BOW"));
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/org/mcmonkey/sentinel/SentinelTrait.java
Original file line number Diff line number Diff line change
Expand Up @@ -701,22 +701,22 @@ public double getArmor(LivingEntity ent) {
// TODO: Enchantments!
double baseArmor = 0;
ItemStack helmet = ent.getEquipment().getHelmet();
Double helmetAdder = SentinelTarget.ARMOR_PROTECTION_MULTIPLIERS.get(helmet.getType());
Double helmetAdder = helmet == null ? null : SentinelTarget.ARMOR_PROTECTION_MULTIPLIERS.get(helmet.getType());
if (helmetAdder != null) {
baseArmor += helmetAdder;
}
ItemStack chestplate = ent.getEquipment().getChestplate();
Double chestplateAdder = SentinelTarget.ARMOR_PROTECTION_MULTIPLIERS.get(chestplate.getType());
Double chestplateAdder = chestplate == null ? null : SentinelTarget.ARMOR_PROTECTION_MULTIPLIERS.get(chestplate.getType());
if (chestplateAdder != null) {
baseArmor += chestplateAdder;
}
ItemStack leggings = ent.getEquipment().getLeggings();
Double leggingsAdder = SentinelTarget.ARMOR_PROTECTION_MULTIPLIERS.get(leggings.getType());
Double leggingsAdder = leggings == null ? null : SentinelTarget.ARMOR_PROTECTION_MULTIPLIERS.get(leggings.getType());
if (leggingsAdder != null) {
baseArmor += leggingsAdder;
}
ItemStack boots = ent.getEquipment().getBoots();
Double bootsAdder = SentinelTarget.ARMOR_PROTECTION_MULTIPLIERS.get(boots.getType());
Double bootsAdder = boots == null ? null : SentinelTarget.ARMOR_PROTECTION_MULTIPLIERS.get(boots.getType());
if (bootsAdder != null) {
baseArmor += bootsAdder;
}
Expand Down

0 comments on commit 40ff820

Please sign in to comment.