diff --git a/src/main/java/mod/emt/harkenscythe/block/HSBlockCrucible.java b/src/main/java/mod/emt/harkenscythe/block/HSBlockCrucible.java index 5be3ede..a455f03 100644 --- a/src/main/java/mod/emt/harkenscythe/block/HSBlockCrucible.java +++ b/src/main/java/mod/emt/harkenscythe/block/HSBlockCrucible.java @@ -28,6 +28,7 @@ import net.minecraft.world.World; import mod.emt.harkenscythe.init.HSItems; +import mod.emt.harkenscythe.init.HSMaterials; import mod.emt.harkenscythe.init.HSSoundEvents; import mod.emt.harkenscythe.item.armor.HSArmorDyeable; import mod.emt.harkenscythe.tileentity.HSTileEntityCrucible; @@ -139,7 +140,7 @@ public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, En else if (essenceCount > 0 && heldItem instanceof HSArmorDyeable) { HSArmorDyeable armor = (HSArmorDyeable) heldItem; - if (armor.hasColor(heldStack) && ((armor.getArmorMaterial() == HSItems.ARMOR_BLOODWEAVE && this instanceof HSBlockBloodCrucible) || (armor.getArmorMaterial() == HSItems.ARMOR_SOULWEAVE && this instanceof HSBlockSoulCrucible))) + if (armor.hasColor(heldStack) && ((armor.getArmorMaterial() == HSMaterials.ARMOR_BLOODWEAVE && this instanceof HSBlockBloodCrucible) || (armor.getArmorMaterial() == HSMaterials.ARMOR_SOULWEAVE && this instanceof HSBlockSoulCrucible))) { armor.removeColor(heldStack); ((HSTileEntityCrucible) te).setEssenceCount(world, pos, state, essenceCount - 10); diff --git a/src/main/java/mod/emt/harkenscythe/entity/HSEntitySoul.java b/src/main/java/mod/emt/harkenscythe/entity/HSEntitySoul.java index 9de8d50..75bf1a0 100644 --- a/src/main/java/mod/emt/harkenscythe/entity/HSEntitySoul.java +++ b/src/main/java/mod/emt/harkenscythe/entity/HSEntitySoul.java @@ -22,6 +22,7 @@ import mod.emt.harkenscythe.event.HSEventLivingDeath; import mod.emt.harkenscythe.init.HSItems; +import mod.emt.harkenscythe.init.HSMaterials; import mod.emt.harkenscythe.init.HSSoundEvents; import mod.emt.harkenscythe.item.armor.HSArmor; import mod.emt.harkenscythe.item.tool.IHSTool; @@ -257,6 +258,6 @@ private ItemStack getRandomDamagedLivingmetalEquipment(EntityPlayer player) private boolean isLivingmetalItem(Item item) { - return (item instanceof HSArmor && ((HSArmor) item).getArmorMaterial() == HSItems.ARMOR_LIVINGMETAL) || (item instanceof IHSTool && ((IHSTool) item).getToolMaterial() == HSItems.TOOL_LIVINGMETAL); + return (item instanceof HSArmor && ((HSArmor) item).getArmorMaterial() == HSMaterials.ARMOR_LIVINGMETAL) || (item instanceof IHSTool && ((IHSTool) item).getToolMaterial() == HSMaterials.TOOL_LIVINGMETAL); } } diff --git a/src/main/java/mod/emt/harkenscythe/init/HSBlocks.java b/src/main/java/mod/emt/harkenscythe/init/HSBlocks.java index 10b9b19..4297953 100644 --- a/src/main/java/mod/emt/harkenscythe/init/HSBlocks.java +++ b/src/main/java/mod/emt/harkenscythe/init/HSBlocks.java @@ -14,53 +14,37 @@ import mod.emt.harkenscythe.HarkenScythe; import mod.emt.harkenscythe.block.*; -@SuppressWarnings("unused") +@SuppressWarnings({"DataFlowIssue", "unused"}) @Mod.EventBusSubscriber(modid = HarkenScythe.MOD_ID) @GameRegistry.ObjectHolder(HarkenScythe.MOD_ID) public class HSBlocks { - @GameRegistry.ObjectHolder("biomass_block") - public static HSBlockMaterial biomass_block; - @GameRegistry.ObjectHolder("biomass_crop") - public static HSBlockBiomassCrop biomass_crop; + public static final HSBlockMaterial biomass_block = null; + public static final HSBlockMaterial livingmetal_block = null; - @GameRegistry.ObjectHolder("livingmetal_block") - public static HSBlockMaterial livingmetal_block; - @GameRegistry.ObjectHolder("livingmetal_core") - public static HSBlockLivingmetalCore livingmetal_core; + public static final HSBlockSpectralGlass spectral_glass = null; + public static final HSBlockSpectralGlass spectral_glass_inverted = null; + public static final HSBlockSpectralGlassPane spectral_glass_pane = null; + public static final HSBlockSpectralGlassPane spectral_glass_pane_inverted = null; - @GameRegistry.ObjectHolder("spectral_glass") - public static HSBlockSpectralGlass spectral_glass; - @GameRegistry.ObjectHolder("spectral_glass_inverted") - public static HSBlockSpectralGlass spectral_glass_inverted; - @GameRegistry.ObjectHolder("spectral_glass_pane") - public static HSBlockSpectralGlassPane spectral_glass_pane; - @GameRegistry.ObjectHolder("spectral_glass_pane_inverted") - public static HSBlockSpectralGlassPane spectral_glass_pane_inverted; + public static final HSBlockCreep creep_block = null; + public static final HSBlockCreep creep_block_tilled = null; + public static final HSBlockCreep creep_block_tilled_bloodied = null; - @GameRegistry.ObjectHolder("creep_block") - public static HSBlockCreep creep_block; - @GameRegistry.ObjectHolder("creep_block_tilled") - public static HSBlockCreep creep_block_tilled; - @GameRegistry.ObjectHolder("creep_block_tilled_bloodied") - public static HSBlockCreep creep_block_tilled_bloodied; + public static final HSBlockCloth bloodweave_cloth = null; + public static final HSBlockCloth soulweave_cloth = null; - @GameRegistry.ObjectHolder("bloodweave_cloth") - public static HSBlockCloth bloodweave_cloth; - @GameRegistry.ObjectHolder("soulweave_cloth") - public static HSBlockCloth soulweave_cloth; + public static final HSBlockBloodCrucible blood_crucible = null; + public static final HSBlockSoulCrucible soul_crucible = null; - @GameRegistry.ObjectHolder("blood_altar") - public static HSBlockBloodAltar blood_altar; - @GameRegistry.ObjectHolder("soul_altar") - public static HSBlockSoulAltar soul_altar; - @GameRegistry.ObjectHolder("blood_crucible") - public static HSBlockBloodCrucible blood_crucible; - @GameRegistry.ObjectHolder("soul_crucible") - public static HSBlockSoulCrucible soul_crucible; + public static final HSBlockBloodAltar blood_altar = null; + public static final HSBlockSoulAltar soul_altar = null; - @GameRegistry.ObjectHolder("soul_cake") - public static HSBlockSoulCake soul_cake; + public static final HSBlockSoulCake soul_cake = null; + + public static final HSBlockBiomassCrop biomass_crop = null; + + public static final HSBlockLivingmetalCore livingmetal_core = null; @SubscribeEvent public static void onRegisterBlocksEvent(@Nonnull final RegistryEvent.Register event) diff --git a/src/main/java/mod/emt/harkenscythe/init/HSItems.java b/src/main/java/mod/emt/harkenscythe/init/HSItems.java index 9209339..be5ea85 100644 --- a/src/main/java/mod/emt/harkenscythe/init/HSItems.java +++ b/src/main/java/mod/emt/harkenscythe/init/HSItems.java @@ -3,19 +3,15 @@ import javax.annotation.Nonnull; import net.minecraft.client.renderer.block.model.ModelResourceLocation; -import net.minecraft.init.Items; -import net.minecraft.init.SoundEvents; import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.item.EnumRarity; import net.minecraft.item.Item; import net.minecraft.item.Item.ToolMaterial; -import net.minecraft.item.ItemArmor.ArmorMaterial; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.Ingredient; import net.minecraftforge.client.event.ModelRegistryEvent; import net.minecraftforge.client.model.ModelLoader; -import net.minecraftforge.common.util.EnumHelper; import net.minecraftforge.event.RegistryEvent; import net.minecraftforge.fml.common.Loader; import net.minecraftforge.fml.common.Mod; @@ -24,7 +20,6 @@ import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; -import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.registries.IForgeRegistry; import mod.emt.harkenscythe.HarkenScythe; @@ -37,195 +32,103 @@ import mod.emt.harkenscythe.item.armor.HSArmorDyeable; import mod.emt.harkenscythe.item.tool.*; -@SuppressWarnings({"deprecation"}) +@SuppressWarnings({"DataFlowIssue", "deprecation", "unused"}) @Mod.EventBusSubscriber(modid = HarkenScythe.MOD_ID) @GameRegistry.ObjectHolder(HarkenScythe.MOD_ID) public class HSItems { - @GameRegistry.ObjectHolder("essence_keeper") - public static HSItemEssenceKeeper essence_keeper; - @GameRegistry.ObjectHolder("essence_keeper_blood") - public static HSItemEssenceKeeperBlood essence_keeper_blood; - @GameRegistry.ObjectHolder("essence_keeper_soul") - public static HSItemEssenceKeeperSoul essence_keeper_soul; - @GameRegistry.ObjectHolder("essence_vessel") - public static HSItemEssenceVessel essence_vessel; - @GameRegistry.ObjectHolder("essence_vessel_blood") - public static HSItemEssenceVesselBlood essence_vessel_blood; - @GameRegistry.ObjectHolder("essence_vessel_soul") - public static HSItemEssenceVesselSoul essence_vessel_soul; + public static final HSItemEssenceKeeper essence_keeper = null; + public static final HSItemEssenceKeeperBlood essence_keeper_blood = null; + public static final HSItemEssenceKeeperSoul essence_keeper_soul = null; + public static final HSItemEssenceVessel essence_vessel = null; + public static final HSItemEssenceVesselBlood essence_vessel_blood = null; + public static final HSItemEssenceVesselSoul essence_vessel_soul = null; - @GameRegistry.ObjectHolder("wooden_scythe") - public static HSToolScythe wooden_scythe; - @GameRegistry.ObjectHolder("stone_scythe") - public static HSToolScythe stone_scythe; - @GameRegistry.ObjectHolder("iron_scythe") - public static HSToolScythe iron_scythe; - @GameRegistry.ObjectHolder("golden_scythe") - public static HSToolScythe golden_scythe; - @GameRegistry.ObjectHolder("diamond_scythe") - public static HSToolScythe diamond_scythe; - @GameRegistry.ObjectHolder("biomass_scythe") - public static HSToolScythe biomass_scythe; - @GameRegistry.ObjectHolder("livingmetal_scythe") - public static HSToolScythe livingmetal_scythe; - @GameRegistry.ObjectHolder("reaper_scythe") - public static HSToolScythe reaper_scythe; - @GameRegistry.ObjectHolder("lady_harken_scythe") - public static HSToolScythe lady_harken_scythe; + public static final HSToolScythe wooden_scythe = null; + public static final HSToolScythe stone_scythe = null; + public static final HSToolScythe iron_scythe = null; + public static final HSToolScythe golden_scythe = null; + public static final HSToolScythe diamond_scythe = null; + public static final HSToolScythe biomass_scythe = null; + public static final HSToolScythe livingmetal_scythe = null; + public static final HSToolScythe reaper_scythe = null; + public static final HSToolScythe lady_harken_scythe = null; - @GameRegistry.ObjectHolder("wooden_glaive") - public static HSToolGlaive wooden_glaive; - @GameRegistry.ObjectHolder("stone_glaive") - public static HSToolGlaive stone_glaive; - @GameRegistry.ObjectHolder("iron_glaive") - public static HSToolGlaive iron_glaive; - @GameRegistry.ObjectHolder("golden_glaive") - public static HSToolGlaive golden_glaive; - @GameRegistry.ObjectHolder("diamond_glaive") - public static HSToolGlaive diamond_glaive; - @GameRegistry.ObjectHolder("biomass_glaive") - public static HSToolGlaive biomass_glaive; - @GameRegistry.ObjectHolder("livingmetal_glaive") - public static HSToolGlaive livingmetal_glaive; + public static final HSToolGlaive wooden_glaive = null; + public static final HSToolGlaive stone_glaive = null; + public static final HSToolGlaive iron_glaive = null; + public static final HSToolGlaive golden_glaive = null; + public static final HSToolGlaive diamond_glaive = null; + public static final HSToolGlaive biomass_glaive = null; + public static final HSToolGlaive livingmetal_glaive = null; - @GameRegistry.ObjectHolder("blood_essence") - public static HSItem blood_essence; - @GameRegistry.ObjectHolder("soul_essence") - public static HSItem soul_essence; - @GameRegistry.ObjectHolder("abyssal_fragment") - public static HSItem abyssal_fragment; + public static final HSItem blood_essence = null; + public static final HSItem soul_essence = null; + public static final HSItem abyssal_fragment = null; - @GameRegistry.ObjectHolder("ancient_necronomicon") - public static HSItemNecronomicon ancient_necronomicon; - @GameRegistry.ObjectHolder("ancient_necronomicon_page") - public static HSItem ancient_necronomicon_page; - @GameRegistry.ObjectHolder("carnage_book") - public static HSItem carnage_book; - @GameRegistry.ObjectHolder("shadow_book") - public static HSItem shadow_book; + public static final HSItemNecronomicon ancient_necronomicon = null; + public static final HSItem ancient_necronomicon_page = null; + public static final HSItem carnage_book = null; + public static final HSItem shadow_book = null; - @GameRegistry.ObjectHolder("creepball") - public static HSItemCreepball creepball; - @GameRegistry.ObjectHolder("biomass_seed") - public static HSItem biomass_seed; - @GameRegistry.ObjectHolder("germinated_biomass_seed") - public static HSItemBiomassSeedGerminated germinated_biomass_seed; - @GameRegistry.ObjectHolder("biomass") - public static HSItem biomass; - @GameRegistry.ObjectHolder("biomass_sword") - public static HSToolSword biomass_sword; - @GameRegistry.ObjectHolder("biomass_shovel") - public static HSToolShovel biomass_shovel; - @GameRegistry.ObjectHolder("biomass_pickaxe") - public static HSToolPickaxe biomass_pickaxe; - @GameRegistry.ObjectHolder("biomass_axe") - public static HSToolAxe biomass_axe; - @GameRegistry.ObjectHolder("biomass_hoe") - public static HSToolHoe biomass_hoe; - @GameRegistry.ObjectHolder("biomass_helmet") - public static HSArmor biomass_helmet; - @GameRegistry.ObjectHolder("biomass_chestplate") - public static HSArmor biomass_chestplate; - @GameRegistry.ObjectHolder("biomass_leggings") - public static HSArmor biomass_leggings; - @GameRegistry.ObjectHolder("biomass_boots") - public static HSArmor biomass_boots; + public static final HSItemCreepball creepball = null; + public static final HSItem biomass_seed = null; + public static final HSItemBiomassSeedGerminated germinated_biomass_seed = null; + public static final HSItem biomass = null; + public static final HSToolSword biomass_sword = null; + public static final HSToolShovel biomass_shovel = null; + public static final HSToolPickaxe biomass_pickaxe = null; + public static final HSToolAxe biomass_axe = null; + public static final HSToolHoe biomass_hoe = null; + public static final HSArmor biomass_helmet = null; + public static final HSArmor biomass_chestplate = null; + public static final HSArmor biomass_leggings = null; + public static final HSArmor biomass_boots = null; - @GameRegistry.ObjectHolder("livingmetal_ingot") - public static HSItem livingmetal_ingot; - @GameRegistry.ObjectHolder("livingmetal_sword") - public static HSToolSword livingmetal_sword; - @GameRegistry.ObjectHolder("livingmetal_shovel") - public static HSToolShovel livingmetal_shovel; - @GameRegistry.ObjectHolder("livingmetal_pickaxe") - public static HSToolPickaxe livingmetal_pickaxe; - @GameRegistry.ObjectHolder("livingmetal_axe") - public static HSToolAxe livingmetal_axe; - @GameRegistry.ObjectHolder("livingmetal_hoe") - public static HSToolHoe livingmetal_hoe; - @GameRegistry.ObjectHolder("livingmetal_shears") - public static HSToolShears livingmetal_shears; - @GameRegistry.ObjectHolder("livingmetal_helmet") - public static HSArmor livingmetal_helmet; - @GameRegistry.ObjectHolder("livingmetal_chestplate") - public static HSArmor livingmetal_chestplate; - @GameRegistry.ObjectHolder("livingmetal_leggings") - public static HSArmor livingmetal_leggings; - @GameRegistry.ObjectHolder("livingmetal_boots") - public static HSArmor livingmetal_boots; + public static final HSItem livingmetal_ingot = null; + public static final HSToolSword livingmetal_sword = null; + public static final HSToolShovel livingmetal_shovel = null; + public static final HSToolPickaxe livingmetal_pickaxe = null; + public static final HSToolAxe livingmetal_axe = null; + public static final HSToolHoe livingmetal_hoe = null; + public static final HSToolShears livingmetal_shears = null; + public static final HSArmor livingmetal_helmet = null; + public static final HSArmor livingmetal_chestplate = null; + public static final HSArmor livingmetal_leggings = null; + public static final HSArmor livingmetal_boots = null; - @GameRegistry.ObjectHolder("soul_cake") - public static HSItemBlockSpecial soul_cake; - @GameRegistry.ObjectHolder("soul_cookie") - public static HSItemFood soul_cookie; + public static final HSItemBlockSpecial soul_cake = null; + public static final HSItemFood soul_cookie = null; - @GameRegistry.ObjectHolder("blunt_harken_blade") - public static HSItem blunt_harken_blade; - @GameRegistry.ObjectHolder("harken_athame") - public static HSToolAthame harken_athame; + public static final HSItem blunt_harken_blade = null; + public static final HSToolAthame harken_athame = null; - @GameRegistry.ObjectHolder("unpowered_totem_of_undying") - public static HSItem unpowered_totem_of_undying; + public static final HSItem unpowered_totem_of_undying = null; - @GameRegistry.ObjectHolder("dimensional_mirror") - public static HSItemDimensionalMirror dimensional_mirror; + public static final HSItemDimensionalMirror dimensional_mirror = null; - @GameRegistry.ObjectHolder("spectral_pickaxe") - public static HSToolPickaxe spectral_pickaxe; + public static final HSToolPickaxe spectral_pickaxe = null; - @GameRegistry.ObjectHolder("damaged_vampire_knife") - public static HSItem damaged_vampire_knife; - @GameRegistry.ObjectHolder("vampire_knife") - public static HSToolVampireKnife vampire_knife; - @GameRegistry.ObjectHolder("vampire_knife_projectile") - public static HSItem vampire_knife_projectile; + public static final HSItem damaged_vampire_knife = null; + public static final HSToolVampireKnife vampire_knife = null; + public static final HSItem vampire_knife_projectile = null; - @GameRegistry.ObjectHolder("spectral_glass_bottle") - public static HSItemSpectralBottle spectral_glass_bottle; - @GameRegistry.ObjectHolder("spectral_potion_affliction") - public static HSItemSpectralPotion spectral_potion_affliction; - @GameRegistry.ObjectHolder("spectral_potion_flame") - public static HSItemSpectralPotion spectral_potion_flame; - @GameRegistry.ObjectHolder("spectral_potion_purifying") - public static HSItemSpectralPotion spectral_potion_purifying; - @GameRegistry.ObjectHolder("spectral_potion_water") - public static HSItemSpectralPotion spectral_potion_water; + public static final HSItemSpectralBottle spectral_glass_bottle = null; + public static final HSItemSpectralPotion spectral_potion_affliction = null; + public static final HSItemSpectralPotion spectral_potion_flame = null; + public static final HSItemSpectralPotion spectral_potion_purifying = null; + public static final HSItemSpectralPotion spectral_potion_water = null; - @GameRegistry.ObjectHolder("bloodweave_hood") - public static HSArmorDyeable bloodweave_hood; - @GameRegistry.ObjectHolder("bloodweave_robe") - public static HSArmorDyeable bloodweave_robe; - @GameRegistry.ObjectHolder("bloodweave_pants") - public static HSArmorDyeable bloodweave_pants; - @GameRegistry.ObjectHolder("bloodweave_shoes") - public static HSArmorDyeable bloodweave_shoes; - @GameRegistry.ObjectHolder("soulweave_hood") - public static HSArmorDyeable soulweave_hood; - @GameRegistry.ObjectHolder("soulweave_robe") - public static HSArmorDyeable soulweave_robe; - @GameRegistry.ObjectHolder("soulweave_pants") - public static HSArmorDyeable soulweave_pants; - @GameRegistry.ObjectHolder("soulweave_shoes") - public static HSArmorDyeable soulweave_shoes; + public static final HSArmorDyeable bloodweave_hood = null; + public static final HSArmorDyeable bloodweave_robe = null; + public static final HSArmorDyeable bloodweave_pants = null; + public static final HSArmorDyeable bloodweave_shoes = null; + public static final HSArmorDyeable soulweave_hood = null; + public static final HSArmorDyeable soulweave_robe = null; + public static final HSArmorDyeable soulweave_pants = null; + public static final HSArmorDyeable soulweave_shoes = null; - @GameRegistry.ObjectHolder("reaper_guidebook") - public static HSItem reaper_guidebook; - - public static ArmorMaterial ARMOR_BIOMASS = EnumHelper.addArmorMaterial("hs_armor_biomass", "biomass", 14, new int[] {1, 4, 5, 2}, 17, SoundEvents.BLOCK_CHORUS_FLOWER_GROW, 0.5F).setRepairItem(new ItemStack(biomass)); - public static ArmorMaterial ARMOR_LIVINGMETAL = EnumHelper.addArmorMaterial("hs_armor_livingmetal", "livingmetal", 24, new int[] {2, 5, 6, 2}, 20, SoundEvents.ITEM_ARMOR_EQUIP_IRON, 1.0F).setRepairItem(new ItemStack(livingmetal_ingot)); - public static ArmorMaterial ARMOR_BLOODWEAVE = EnumHelper.addArmorMaterial("hs_armor_bloodweave", "bloodweave", 15, new int[] {1, 2, 3, 1}, 15, SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, 0.0F).setRepairItem(new ItemStack(Item.getItemFromBlock(HSBlocks.bloodweave_cloth))); - public static ArmorMaterial ARMOR_SOULWEAVE = EnumHelper.addArmorMaterial("hs_armor_soulweave", "soulweave", 15, new int[] {1, 2, 3, 1}, 15, SoundEvents.ITEM_ARMOR_EQUIP_LEATHER, 0.0F).setRepairItem(new ItemStack(Item.getItemFromBlock(HSBlocks.soulweave_cloth))); - - public static ToolMaterial TOOL_ATHAME_BASIC = EnumHelper.addToolMaterial("hs_tool_athame_basic", 2, 250, 6.0F, -1.5F, 14).setRepairItem(new ItemStack(Items.IRON_INGOT)); - public static ToolMaterial TOOL_BIOMASS = EnumHelper.addToolMaterial("hs_tool_biomass", 3, 151, 6.5F, 1.5F, 17).setRepairItem(new ItemStack(biomass)); - public static ToolMaterial TOOL_LIVINGMETAL = EnumHelper.addToolMaterial("hs_tool_livingmetal", 3, 481, 7.5F, 2.5F, 20).setRepairItem(new ItemStack(livingmetal_ingot)); - public static ToolMaterial TOOL_REAPER = EnumHelper.addToolMaterial("hs_tool_reaper", 4, 2466, 9.0F, 6.0F, 25).setRepairItem(new ItemStack(Items.BONE)); - public static ToolMaterial TOOL_SPECTRAL = EnumHelper.addToolMaterial("hs_tool_spectral", 4, 2466, 9.0F, 6.0F, 25).setRepairItem(new ItemStack(soul_essence)); - public static ToolMaterial TOOL_LADY_HARKEN = EnumHelper.addToolMaterial("hs_tool_lady_harken", 4, 2466, 9.0F, 6.0F, 25).setRepairItem(new ItemStack(soul_essence)); - - // Non-Repairable - public static ToolMaterial TOOL_VAMPIRE_KNIFE = EnumHelper.addToolMaterial("hs_tool_vampire_knife", 4, HSConfig.ITEMS.vampireKnifeMaxCharges, 9.0F, 0.0F, 25); + public static final HSItem reaper_guidebook = null; @SubscribeEvent public static void onRegisterItemsEvent(@Nonnull final RegistryEvent.Register event) @@ -248,17 +151,17 @@ public static void onRegisterItemsEvent(@Nonnull final RegistryEvent.Register onItemRightClick(World world, EntityPlayer player @Override public void onUpdate(ItemStack stack, World world, Entity entity, int itemSlot, boolean isSelected) { - if (stack.isItemDamaged() && this.getToolMaterial() == HSItems.TOOL_BIOMASS && entity.ticksExisted % 1200 == 0) + if (stack.isItemDamaged() && this.getToolMaterial() == HSMaterials.TOOL_BIOMASS && entity.ticksExisted % 1200 == 0) { stack.setItemDamage(stack.getItemDamage() - world.rand.nextInt(3)); } diff --git a/src/main/java/mod/emt/harkenscythe/item/tool/HSToolHoe.java b/src/main/java/mod/emt/harkenscythe/item/tool/HSToolHoe.java index 79b8075..cca585e 100644 --- a/src/main/java/mod/emt/harkenscythe/item/tool/HSToolHoe.java +++ b/src/main/java/mod/emt/harkenscythe/item/tool/HSToolHoe.java @@ -6,7 +6,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; -import mod.emt.harkenscythe.init.HSItems; +import mod.emt.harkenscythe.init.HSMaterials; @SuppressWarnings("deprecation") public class HSToolHoe extends ItemHoe implements IHSTool @@ -24,7 +24,7 @@ public HSToolHoe(ToolMaterial material, EnumRarity rarity) @Override public void onUpdate(ItemStack stack, World world, Entity entity, int itemSlot, boolean isSelected) { - if (stack.isItemDamaged() && this.getToolMaterial() == HSItems.TOOL_BIOMASS && entity.ticksExisted % 1200 == 0) + if (stack.isItemDamaged() && this.getToolMaterial() == HSMaterials.TOOL_BIOMASS && entity.ticksExisted % 1200 == 0) { stack.setItemDamage(stack.getItemDamage() - world.rand.nextInt(3)); } diff --git a/src/main/java/mod/emt/harkenscythe/item/tool/HSToolPickaxe.java b/src/main/java/mod/emt/harkenscythe/item/tool/HSToolPickaxe.java index 105f754..fbccc6b 100644 --- a/src/main/java/mod/emt/harkenscythe/item/tool/HSToolPickaxe.java +++ b/src/main/java/mod/emt/harkenscythe/item/tool/HSToolPickaxe.java @@ -6,7 +6,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; -import mod.emt.harkenscythe.init.HSItems; +import mod.emt.harkenscythe.init.HSMaterials; @SuppressWarnings("deprecation") public class HSToolPickaxe extends ItemPickaxe implements IHSTool @@ -24,7 +24,7 @@ public HSToolPickaxe(ToolMaterial material, EnumRarity rarity) @Override public void onUpdate(ItemStack stack, World world, Entity entity, int itemSlot, boolean isSelected) { - if (stack.isItemDamaged() && this.getToolMaterial() == HSItems.TOOL_BIOMASS && entity.ticksExisted % 1200 == 0) + if (stack.isItemDamaged() && this.getToolMaterial() == HSMaterials.TOOL_BIOMASS && entity.ticksExisted % 1200 == 0) { stack.setItemDamage(stack.getItemDamage() - world.rand.nextInt(3)); } diff --git a/src/main/java/mod/emt/harkenscythe/item/tool/HSToolScythe.java b/src/main/java/mod/emt/harkenscythe/item/tool/HSToolScythe.java index af30412..31cf518 100644 --- a/src/main/java/mod/emt/harkenscythe/item/tool/HSToolScythe.java +++ b/src/main/java/mod/emt/harkenscythe/item/tool/HSToolScythe.java @@ -27,6 +27,7 @@ import mod.emt.harkenscythe.block.HSBlockBiomassCrop; import mod.emt.harkenscythe.init.HSBlocks; import mod.emt.harkenscythe.init.HSItems; +import mod.emt.harkenscythe.init.HSMaterials; import mod.emt.harkenscythe.init.HSSoundEvents; import mod.emt.harkenscythe.util.HSDamageSource; @@ -57,7 +58,7 @@ public ActionResult onItemRightClick(World world, EntityPlayer player @Override public void onUpdate(ItemStack stack, World world, Entity entity, int itemSlot, boolean isSelected) { - if (stack.isItemDamaged() && this.getToolMaterial() == HSItems.TOOL_BIOMASS && entity.ticksExisted % 1200 == 0) + if (stack.isItemDamaged() && this.getToolMaterial() == HSMaterials.TOOL_BIOMASS && entity.ticksExisted % 1200 == 0) { stack.setItemDamage(stack.getItemDamage() - world.rand.nextInt(3)); } diff --git a/src/main/java/mod/emt/harkenscythe/item/tool/HSToolShears.java b/src/main/java/mod/emt/harkenscythe/item/tool/HSToolShears.java index 6f96a6a..ecef74c 100644 --- a/src/main/java/mod/emt/harkenscythe/item/tool/HSToolShears.java +++ b/src/main/java/mod/emt/harkenscythe/item/tool/HSToolShears.java @@ -10,6 +10,7 @@ import net.minecraft.world.World; import mod.emt.harkenscythe.init.HSItems; +import mod.emt.harkenscythe.init.HSMaterials; @SuppressWarnings("deprecation") public class HSToolShears extends ItemShears implements IHSTool @@ -28,7 +29,7 @@ public HSToolShears(int durability, EnumRarity rarity, Ingredient repairMaterial @Override public void onUpdate(ItemStack stack, World world, Entity entity, int itemSlot, boolean isSelected) { - if (stack.isItemDamaged() && this.getToolMaterial() == HSItems.TOOL_BIOMASS && entity.ticksExisted % 1200 == 0) + if (stack.isItemDamaged() && this.getToolMaterial() == HSMaterials.TOOL_BIOMASS && entity.ticksExisted % 1200 == 0) { stack.setItemDamage(stack.getItemDamage() - world.rand.nextInt(3)); } @@ -65,6 +66,6 @@ public float getDestroySpeed(ItemStack stack, IBlockState state) @Override public ToolMaterial getToolMaterial() { - return this.repairMaterial == Ingredient.fromStacks(new ItemStack(HSItems.livingmetal_ingot)) ? HSItems.TOOL_LIVINGMETAL : null; + return this.repairMaterial == Ingredient.fromStacks(new ItemStack(HSItems.livingmetal_ingot)) ? HSMaterials.TOOL_LIVINGMETAL : null; } } diff --git a/src/main/java/mod/emt/harkenscythe/item/tool/HSToolShovel.java b/src/main/java/mod/emt/harkenscythe/item/tool/HSToolShovel.java index a1bb5f4..4a5c1fd 100644 --- a/src/main/java/mod/emt/harkenscythe/item/tool/HSToolShovel.java +++ b/src/main/java/mod/emt/harkenscythe/item/tool/HSToolShovel.java @@ -6,7 +6,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; -import mod.emt.harkenscythe.init.HSItems; +import mod.emt.harkenscythe.init.HSMaterials; @SuppressWarnings("deprecation") public class HSToolShovel extends ItemSpade implements IHSTool @@ -24,7 +24,7 @@ public HSToolShovel(ToolMaterial material, EnumRarity rarity) @Override public void onUpdate(ItemStack stack, World world, Entity entity, int itemSlot, boolean isSelected) { - if (stack.isItemDamaged() && this.getToolMaterial() == HSItems.TOOL_BIOMASS && entity.ticksExisted % 1200 == 0) + if (stack.isItemDamaged() && this.getToolMaterial() == HSMaterials.TOOL_BIOMASS && entity.ticksExisted % 1200 == 0) { stack.setItemDamage(stack.getItemDamage() - world.rand.nextInt(3)); } diff --git a/src/main/java/mod/emt/harkenscythe/item/tool/HSToolSpectralPickaxe.java b/src/main/java/mod/emt/harkenscythe/item/tool/HSToolSpectralPickaxe.java index 828c37d..6f4f26a 100644 --- a/src/main/java/mod/emt/harkenscythe/item/tool/HSToolSpectralPickaxe.java +++ b/src/main/java/mod/emt/harkenscythe/item/tool/HSToolSpectralPickaxe.java @@ -6,7 +6,7 @@ import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.item.EnumRarity; -import mod.emt.harkenscythe.init.HSItems; +import mod.emt.harkenscythe.init.HSMaterials; public class HSToolSpectralPickaxe extends HSToolPickaxe implements IHSTool { @@ -14,7 +14,7 @@ public class HSToolSpectralPickaxe extends HSToolPickaxe implements IHSTool public HSToolSpectralPickaxe() { - super(HSItems.TOOL_SPECTRAL, EnumRarity.EPIC); + super(HSMaterials.TOOL_SPECTRAL, EnumRarity.EPIC); this.reach = new AttributeModifier("14D707B8-D3E8-4BDa-8C54-F196F80B5C94", 3.0F, 0); } diff --git a/src/main/java/mod/emt/harkenscythe/item/tool/HSToolSword.java b/src/main/java/mod/emt/harkenscythe/item/tool/HSToolSword.java index 3802a17..a39d507 100644 --- a/src/main/java/mod/emt/harkenscythe/item/tool/HSToolSword.java +++ b/src/main/java/mod/emt/harkenscythe/item/tool/HSToolSword.java @@ -6,7 +6,7 @@ import net.minecraft.item.ItemSword; import net.minecraft.world.World; -import mod.emt.harkenscythe.init.HSItems; +import mod.emt.harkenscythe.init.HSMaterials; @SuppressWarnings("deprecation") public class HSToolSword extends ItemSword implements IHSTool @@ -24,7 +24,7 @@ public HSToolSword(ToolMaterial material, EnumRarity rarity) @Override public void onUpdate(ItemStack stack, World world, Entity entity, int itemSlot, boolean isSelected) { - if (stack.isItemDamaged() && this.getToolMaterial() == HSItems.TOOL_BIOMASS && entity.ticksExisted % 1200 == 0) + if (stack.isItemDamaged() && this.getToolMaterial() == HSMaterials.TOOL_BIOMASS && entity.ticksExisted % 1200 == 0) { stack.setItemDamage(stack.getItemDamage() - world.rand.nextInt(3)); }