Skip to content

Commit

Permalink
add deepslate ore
Browse files Browse the repository at this point in the history
  • Loading branch information
maggi373 committed Dec 25, 2024
1 parent 89faa31 commit a1a6176
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
12 changes: 12 additions & 0 deletions src/main/java/electroblob/wizardry/Wizardry.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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<ItemStack> itemSorter;
private static Comparator<ItemStack> spellItemSorter;
//private static Pattern entityNamePattern;
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -526,6 +531,8 @@ public void onCreated(ItemStack par1ItemStack, World par2World, EntityPlayer ent

@EventHandler
public void preInit(FMLPreInitializationEvent event){

isEFRLoaded = Loader.isModLoaded("etfuturum");

expandPotionTypesArray();

Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions src/main/java/electroblob/wizardry/WizardryRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/assets/wizardry/lang/en_US.lang
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit a1a6176

Please sign in to comment.