Fixed BoP crashing on newer version of Forge

This commit is contained in:
GirafiStudios 2016-05-26 21:26:29 +02:00
parent e53c2f1adc
commit 3f91da14ae
2 changed files with 3 additions and 9 deletions

View File

@ -1,4 +1,4 @@
minecraft_version=1.9.4 minecraft_version=1.9.4
forge_version=12.17.0.1909-1.9.4 forge_version=12.17.0.1922-1.9.4
mod_version=4.1.0 mod_version=4.1.0
mappings_version=snapshot_nodoc_20160519 mappings_version=snapshot_nodoc_20160519

View File

@ -122,7 +122,6 @@ import net.minecraft.init.Blocks;
import net.minecraft.init.MobEffects; import net.minecraft.init.MobEffects;
import net.minecraft.init.SoundEvents; import net.minecraft.init.SoundEvents;
import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.EnumAction;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.Item.ToolMaterial; import net.minecraft.item.Item.ToolMaterial;
import net.minecraft.item.ItemArmor.ArmorMaterial; import net.minecraft.item.ItemArmor.ArmorMaterial;
@ -311,14 +310,9 @@ public class ModItems
return item; return item;
} }
private static Class<?>[][] enumTypes = private static ArmorMaterial addArmorMaterial(String name, String textureName, int durability, int[] reductionAmounts, int enchantability, SoundEvent soundOnEquip, float toughness)
{ {
{ArmorMaterial.class, String.class, int.class, int[].class, int.class, SoundEvent.class, float.class} return EnumHelper.addArmorMaterial(name, textureName, durability, reductionAmounts, enchantability, soundOnEquip, toughness);
};
private static ItemArmor.ArmorMaterial addArmorMaterial(String name, String textureName, int durability, int[] reductionAmounts, int enchantability, SoundEvent soundOnEquip, float toughness)
{
return EnumHelper.addEnum(enumTypes, ItemArmor.ArmorMaterial.class, name, textureName, durability, reductionAmounts, enchantability, soundOnEquip, toughness);
} }
private static void setAxeDamageAndSpeed(ToolMaterial material, float damage, float speed) private static void setAxeDamageAndSpeed(ToolMaterial material, float damage, float speed)