diff --git a/src/main/java/electroblob/wizardry/Wizardry.java b/src/main/java/electroblob/wizardry/Wizardry.java index 495ca9661..6ccc56793 100644 --- a/src/main/java/electroblob/wizardry/Wizardry.java +++ b/src/main/java/electroblob/wizardry/Wizardry.java @@ -14,6 +14,7 @@ import cpw.mods.fml.client.event.ConfigChangedEvent; import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; @@ -67,6 +68,7 @@ import electroblob.wizardry.potion.PotionFrost; import electroblob.wizardry.potion.PotionMagicEffect; import electroblob.wizardry.spell.Spell; +import ganymedes01.etfuturum.api.DeepslateOreRegistry; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; @@ -268,6 +270,8 @@ public class Wizardry { /** The id of the flaming weapon enchantment. */ private static int freezingWeaponEnchantmentID = 103; + public static boolean isEFRLoaded; + private static Comparator itemSorter; private static Comparator spellItemSorter; //private static Pattern entityNamePattern; @@ -313,6 +317,7 @@ public void displayAllReleventItems(List items) { // Blocks public final static Block arcaneWorkbench = new BlockArcaneWorkbench().setHardness(1.0F).setBlockName("arcaneWorkbench").setCreativeTab(tabWizardry); public final static Block crystalOre = new BlockCrystalOre(Material.rock).setHardness(3.0F).setBlockName("crystalOre").setCreativeTab(tabWizardry).setBlockTextureName("wizardry:crystal_ore"); + public final static Block deepslatecrystalOre = new BlockCrystalOre(Material.rock).setHardness(5.0F).setBlockName("deepslatecrystalOre").setCreativeTab(tabWizardry).setBlockTextureName("wizardry:deepslate_crystal_ore"); public final static Block petrifiedStone = new BlockStatue(Material.rock).setHardness(1.5F).setResistance(10.0F).setBlockName("petrifiedStone").setBlockTextureName("minecraft:stone"); public final static Block iceStatue = new BlockStatue(Material.ice).setHardness(0.5F).setLightOpacity(3).setStepSound(Block.soundTypeGlass).setBlockName("iceStatue").setBlockTextureName("minecraft:ice"); public final static Block magicLight = new BlockMagicLight(Material.circuits).setBlockName("magicLight").setBlockTextureName("minecraft:beacon"); @@ -526,6 +531,8 @@ public void onCreated(ItemStack par1ItemStack, World par2World, EntityPlayer ent @EventHandler public void preInit(FMLPreInitializationEvent event){ + + isEFRLoaded = Loader.isModLoaded("etfuturum"); expandPotionTypesArray(); @@ -580,6 +587,7 @@ public void preInit(FMLPreInitializationEvent event){ Item.getItemFromBlock(arcaneWorkbench), Item.getItemFromBlock(crystalOre), + Item.getItemFromBlock(deepslatecrystalOre), Item.getItemFromBlock(crystalBlock), Item.getItemFromBlock(crystalFlower), Item.getItemFromBlock(transportationStone), @@ -661,6 +669,10 @@ public void init(FMLInitializationEvent event){ @EventHandler public void postInit(FMLPostInitializationEvent event){ + + if(isEFRLoaded){ + DeepslateOreRegistry.addOre(crystalOre, deepslatecrystalOre); + } // To ensure backwards compatibility, the spell books and scrolls themselves are now sorted in the creative tab, // and the spells are left in whatever order they were registered. //Spell.sortSpells(); diff --git a/src/main/java/electroblob/wizardry/WizardryRegistry.java b/src/main/java/electroblob/wizardry/WizardryRegistry.java index 3df9ae9be..3645a8c0d 100644 --- a/src/main/java/electroblob/wizardry/WizardryRegistry.java +++ b/src/main/java/electroblob/wizardry/WizardryRegistry.java @@ -157,6 +157,7 @@ public static void registerBlocks(){ GameRegistry.registerBlock(Wizardry.arcaneWorkbench, "arcane_workbench"); GameRegistry.registerBlock(Wizardry.crystalOre, "crystal_ore"); + GameRegistry.registerBlock(Wizardry.deepslatecrystalOre, "deepslate_crystal_ore"); GameRegistry.registerBlock(Wizardry.petrifiedStone, "petrified_stone"); GameRegistry.registerBlock(Wizardry.iceStatue, "ice_statue"); GameRegistry.registerBlock(Wizardry.magicLight, "magic_light"); diff --git a/src/main/java/electroblob/wizardry/block/BlockCrystalOre.java b/src/main/java/electroblob/wizardry/block/BlockCrystalOre.java index 0b572cc49..ba4299411 100644 --- a/src/main/java/electroblob/wizardry/block/BlockCrystalOre.java +++ b/src/main/java/electroblob/wizardry/block/BlockCrystalOre.java @@ -12,7 +12,6 @@ public class BlockCrystalOre extends Block { public BlockCrystalOre(Material material) { super(material); setStepSound(Block.soundTypeStone); - setBlockName("crystalOre"); setResistance(5.0F); setHarvestLevel("pickaxe", 2); } diff --git a/src/main/resources/assets/wizardry/lang/en_US.lang b/src/main/resources/assets/wizardry/lang/en_US.lang index 109dfca53..48d60f57c 100644 --- a/src/main/resources/assets/wizardry/lang/en_US.lang +++ b/src/main/resources/assets/wizardry/lang/en_US.lang @@ -1,5 +1,6 @@ tile.arcaneWorkbench.name=Arcane Workbench tile.crystalOre.name=Crystal Ore +tile.deepslatecrystalOre.name=Deepslate Crystal Ore tile.petrifiedStone.name=Petrified Stone tile.iceStatue.name=Ice Statue tile.crystalFlower.name=Crystal Flower