Condensed code
Including world generation
This commit is contained in:
parent
693e7804b4
commit
590c74a5fc
25 changed files with 258 additions and 548 deletions
|
|
@ -3,6 +3,7 @@ package mysticores.blocks;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import mysticores.MysticOres;
|
||||
import mysticores.items.Items;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
|
@ -24,7 +25,7 @@ public class BlockBase extends Block {
|
|||
|
||||
public BlockBase(int ID) {
|
||||
super(ID, Material.rock);
|
||||
setCreativeTab(mysticores.MysticOres.MysticOresTab);
|
||||
setCreativeTab(MysticOres.MysticOresTab);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -41,9 +42,7 @@ public class BlockBase extends Block {
|
|||
case 7:
|
||||
return 10;
|
||||
case 8:
|
||||
return 0;
|
||||
case 9:
|
||||
return 0;
|
||||
case 10:
|
||||
return 0;
|
||||
case 11:
|
||||
|
|
@ -106,14 +105,12 @@ public class BlockBase extends Block {
|
|||
public int idDropped(int par1, Random random, int par3) {
|
||||
switch (par1) {
|
||||
case 1:
|
||||
return Items.Resource.itemID;
|
||||
case 2:
|
||||
return Items.Resource.itemID;
|
||||
case 4:
|
||||
return Items.Resource.itemID;
|
||||
case 5:
|
||||
return Items.Resource.itemID;
|
||||
case 7:
|
||||
case 11:
|
||||
case 12:
|
||||
return Items.Resource.itemID;
|
||||
case 8:
|
||||
return this.BlackSoulstoneDrops(par1, random, par3);
|
||||
|
|
@ -121,10 +118,6 @@ public class BlockBase extends Block {
|
|||
return this.BlueSoulstoneDrops(par1, random, par3);
|
||||
case 10:
|
||||
return this.RedSoulstoneDrops(par1, random, par3);
|
||||
case 11:
|
||||
return Items.Resource.itemID;
|
||||
case 12:
|
||||
return Items.Resource.itemID;
|
||||
default:
|
||||
return blockID;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
package mysticores.blocks;
|
||||
|
||||
import mysticores.lib.BlockID;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class BlockHandler {
|
||||
public static Block BlockBase;
|
||||
public static int BASEID = 540;
|
||||
|
||||
public static void Initialize() {
|
||||
BlockBase = new BlockBase(BlockID.BASEID).setStepSound(Block.soundStoneFootstep);
|
||||
public static void initialize() {
|
||||
BlockBase = new BlockBase(BASEID).setStepSound(Block.soundStoneFootstep);
|
||||
GameRegistry.registerBlock(BlockBase, ItemBase.class, "Base Blocks");
|
||||
setBlockHarvestLevels();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
package mysticores.items;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import cpw.mods.fml.common.IFuelHandler;
|
||||
|
||||
public class IridiumFuelHandler implements IFuelHandler
|
||||
{
|
||||
public int getBurnTime(ItemStack fuel)
|
||||
{
|
||||
if(fuel.getItemDamage() == 4)
|
||||
return 12800;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -37,7 +37,7 @@ public class Items {
|
|||
public static Item Resource;
|
||||
public static Item Satchel;
|
||||
|
||||
public static void Initialize() {
|
||||
public static void initialize() {
|
||||
Resource = new ItemResource(ItemID.RESOURCES);
|
||||
VerditeSword = new ItemSwords(ItemID.VERDITESWORD, EnumTools.verditeToolMaterial).setUnlocalizedName("VerditeSword");
|
||||
VerditePickaxe = new ItemPickaxes(ItemID.VERDITEPICKAXE, EnumTools.verditeToolMaterial).setUnlocalizedName("VerditePickaxe");
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
package mysticores.lib;
|
||||
|
||||
public class BlockID
|
||||
{
|
||||
public static int BASEID;
|
||||
|
||||
public static int BASEID_DEFAULT = 540;
|
||||
}
|
||||
|
|
@ -1,71 +1,36 @@
|
|||
package mysticores.lib;
|
||||
|
||||
public class ItemID
|
||||
{
|
||||
public static int VERDITESWORD;
|
||||
public static int VERDITEPICKAXE;
|
||||
public static int VERDITESHOVEL;
|
||||
public static int VERDITEAXE;
|
||||
public static int VERDITEHOE;
|
||||
public static int MITHRILSWORD;
|
||||
public static int MITHRILPICKAXE;
|
||||
public static int MITHRILSHOVEL;
|
||||
public static int MITHRILAXE;
|
||||
public static int MITHRILHOE;
|
||||
public static int ADAMANTINESWORD;
|
||||
public static int ADAMANTINEPICKAXE;
|
||||
public static int ADAMANTINESHOVEL;
|
||||
public static int ADAMANTINEAXE;
|
||||
public static int ADAMANTINEHOE;
|
||||
public static int IRIDIUMSWORD;
|
||||
public static int IRIDIUMPICKAXE;
|
||||
public static int IRIDIUMSHOVEL;
|
||||
public static int IRIDIUMAXE;
|
||||
public static int IRIDIUMHOE;
|
||||
public static int OBSIDIANSWORD;
|
||||
public static int OBSIDIANPICKAXE;
|
||||
public static int OBSIDIANSHOVEL;
|
||||
public static int OBSIDIANAXE;
|
||||
public static int OBSIDIANHOE;
|
||||
public static int BLOODSTONESWORD;
|
||||
public static int BLOODSTONEPICKAXE;
|
||||
public static int BLOODSTONESHOVEL;
|
||||
public static int BLOODSTONEAXE;
|
||||
public static int BLOODSTONEHOE;
|
||||
public static int SATCHEL;
|
||||
public static int RESOURCES;
|
||||
|
||||
public static int VERDITESWORD_DEFAULT = 7050;
|
||||
public static int VERDITEPICKAXE_DEFAULT = 7051;
|
||||
public static int VERDITESHOVEL_DEFAULT = 7052;
|
||||
public static int VERDITEAXE_DEFAULT = 7053;
|
||||
public static int VERDITEHOE_DEFAULT = 7054;
|
||||
public static int MITHRILSWORD_DEFAULT = 7055;
|
||||
public static int MITHRILPICKAXE_DEFAULT = 7056;
|
||||
public static int MITHRILSHOVEL_DEFAULT = 7057;
|
||||
public static int MITHRILAXE_DEFAULT = 7058;
|
||||
public static int MITHRILHOE_DEFAULT = 7059;
|
||||
public static int ADAMANTINESWORD_DEFAULT = 7060;
|
||||
public static int ADAMANTINEPICKAXE_DEFAULT = 7061;
|
||||
public static int ADAMANTINESHOVEL_DEFAULT = 7062;
|
||||
public static int ADAMANTINEAXE_DEFAULT = 7063;
|
||||
public static int ADAMANTINEHOE_DEFAULT = 7064;
|
||||
public static int IRIDIUMSWORD_DEFAULT = 7065;
|
||||
public static int IRIDIUMPICKAXE_DEFAULT = 7066;
|
||||
public static int IRIDIUMSHOVEL_DEFAULT = 7067;
|
||||
public static int IRIDIUMAXE_DEFAULT = 7068;
|
||||
public static int IRIDIUMHOE_DEFAULT = 7069;
|
||||
public static int OBSIDIANSWORD_DEFAULT = 7070;
|
||||
public static int OBSIDIANPICKAXE_DEFAULT = 7071;
|
||||
public static int OBSIDIANSHOVEL_DEFAULT = 7072;
|
||||
public static int OBSIDIANAXE_DEFAULT = 7073;
|
||||
public static int OBSIDIANHOE_DEFAULT = 7074;
|
||||
public static int BLOODSTONESWORD_DEFAULT = 7075;
|
||||
public static int BLOODSTONEPICKAXE_DEFAULT = 7076;
|
||||
public static int BLOODSTONESHOVEL_DEFAULT = 7077;
|
||||
public static int BLOODSTONEAXE_DEFAULT = 7078;
|
||||
public static int BLOODSTONEHOE_DEFAULT = 7079;
|
||||
public static int SATCHEL_DEFAULT = 7080;
|
||||
public static int RESOURCES_DEFAULT = 7081;
|
||||
|
||||
public class ItemID {
|
||||
public static int VERDITESWORD = 7050;
|
||||
public static int VERDITEPICKAXE = 7051;
|
||||
public static int VERDITESHOVEL = 7052;
|
||||
public static int VERDITEAXE = 7053;
|
||||
public static int VERDITEHOE = 7054;
|
||||
public static int MITHRILSWORD = 7055;
|
||||
public static int MITHRILPICKAXE = 7056;
|
||||
public static int MITHRILSHOVEL = 7057;
|
||||
public static int MITHRILAXE = 7058;
|
||||
public static int MITHRILHOE = 7059;
|
||||
public static int ADAMANTINESWORD = 7060;
|
||||
public static int ADAMANTINEPICKAXE = 7061;
|
||||
public static int ADAMANTINESHOVEL = 7062;
|
||||
public static int ADAMANTINEAXE = 7063;
|
||||
public static int ADAMANTINEHOE = 7064;
|
||||
public static int IRIDIUMSWORD = 7065;
|
||||
public static int IRIDIUMPICKAXE = 7066;
|
||||
public static int IRIDIUMSHOVEL = 7067;
|
||||
public static int IRIDIUMAXE = 7068;
|
||||
public static int IRIDIUMHOE = 7069;
|
||||
public static int OBSIDIANSWORD = 7070;
|
||||
public static int OBSIDIANPICKAXE = 7071;
|
||||
public static int OBSIDIANSHOVEL = 7072;
|
||||
public static int OBSIDIANAXE = 7073;
|
||||
public static int OBSIDIANHOE = 7074;
|
||||
public static int BLOODSTONESWORD = 7075;
|
||||
public static int BLOODSTONEPICKAXE = 7076;
|
||||
public static int BLOODSTONESHOVEL = 7077;
|
||||
public static int BLOODSTONEAXE = 7078;
|
||||
public static int BLOODSTONEHOE = 7079;
|
||||
public static int SATCHEL = 7080;
|
||||
public static int RESOURCES = 7081;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,30 +1,16 @@
|
|||
package mysticores.lib;
|
||||
|
||||
public class Rarity
|
||||
{
|
||||
public static int VERDITE;
|
||||
public static int MITHRIL;
|
||||
public static int ADAMANTINE;
|
||||
public static int IRIDIUM;
|
||||
public static int AGATE;
|
||||
public static int AMETHYST;
|
||||
public static int TOPAZ;
|
||||
public static int TOURMALINE;
|
||||
public static int BLOODSTONE;
|
||||
public static int REDSOULSTONE;
|
||||
public static int BLUESOULSTONE;
|
||||
public static int BLACKSOULSTONE;
|
||||
|
||||
public static int VERDITE_DEFAULT = 10;
|
||||
public static int MITHRIL_DEFAULT = 3;
|
||||
public static int ADAMANTINE_DEFAULT = 2;
|
||||
public static int IRIDIUM_DEFAULT = 2;
|
||||
public static int AGATE_DEFAULT = 3;
|
||||
public static int AMETHYST_DEFAULT = 3;
|
||||
public static int TOPAZ_DEFAULT = 3;
|
||||
public static int TOURMALINE_DEFAULT = 3;
|
||||
public static int BLOODSTONE_DEFAULT = 2;
|
||||
public static int REDSOULSTONE_DEFAULT = 3;
|
||||
public static int BLUESOULSTONE_DEFAULT = 2;
|
||||
public static int BLACKSOULSTONE_DEFAULT = 3;
|
||||
public class Rarity {
|
||||
public static int VERDITE = 10;
|
||||
public static int MITHRIL = 3;
|
||||
public static int ADAMANTINE = 2;
|
||||
public static int IRIDIUM = 2;
|
||||
public static int AGATE = 3;
|
||||
public static int AMETHYST = 3;
|
||||
public static int TOPAZ = 3;
|
||||
public static int TOURMALINE = 3;
|
||||
public static int BLOODSTONE = 2;
|
||||
public static int REDSOULSTONE = 3;
|
||||
public static int BLUESOULSTONE = 2;
|
||||
public static int BLACKSOULSTONE = 3;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
package mysticores.lib;
|
||||
|
||||
public class Strings {
|
||||
|
||||
}
|
||||
|
|
@ -1,9 +1,6 @@
|
|||
package mysticores;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import mysticores.blocks.BlockHandler;
|
||||
import mysticores.items.IridiumFuelHandler;
|
||||
import mysticores.items.Items;
|
||||
import mysticores.util.ConfigurationManager;
|
||||
import mysticores.util.Localizations;
|
||||
|
|
@ -12,6 +9,8 @@ import mysticores.util.RecipeManager;
|
|||
import mysticores.util.TabMysticOres;
|
||||
import mysticores.worldgen.GeneratorManager;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import cpw.mods.fml.common.IFuelHandler;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.Mod.Instance;
|
||||
|
|
@ -19,23 +18,30 @@ import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
|||
import cpw.mods.fml.common.network.NetworkMod;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
@Mod(modid = "Mystic Ores", name = "Mystic Ores", version = "0.1")
|
||||
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
|
||||
public class MysticOres {
|
||||
@Instance("Mystic Ores")
|
||||
@Mod(modid = "MysticOres", name = "Mystic Ores", version = "0.1")
|
||||
@NetworkMod(clientSideRequired = true)
|
||||
public class MysticOres implements IFuelHandler {
|
||||
@Instance("MysticOres")
|
||||
public static MysticOres instance;
|
||||
public static CreativeTabs MysticOresTab = new TabMysticOres(CreativeTabs.getNextID(), "MysticOresTab");
|
||||
public static final CreativeTabs MysticOresTab = new TabMysticOres("MysticOresTab");
|
||||
|
||||
@Override
|
||||
public int getBurnTime(ItemStack fuel) {
|
||||
if (fuel.getItem().itemID == Items.Resource.itemID && fuel.getItemDamage() == 4)
|
||||
return 12800;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
ConfigurationManager.initialize(new File(event.getModConfigurationDirectory(), "Mystic Mods/Mystic Ores.cfg"));
|
||||
ConfigurationManager.save();
|
||||
BlockHandler.Initialize();
|
||||
Items.Initialize();
|
||||
RecipeManager.Initialize();
|
||||
OreDictManager.Initialize();
|
||||
GeneratorManager.Initialize();
|
||||
Localizations.Initialize();
|
||||
GameRegistry.registerFuelHandler(new IridiumFuelHandler());
|
||||
ConfigurationManager.initialize(event.getSuggestedConfigurationFile());
|
||||
BlockHandler.initialize();
|
||||
Items.initialize();
|
||||
OreDictManager.initialize();
|
||||
RecipeManager.initialize();
|
||||
GeneratorManager.initialize();
|
||||
Localizations.initialize();
|
||||
GameRegistry.registerFuelHandler(this);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,64 +2,58 @@ package mysticores.util;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import mysticores.lib.BlockID;
|
||||
import mysticores.blocks.BlockHandler;
|
||||
import mysticores.lib.ItemID;
|
||||
import mysticores.lib.Rarity;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
|
||||
public class ConfigurationManager {
|
||||
public static Configuration config;
|
||||
|
||||
public static void initialize(File file) {
|
||||
config = new Configuration(file);
|
||||
ItemID.RESOURCES = config.getItem("Resource Items", ItemID.RESOURCES_DEFAULT).getInt();
|
||||
ItemID.VERDITESWORD = config.getItem("Tools", "Verdite Sword", ItemID.VERDITESWORD_DEFAULT).getInt();
|
||||
ItemID.VERDITEPICKAXE = config.getItem("Tools", "Verdite Pickaxe", ItemID.VERDITEPICKAXE_DEFAULT).getInt();
|
||||
ItemID.VERDITESHOVEL = config.getItem("Tools", "Verdite Shovel", ItemID.VERDITESHOVEL_DEFAULT).getInt();
|
||||
ItemID.VERDITEAXE = config.getItem("Tools", "Verdite Axe", ItemID.VERDITEAXE_DEFAULT).getInt();
|
||||
ItemID.VERDITEHOE = config.getItem("Tools", "Verdite Hoe", ItemID.VERDITEHOE_DEFAULT).getInt();
|
||||
ItemID.MITHRILSWORD = config.getItem("Tools", "Mithril Sword", ItemID.MITHRILSWORD_DEFAULT).getInt();
|
||||
ItemID.MITHRILPICKAXE = config.getItem("Tools", "Mithril Pickaxe", ItemID.MITHRILPICKAXE_DEFAULT).getInt();
|
||||
ItemID.MITHRILSHOVEL = config.getItem("Tools", "Mithril Shovel", ItemID.MITHRILSHOVEL_DEFAULT).getInt();
|
||||
ItemID.MITHRILAXE = config.getItem("Tools", "Mithril Axe", ItemID.MITHRILAXE_DEFAULT).getInt();
|
||||
ItemID.MITHRILHOE = config.getItem("Tools", "Mithril Hoe", ItemID.MITHRILHOE_DEFAULT).getInt();
|
||||
ItemID.ADAMANTINESWORD = config.getItem("Tools", "Adamantine Sword", ItemID.ADAMANTINESWORD_DEFAULT).getInt();
|
||||
ItemID.ADAMANTINEPICKAXE = config.getItem("Tools", "Adamantine Pickaxe", ItemID.ADAMANTINEPICKAXE_DEFAULT).getInt();
|
||||
ItemID.ADAMANTINESHOVEL = config.getItem("Tools", "Adamantine Shovel", ItemID.ADAMANTINESHOVEL_DEFAULT).getInt();
|
||||
ItemID.ADAMANTINEAXE = config.getItem("Tools", "Adamantine Axe", ItemID.ADAMANTINEAXE_DEFAULT).getInt();
|
||||
ItemID.ADAMANTINEHOE = config.getItem("Tools", "Adamantine Hoe", ItemID.ADAMANTINEHOE_DEFAULT).getInt();
|
||||
ItemID.IRIDIUMSWORD = config.getItem("Tools", "Iridium Sword", ItemID.IRIDIUMSWORD_DEFAULT).getInt();
|
||||
ItemID.IRIDIUMPICKAXE = config.getItem("Tools", "Iridium Pickaxe", ItemID.IRIDIUMPICKAXE_DEFAULT).getInt();
|
||||
ItemID.IRIDIUMSHOVEL = config.getItem("Tools", "Iridium Shovel", ItemID.IRIDIUMSHOVEL_DEFAULT).getInt();
|
||||
ItemID.IRIDIUMAXE = config.getItem("Tools", "Iridium Axe", ItemID.IRIDIUMAXE_DEFAULT).getInt();
|
||||
ItemID.IRIDIUMHOE = config.getItem("Tools", "Iridium Hoe", ItemID.IRIDIUMHOE_DEFAULT).getInt();
|
||||
ItemID.BLOODSTONESWORD = config.getItem("Tools", "Bloodstone Sword", ItemID.BLOODSTONESWORD_DEFAULT).getInt();
|
||||
ItemID.BLOODSTONEPICKAXE = config.getItem("Tools", "Bloodstone Pickaxe", ItemID.BLOODSTONEPICKAXE_DEFAULT).getInt();
|
||||
ItemID.BLOODSTONESHOVEL = config.getItem("Tools", "Bloodstone Shovel", ItemID.BLOODSTONESHOVEL_DEFAULT).getInt();
|
||||
ItemID.BLOODSTONEAXE = config.getItem("Tools", "Bloodstone Axe", ItemID.BLOODSTONEAXE_DEFAULT).getInt();
|
||||
ItemID.BLOODSTONEHOE = config.getItem("Tools", "Bloodstone Hoe", ItemID.BLOODSTONEHOE_DEFAULT).getInt();
|
||||
ItemID.OBSIDIANSWORD = config.getItem("Tools", "Obsidian Sword", ItemID.OBSIDIANSWORD_DEFAULT).getInt();
|
||||
ItemID.OBSIDIANPICKAXE = config.getItem("Tools", "Obsidian Pickaxe", ItemID.OBSIDIANPICKAXE_DEFAULT).getInt();
|
||||
ItemID.OBSIDIANSHOVEL = config.getItem("Tools", "Obsidian Shovel", ItemID.OBSIDIANSHOVEL_DEFAULT).getInt();
|
||||
ItemID.OBSIDIANAXE = config.getItem("Tools", "Obsidian Axe", ItemID.OBSIDIANAXE_DEFAULT).getInt();
|
||||
ItemID.OBSIDIANHOE = config.getItem("Tools", "Obsidian Hoe", ItemID.OBSIDIANHOE_DEFAULT).getInt();
|
||||
ItemID.SATCHEL = config.getItem("Satchel ID", ItemID.SATCHEL_DEFAULT).getInt();
|
||||
BlockID.BASEID = config.getBlock("Base Block ID", BlockID.BASEID_DEFAULT).getInt();
|
||||
Rarity.VERDITE = config.get("Ore Rarity", "Verdite Ore", Rarity.VERDITE_DEFAULT).getInt();
|
||||
Rarity.MITHRIL = config.get("Ore Rarity", "Mithril Ore", Rarity.MITHRIL_DEFAULT).getInt();
|
||||
Rarity.ADAMANTINE = config.get("Ore Rarity", "Adamantine Ore", Rarity.ADAMANTINE_DEFAULT).getInt();
|
||||
Rarity.IRIDIUM = config.get("Ore Rarity", "Iridium Ore", Rarity.IRIDIUM_DEFAULT).getInt();
|
||||
Rarity.AGATE = config.get("Ore Rarity", "Agate Ore", Rarity.AGATE_DEFAULT).getInt();
|
||||
Rarity.AMETHYST = config.get("Ore Rarity", "Amethyst Ore", Rarity.AMETHYST_DEFAULT).getInt();
|
||||
Rarity.TOPAZ = config.get("Ore Rarity", "Topaz Ore", Rarity.TOPAZ_DEFAULT).getInt();
|
||||
Rarity.BLOODSTONE = config.get("Nether Ore Rarity", "Bloodstone", Rarity.BLOODSTONE_DEFAULT).getInt();
|
||||
Rarity.REDSOULSTONE = config.get("Nether Ore Rarity", "Red Soulstone", Rarity.REDSOULSTONE_DEFAULT).getInt();
|
||||
Rarity.BLACKSOULSTONE = config.get("Nether Ore Rarity", "Black Soulstone", Rarity.BLACKSOULSTONE_DEFAULT).getInt();
|
||||
Rarity.BLUESOULSTONE = config.get("Nether Ore Rarity", "Blue Soulstone", Rarity.BLUESOULSTONE_DEFAULT).getInt();
|
||||
config.save();
|
||||
}
|
||||
|
||||
public static void save() {
|
||||
Configuration config = new Configuration(file);
|
||||
ItemID.RESOURCES = config.getItem("Resource Items", ItemID.RESOURCES).getInt();
|
||||
ItemID.VERDITESWORD = config.getItem("Tools", "Verdite Sword", ItemID.VERDITESWORD).getInt();
|
||||
ItemID.VERDITEPICKAXE = config.getItem("Tools", "Verdite Pickaxe", ItemID.VERDITEPICKAXE).getInt();
|
||||
ItemID.VERDITESHOVEL = config.getItem("Tools", "Verdite Shovel", ItemID.VERDITESHOVEL).getInt();
|
||||
ItemID.VERDITEAXE = config.getItem("Tools", "Verdite Axe", ItemID.VERDITEAXE).getInt();
|
||||
ItemID.VERDITEHOE = config.getItem("Tools", "Verdite Hoe", ItemID.VERDITEHOE).getInt();
|
||||
ItemID.MITHRILSWORD = config.getItem("Tools", "Mithril Sword", ItemID.MITHRILSWORD).getInt();
|
||||
ItemID.MITHRILPICKAXE = config.getItem("Tools", "Mithril Pickaxe", ItemID.MITHRILPICKAXE).getInt();
|
||||
ItemID.MITHRILSHOVEL = config.getItem("Tools", "Mithril Shovel", ItemID.MITHRILSHOVEL).getInt();
|
||||
ItemID.MITHRILAXE = config.getItem("Tools", "Mithril Axe", ItemID.MITHRILAXE).getInt();
|
||||
ItemID.MITHRILHOE = config.getItem("Tools", "Mithril Hoe", ItemID.MITHRILHOE).getInt();
|
||||
ItemID.ADAMANTINESWORD = config.getItem("Tools", "Adamantine Sword", ItemID.ADAMANTINESWORD).getInt();
|
||||
ItemID.ADAMANTINEPICKAXE = config.getItem("Tools", "Adamantine Pickaxe", ItemID.ADAMANTINEPICKAXE).getInt();
|
||||
ItemID.ADAMANTINESHOVEL = config.getItem("Tools", "Adamantine Shovel", ItemID.ADAMANTINESHOVEL).getInt();
|
||||
ItemID.ADAMANTINEAXE = config.getItem("Tools", "Adamantine Axe", ItemID.ADAMANTINEAXE).getInt();
|
||||
ItemID.ADAMANTINEHOE = config.getItem("Tools", "Adamantine Hoe", ItemID.ADAMANTINEHOE).getInt();
|
||||
ItemID.IRIDIUMSWORD = config.getItem("Tools", "Iridium Sword", ItemID.IRIDIUMSWORD).getInt();
|
||||
ItemID.IRIDIUMPICKAXE = config.getItem("Tools", "Iridium Pickaxe", ItemID.IRIDIUMPICKAXE).getInt();
|
||||
ItemID.IRIDIUMSHOVEL = config.getItem("Tools", "Iridium Shovel", ItemID.IRIDIUMSHOVEL).getInt();
|
||||
ItemID.IRIDIUMAXE = config.getItem("Tools", "Iridium Axe", ItemID.IRIDIUMAXE).getInt();
|
||||
ItemID.IRIDIUMHOE = config.getItem("Tools", "Iridium Hoe", ItemID.IRIDIUMHOE).getInt();
|
||||
ItemID.BLOODSTONESWORD = config.getItem("Tools", "Bloodstone Sword", ItemID.BLOODSTONESWORD).getInt();
|
||||
ItemID.BLOODSTONEPICKAXE = config.getItem("Tools", "Bloodstone Pickaxe", ItemID.BLOODSTONEPICKAXE).getInt();
|
||||
ItemID.BLOODSTONESHOVEL = config.getItem("Tools", "Bloodstone Shovel", ItemID.BLOODSTONESHOVEL).getInt();
|
||||
ItemID.BLOODSTONEAXE = config.getItem("Tools", "Bloodstone Axe", ItemID.BLOODSTONEAXE).getInt();
|
||||
ItemID.BLOODSTONEHOE = config.getItem("Tools", "Bloodstone Hoe", ItemID.BLOODSTONEHOE).getInt();
|
||||
ItemID.OBSIDIANSWORD = config.getItem("Tools", "Obsidian Sword", ItemID.OBSIDIANSWORD).getInt();
|
||||
ItemID.OBSIDIANPICKAXE = config.getItem("Tools", "Obsidian Pickaxe", ItemID.OBSIDIANPICKAXE).getInt();
|
||||
ItemID.OBSIDIANSHOVEL = config.getItem("Tools", "Obsidian Shovel", ItemID.OBSIDIANSHOVEL).getInt();
|
||||
ItemID.OBSIDIANAXE = config.getItem("Tools", "Obsidian Axe", ItemID.OBSIDIANAXE).getInt();
|
||||
ItemID.OBSIDIANHOE = config.getItem("Tools", "Obsidian Hoe", ItemID.OBSIDIANHOE).getInt();
|
||||
ItemID.SATCHEL = config.getItem("Satchel ID", ItemID.SATCHEL).getInt();
|
||||
BlockHandler.BASEID = config.getBlock("Base Block ID", BlockHandler.BASEID).getInt();
|
||||
Rarity.VERDITE = config.get("Ore Rarity", "Verdite Ore", Rarity.VERDITE).getInt();
|
||||
Rarity.MITHRIL = config.get("Ore Rarity", "Mithril Ore", Rarity.MITHRIL).getInt();
|
||||
Rarity.ADAMANTINE = config.get("Ore Rarity", "Adamantine Ore", Rarity.ADAMANTINE).getInt();
|
||||
Rarity.IRIDIUM = config.get("Ore Rarity", "Iridium Ore", Rarity.IRIDIUM).getInt();
|
||||
Rarity.AGATE = config.get("Ore Rarity", "Agate Ore", Rarity.AGATE).getInt();
|
||||
Rarity.AMETHYST = config.get("Ore Rarity", "Amethyst Ore", Rarity.AMETHYST).getInt();
|
||||
Rarity.TOPAZ = config.get("Ore Rarity", "Topaz Ore", Rarity.TOPAZ).getInt();
|
||||
Rarity.BLOODSTONE = config.get("Nether Ore Rarity", "Bloodstone", Rarity.BLOODSTONE).getInt();
|
||||
Rarity.REDSOULSTONE = config.get("Nether Ore Rarity", "Red Soulstone", Rarity.REDSOULSTONE).getInt();
|
||||
Rarity.BLACKSOULSTONE = config.get("Nether Ore Rarity", "Black Soulstone", Rarity.BLACKSOULSTONE).getInt();
|
||||
Rarity.BLUESOULSTONE = config.get("Nether Ore Rarity", "Blue Soulstone", Rarity.BLUESOULSTONE).getInt();
|
||||
config.save();
|
||||
}
|
||||
}
|
||||
|
|
@ -26,7 +26,7 @@ public class Localizations {
|
|||
private Localizations() {
|
||||
}
|
||||
|
||||
public static void Initialize() {
|
||||
public static void initialize() {
|
||||
File source = Loader.instance().getReversedModObjectList().get(MysticOres.instance).getSource();
|
||||
Pattern pattern = Pattern.compile(".*(assets/" + "mysticmods/lang/(.+)\\.(.+))");
|
||||
for (String file : getResources(source, pattern)) {
|
||||
|
|
|
|||
|
|
@ -6,26 +6,17 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class OreDictManager {
|
||||
public static void Initialize() {
|
||||
OreDictionary.registerOre("ingotAdamantine", new ItemStack(Items.Resource, 1, 2));
|
||||
OreDictionary.registerOre("ingotMithril", new ItemStack(Items.Resource, 1, 1));
|
||||
OreDictionary.registerOre("ingotVerdite", new ItemStack(Items.Resource, 1, 0));
|
||||
OreDictionary.registerOre("ingotIridium", new ItemStack(Items.Resource, 1, 3));
|
||||
OreDictionary.registerOre("fuelIridium", new ItemStack(Items.Resource, 1, 4));
|
||||
OreDictionary.registerOre("gemTourmaline", new ItemStack(Items.Resource, 1, 5));
|
||||
OreDictionary.registerOre("gemTopaz", new ItemStack(Items.Resource, 1, 7));
|
||||
OreDictionary.registerOre("gemAmethyst", new ItemStack(Items.Resource, 1, 8));
|
||||
OreDictionary.registerOre("gemAgate", new ItemStack(Items.Resource, 1, 6));
|
||||
OreDictionary.registerOre("oreAdamantine", new ItemStack(BlockHandler.BlockBase, 1, 0));
|
||||
OreDictionary.registerOre("oreAmethyst", new ItemStack(BlockHandler.BlockBase, 1, 1));
|
||||
OreDictionary.registerOre("oreIridium", new ItemStack(BlockHandler.BlockBase, 1, 2));
|
||||
OreDictionary.registerOre("oreMithril", new ItemStack(BlockHandler.BlockBase, 1, 3));
|
||||
OreDictionary.registerOre("oreSapphire", new ItemStack(BlockHandler.BlockBase, 1, 4));
|
||||
OreDictionary.registerOre("oreTopaz", new ItemStack(BlockHandler.BlockBase, 1, 5));
|
||||
OreDictionary.registerOre("oreVerdite", new ItemStack(BlockHandler.BlockBase, 1, 6));
|
||||
OreDictionary.registerOre("oreBloodstone", new ItemStack(BlockHandler.BlockBase, 1, 7));
|
||||
OreDictionary.registerOre("oreBlackSoulstone", new ItemStack(BlockHandler.BlockBase, 1, 8));
|
||||
OreDictionary.registerOre("oreBlueSoulstone", new ItemStack(BlockHandler.BlockBase, 1, 9));
|
||||
OreDictionary.registerOre("oreRedSoulstone", new ItemStack(BlockHandler.BlockBase, 1, 10));
|
||||
public static final String[] INGOTS = { "ingotVerdite", "ingotMithril", "ingotAdamantine", "ingotIridium", "fuelIridium", "gemTourmaline", "gemAgate", "gemTopaz", "gemAmethyst", "dustMystic",
|
||||
" shardBloodstone", "shardGlass", "shardObsidian", "rodObsidian" };
|
||||
public static final String[] ORES = { "oreAdamantine", "oreAmethyst", "oreIridium", "oreMithril", "oreSapphire", "oreTopaz", "oreVerdite", "oreBloodstone", "oreBlackSoulstone",
|
||||
"oreBlueSoulstone", "oreRedSoulstone", "oreAgate" };
|
||||
|
||||
public static void initialize() {
|
||||
for (int i = 0; i < INGOTS.length; i++) {
|
||||
OreDictionary.registerOre(INGOTS[i], new ItemStack(Items.Resource, 1, i));
|
||||
}
|
||||
for (int i = 0; i < ORES.length; i++) {
|
||||
OreDictionary.registerOre(ORES[i], new ItemStack(BlockHandler.BlockBase, 1, i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ import net.minecraft.creativetab.CreativeTabs;
|
|||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class TabMysticOres extends CreativeTabs {
|
||||
public TabMysticOres(int par1, String par2Str) {
|
||||
super(par1, par2Str);
|
||||
public TabMysticOres(String par2Str) {
|
||||
super(par2Str);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -5,15 +5,8 @@ import mysticores.lib.Rarity;
|
|||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class GeneratorManager {
|
||||
public static void Initialize() {
|
||||
GameRegistry.registerWorldGenerator(new WorldGenVerdite());
|
||||
GameRegistry.registerWorldGenerator(new WorldGenTopaz());
|
||||
GameRegistry.registerWorldGenerator(new WorldGenTourmaline());
|
||||
GameRegistry.registerWorldGenerator(new WorldGenMithril());
|
||||
GameRegistry.registerWorldGenerator(new WorldGenIridium());
|
||||
GameRegistry.registerWorldGenerator(new WorldGenAmethyst());
|
||||
GameRegistry.registerWorldGenerator(new WorldGenAdamantine());
|
||||
GameRegistry.registerWorldGenerator(new WorldGenAgate());
|
||||
public static void initialize() {
|
||||
GameRegistry.registerWorldGenerator(new WorldGenOres());
|
||||
GameRegistry.registerWorldGenerator(new NetherGenMineable(BlockHandler.BlockBase.blockID, 7, Rarity.BLOODSTONE + 1));
|
||||
GameRegistry.registerWorldGenerator(new NetherGenMineable(BlockHandler.BlockBase.blockID, 8, Rarity.BLACKSOULSTONE + 1));
|
||||
GameRegistry.registerWorldGenerator(new NetherGenMineable(BlockHandler.BlockBase.blockID, 9, Rarity.BLUESOULSTONE + 1));
|
||||
|
|
|
|||
|
|
@ -7,70 +7,53 @@ import net.minecraft.util.MathHelper;
|
|||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
||||
public class NetherGenHelper extends WorldGenerator
|
||||
{
|
||||
|
||||
public class NetherGenHelper extends WorldGenerator {
|
||||
private int minableBlockId;
|
||||
private int minableBlockMeta = 0;
|
||||
private int numberOfBlocks;
|
||||
|
||||
public NetherGenHelper(int par1, int par2)
|
||||
{
|
||||
public NetherGenHelper(int par1, int par2) {
|
||||
this.minableBlockId = par1;
|
||||
this.numberOfBlocks = par2;
|
||||
}
|
||||
|
||||
public NetherGenHelper(int id, int meta, int number)
|
||||
{
|
||||
public NetherGenHelper(int id, int meta, int number) {
|
||||
this(id, number);
|
||||
minableBlockMeta = meta;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5)
|
||||
{
|
||||
public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5) {
|
||||
float var6 = par2Random.nextFloat() * (float) Math.PI;
|
||||
double var7 = (double) ((float) (par3 + 8) + MathHelper.sin(var6) * (float) this.numberOfBlocks / 8.0F);
|
||||
double var9 = (double) ((float) (par3 + 8) - MathHelper.sin(var6) * (float) this.numberOfBlocks / 8.0F);
|
||||
double var11 = (double) ((float) (par5 + 8) + MathHelper.cos(var6) * (float) this.numberOfBlocks / 8.0F);
|
||||
double var13 = (double) ((float) (par5 + 8) - MathHelper.cos(var6) * (float) this.numberOfBlocks / 8.0F);
|
||||
double var15 = (double) (par4 + par2Random.nextInt(3) - 2);
|
||||
double var17 = (double) (par4 + par2Random.nextInt(3) - 2);
|
||||
|
||||
for (int nBlockNumberTry = 0; nBlockNumberTry <= this.numberOfBlocks; ++nBlockNumberTry)
|
||||
{
|
||||
double var20 = var7 + (var9 - var7) * (double) nBlockNumberTry / (double) this.numberOfBlocks;
|
||||
double var22 = var15 + (var17 - var15) * (double) nBlockNumberTry / (double) this.numberOfBlocks;
|
||||
double var24 = var11 + (var13 - var11) * (double) nBlockNumberTry / (double) this.numberOfBlocks;
|
||||
double var26 = par2Random.nextDouble() * (double) this.numberOfBlocks / 16.0D;
|
||||
double var28 = (double) (MathHelper.sin((float) nBlockNumberTry * (float) Math.PI / (float) this.numberOfBlocks) + 1.0F) * var26 + 1.0D;
|
||||
double var30 = (double) (MathHelper.sin((float) nBlockNumberTry * (float) Math.PI / (float) this.numberOfBlocks) + 1.0F) * var26 + 1.0D;
|
||||
double var7 = par3 + 8 + MathHelper.sin(var6) * this.numberOfBlocks / 8.0F;
|
||||
double var9 = par3 + 8 - MathHelper.sin(var6) * this.numberOfBlocks / 8.0F;
|
||||
double var11 = par5 + 8 + MathHelper.cos(var6) * this.numberOfBlocks / 8.0F;
|
||||
double var13 = par5 + 8 - MathHelper.cos(var6) * this.numberOfBlocks / 8.0F;
|
||||
double var15 = par4 + par2Random.nextInt(3) - 2;
|
||||
double var17 = par4 + par2Random.nextInt(3) - 2;
|
||||
for (int nBlockNumberTry = 0; nBlockNumberTry <= this.numberOfBlocks; ++nBlockNumberTry) {
|
||||
double var20 = var7 + (var9 - var7) * nBlockNumberTry / this.numberOfBlocks;
|
||||
double var22 = var15 + (var17 - var15) * nBlockNumberTry / this.numberOfBlocks;
|
||||
double var24 = var11 + (var13 - var11) * nBlockNumberTry / this.numberOfBlocks;
|
||||
double var26 = par2Random.nextDouble() * this.numberOfBlocks / 16.0D;
|
||||
double var28 = (MathHelper.sin(nBlockNumberTry * (float) Math.PI / this.numberOfBlocks) + 1.0F) * var26 + 1.0D;
|
||||
double var30 = (MathHelper.sin(nBlockNumberTry * (float) Math.PI / this.numberOfBlocks) + 1.0F) * var26 + 1.0D;
|
||||
int var32 = MathHelper.floor_double(var20 - var28 / 2.0D);
|
||||
int var33 = MathHelper.floor_double(var22 - var30 / 2.0D);
|
||||
int var34 = MathHelper.floor_double(var24 - var28 / 2.0D);
|
||||
int var35 = MathHelper.floor_double(var20 + var28 / 2.0D);
|
||||
int var36 = MathHelper.floor_double(var22 + var30 / 2.0D);
|
||||
int var37 = MathHelper.floor_double(var24 + var28 / 2.0D);
|
||||
|
||||
for (int var38 = var32; var38 <= var35; ++var38)
|
||||
{
|
||||
double var39 = ((double) var38 + 0.5D - var20) / (var28 / 2.0D);
|
||||
|
||||
if (var39 * var39 < 1.0D)
|
||||
{
|
||||
for (int var41 = var33; var41 <= var36; ++var41)
|
||||
{
|
||||
double var42 = ((double) var41 + 0.5D - var22) / (var30 / 2.0D);
|
||||
|
||||
if (var39 * var39 + var42 * var42 < 1.0D)
|
||||
{
|
||||
for (int var44 = var34; var44 <= var37; ++var44)
|
||||
{
|
||||
double var45 = ((double) var44 + 0.5D - var24) / (var28 / 2.0D);
|
||||
|
||||
for (int var38 = var32; var38 <= var35; ++var38) {
|
||||
double var39 = (var38 + 0.5D - var20) / (var28 / 2.0D);
|
||||
if (var39 * var39 < 1.0D) {
|
||||
for (int var41 = var33; var41 <= var36; ++var41) {
|
||||
double var42 = (var41 + 0.5D - var22) / (var30 / 2.0D);
|
||||
if (var39 * var39 + var42 * var42 < 1.0D) {
|
||||
for (int var44 = var34; var44 <= var37; ++var44) {
|
||||
double var45 = (var44 + 0.5D - var24) / (var28 / 2.0D);
|
||||
int blocktoreplace = par1World.getBlockId(var38, var41, var44);
|
||||
if (var39 * var39 + var42 * var42 + var45 * var45 < 1.0D && blocktoreplace == Block.netherrack.blockID)
|
||||
{
|
||||
if (var39 * var39 + var42 * var42 + var45 * var45 < 1.0D && blocktoreplace == Block.netherrack.blockID) {
|
||||
par1World.setBlock(var38, var41, var44, this.minableBlockId, minableBlockMeta, 3);
|
||||
}
|
||||
}
|
||||
|
|
@ -79,7 +62,6 @@ public class NetherGenHelper extends WorldGenerator
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -2,48 +2,34 @@ package mysticores.worldgen;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
import cpw.mods.fml.common.IWorldGenerator;
|
||||
|
||||
public class NetherGenMineable implements IWorldGenerator
|
||||
{
|
||||
public class NetherGenMineable implements IWorldGenerator {
|
||||
private WorldGenerator helper;
|
||||
|
||||
private int minableBlockId;
|
||||
private int minableBlockMeta = 0;
|
||||
private int numberOfBlocks;
|
||||
|
||||
public NetherGenMineable(int blockId, int numBlocks)
|
||||
{
|
||||
this.minableBlockId = blockId;
|
||||
this.numberOfBlocks = numBlocks;
|
||||
public NetherGenMineable(int blockId, int numBlocks) {
|
||||
helper = new NetherGenHelper(blockId, numBlocks);
|
||||
}
|
||||
|
||||
public NetherGenMineable(int blockId, int meta, int numBlocks)
|
||||
{
|
||||
this(blockId, numBlocks);
|
||||
minableBlockMeta = meta;
|
||||
public NetherGenMineable(int blockId, int meta, int numBlocks) {
|
||||
helper = new NetherGenHelper(blockId, meta, numBlocks);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider)
|
||||
{
|
||||
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
|
||||
if (world.provider.isHellWorld)
|
||||
generateNether(world, random, chunkX * 16, chunkZ * 16);
|
||||
}
|
||||
|
||||
private void generateNether(World world, Random random, int i, int j)
|
||||
{
|
||||
for (int j1 = 0; j1 < 50; j1++)
|
||||
{
|
||||
private void generateNether(World world, Random random, int i, int j) {
|
||||
for (int j1 = 0; j1 < 50; j1++) {
|
||||
int Xcoordinate = i + random.nextInt(16);
|
||||
int Zcoordinate = j + random.nextInt(16);
|
||||
int Ycoordinate = random.nextInt(256);
|
||||
new NetherGenHelper(minableBlockId, minableBlockMeta, numberOfBlocks).generate(world, random, Xcoordinate, Ycoordinate, Zcoordinate);
|
||||
helper.generate(world, random, Xcoordinate, Ycoordinate, Zcoordinate);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,29 +0,0 @@
|
|||
package mysticores.worldgen;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import mysticores.blocks.BlockHandler;
|
||||
import mysticores.lib.Rarity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.world.gen.feature.WorldGenMinable;
|
||||
import cpw.mods.fml.common.IWorldGenerator;
|
||||
|
||||
public class WorldGenAdamantine implements IWorldGenerator {
|
||||
@Override
|
||||
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
|
||||
switch (world.provider.dimensionId) {
|
||||
case 0:
|
||||
generateSurface(world, random, chunkX * 16, chunkZ * 16);
|
||||
}
|
||||
}
|
||||
|
||||
private void generateSurface(World world, Random random, int blockX, int blockZ) {
|
||||
for (int i = 0; i < Rarity.ADAMANTINE; i++) {
|
||||
int Xcoord = blockX + random.nextInt(8);
|
||||
int Ycoord = random.nextInt(16);
|
||||
int Zcoord = blockZ + random.nextInt(8);
|
||||
(new WorldGenMinable(BlockHandler.BlockBase.blockID, 0, 3)).generate(world, random, Xcoord, Ycoord, Zcoord);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
package mysticores.worldgen;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import mysticores.blocks.BlockHandler;
|
||||
import mysticores.lib.Rarity;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.world.gen.feature.WorldGenMinable;
|
||||
import cpw.mods.fml.common.IWorldGenerator;
|
||||
|
||||
public class WorldGenAgate implements IWorldGenerator {
|
||||
@Override
|
||||
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
|
||||
switch (world.provider.dimensionId) {
|
||||
case 0:
|
||||
generateSurface(world, random, chunkX * 16, chunkZ * 16);
|
||||
}
|
||||
}
|
||||
|
||||
private void generateSurface(World world, Random random, int blockX, int blockZ) {
|
||||
for (int i = 0; i < Rarity.AGATE; i++) {
|
||||
int Xcoord = blockX + random.nextInt(32);
|
||||
int Ycoord = random.nextInt(60);
|
||||
int Zcoord = blockZ + random.nextInt(32);
|
||||
(new WorldGenMinable(BlockHandler.BlockBase.blockID, 11, 4, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
package mysticores.worldgen;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import mysticores.blocks.BlockHandler;
|
||||
import mysticores.lib.Rarity;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.world.gen.feature.WorldGenMinable;
|
||||
import cpw.mods.fml.common.IWorldGenerator;
|
||||
|
||||
public class WorldGenAmethyst implements IWorldGenerator {
|
||||
@Override
|
||||
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
|
||||
switch (world.provider.dimensionId) {
|
||||
case 0:
|
||||
generateSurface(world, random, chunkX * 16, chunkZ * 16);
|
||||
}
|
||||
}
|
||||
|
||||
private void generateSurface(World world, Random random, int blockX, int blockZ) {
|
||||
for (int i = 0; i < Rarity.AMETHYST; i++) {
|
||||
int Xcoord = blockX + random.nextInt(24);
|
||||
int Ycoord = random.nextInt(60);
|
||||
int Zcoord = blockZ + random.nextInt(24);
|
||||
(new WorldGenMinable(BlockHandler.BlockBase.blockID, 1, 4, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
package mysticores.worldgen;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import mysticores.blocks.BlockHandler;
|
||||
import mysticores.lib.Rarity;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.world.gen.feature.WorldGenMinable;
|
||||
import cpw.mods.fml.common.IWorldGenerator;
|
||||
|
||||
public class WorldGenIridium implements IWorldGenerator {
|
||||
@Override
|
||||
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
|
||||
switch (world.provider.dimensionId) {
|
||||
case 0:
|
||||
generateSurface(world, random, chunkX * 16, chunkZ * 16);
|
||||
}
|
||||
}
|
||||
|
||||
private void generateSurface(World world, Random random, int blockX, int blockZ) {
|
||||
for (int i = 0; i < Rarity.IRIDIUM; i++) {
|
||||
int Xcoord = blockX + random.nextInt(16);
|
||||
int Ycoord = random.nextInt(12);
|
||||
int Zcoord = blockZ + random.nextInt(16);
|
||||
(new WorldGenMinable(BlockHandler.BlockBase.blockID, 2, 6, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
package mysticores.worldgen;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import mysticores.blocks.BlockHandler;
|
||||
import mysticores.lib.Rarity;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.world.gen.feature.WorldGenMinable;
|
||||
import cpw.mods.fml.common.IWorldGenerator;
|
||||
|
||||
public class WorldGenMithril implements IWorldGenerator {
|
||||
@Override
|
||||
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
|
||||
switch (world.provider.dimensionId) {
|
||||
case 0:
|
||||
generateSurface(world, random, chunkX * 16, chunkZ * 16);
|
||||
}
|
||||
}
|
||||
|
||||
private void generateSurface(World world, Random random, int blockX, int blockZ) {
|
||||
for (int i = 0; i < Rarity.MITHRIL; i++) {
|
||||
int Xcoord = blockX + random.nextInt(16);
|
||||
int Ycoord = random.nextInt(64);
|
||||
int Zcoord = blockZ + random.nextInt(16);
|
||||
(new WorldGenMinable(BlockHandler.BlockBase.blockID, 3, 6, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
package mysticores.worldgen;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import mysticores.blocks.BlockHandler;
|
||||
import mysticores.lib.Rarity;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.world.gen.feature.WorldGenMinable;
|
||||
import cpw.mods.fml.common.IWorldGenerator;
|
||||
|
||||
public class WorldGenTopaz implements IWorldGenerator {
|
||||
@Override
|
||||
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
|
||||
switch (world.provider.dimensionId) {
|
||||
case 0:
|
||||
generateSurface(world, random, chunkX * 16, chunkZ * 16);
|
||||
}
|
||||
}
|
||||
|
||||
private void generateSurface(World world, Random random, int blockX, int blockZ) {
|
||||
for (int i = 0; i < Rarity.TOPAZ; i++) {
|
||||
int Xcoord = blockX + random.nextInt(16);
|
||||
int Ycoord = random.nextInt(60);
|
||||
int Zcoord = blockZ + random.nextInt(16);
|
||||
(new WorldGenMinable(BlockHandler.BlockBase.blockID, 5, 4, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
package mysticores.worldgen;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import mysticores.blocks.BlockHandler;
|
||||
import mysticores.lib.Rarity;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.world.gen.feature.WorldGenMinable;
|
||||
import cpw.mods.fml.common.IWorldGenerator;
|
||||
|
||||
public class WorldGenTourmaline implements IWorldGenerator {
|
||||
@Override
|
||||
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
|
||||
switch (world.provider.dimensionId) {
|
||||
case 0:
|
||||
generateSurface(world, random, chunkX * 16, chunkZ * 16);
|
||||
}
|
||||
}
|
||||
|
||||
private void generateSurface(World world, Random random, int blockX, int blockZ) {
|
||||
for (int i = 0; i < Rarity.TOURMALINE; i++) {
|
||||
int Xcoord = blockX + random.nextInt(32);
|
||||
int Ycoord = random.nextInt(60);
|
||||
int Zcoord = blockZ + random.nextInt(32);
|
||||
(new WorldGenMinable(BlockHandler.BlockBase.blockID, 4, 4, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
package mysticores.worldgen;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import mysticores.blocks.BlockHandler;
|
||||
import mysticores.lib.Rarity;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.world.gen.feature.WorldGenMinable;
|
||||
import cpw.mods.fml.common.IWorldGenerator;
|
||||
|
||||
public class WorldGenVerdite implements IWorldGenerator {
|
||||
@Override
|
||||
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
|
||||
switch (world.provider.dimensionId) {
|
||||
case 0:
|
||||
generateSurface(world, random, chunkX * 16, chunkZ * 16);
|
||||
}
|
||||
}
|
||||
|
||||
private void generateSurface(World world, Random random, int blockX, int blockZ) {
|
||||
for (int i = 0; i < Rarity.VERDITE; i++) {
|
||||
int Xcoord = blockX + random.nextInt(16);
|
||||
int Ycoord = random.nextInt(20) + 80;
|
||||
int Zcoord = blockZ + random.nextInt(16);
|
||||
(new WorldGenMinable(BlockHandler.BlockBase.blockID, 6, 9, Block.stone.blockID)).generate(world, random, Xcoord, Ycoord, Zcoord);
|
||||
}
|
||||
}
|
||||
}
|
||||
81
common/mysticores/worldgen/WorldGenOres.java
Normal file
81
common/mysticores/worldgen/WorldGenOres.java
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
package mysticores.worldgen;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import mysticores.blocks.BlockHandler;
|
||||
import mysticores.lib.Rarity;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.world.gen.feature.WorldGenMinable;
|
||||
import cpw.mods.fml.common.IWorldGenerator;
|
||||
|
||||
public class WorldGenOres implements IWorldGenerator {
|
||||
public static final WorldGenMinable adamantine = new WorldGenMinable(BlockHandler.BlockBase.blockID, 0, 3);
|
||||
public static final WorldGenMinable amethyst = new WorldGenMinable(BlockHandler.BlockBase.blockID, 1, 4, Block.stone.blockID);
|
||||
public static final WorldGenMinable iridium = new WorldGenMinable(BlockHandler.BlockBase.blockID, 2, 6, Block.stone.blockID);
|
||||
public static final WorldGenMinable mithril = new WorldGenMinable(BlockHandler.BlockBase.blockID, 3, 6, Block.stone.blockID);
|
||||
public static final WorldGenMinable tourmaline = new WorldGenMinable(BlockHandler.BlockBase.blockID, 4, 4, Block.stone.blockID);
|
||||
public static final WorldGenMinable topaz = new WorldGenMinable(BlockHandler.BlockBase.blockID, 5, 4, Block.stone.blockID);
|
||||
public static final WorldGenMinable verdite = new WorldGenMinable(BlockHandler.BlockBase.blockID, 6, 9, Block.stone.blockID);
|
||||
public static final WorldGenMinable agate = new WorldGenMinable(BlockHandler.BlockBase.blockID, 11, 4, Block.stone.blockID);
|
||||
|
||||
@Override
|
||||
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
|
||||
switch (world.provider.dimensionId) {
|
||||
case 0:
|
||||
generateSurface(world, random, chunkX * 16, chunkZ * 16);
|
||||
}
|
||||
}
|
||||
|
||||
private void generateSurface(World world, Random random, int blockX, int blockZ) {
|
||||
for (int i = 0; i < Rarity.ADAMANTINE; i++) {
|
||||
int Xcoord = blockX + random.nextInt(8);
|
||||
int Ycoord = random.nextInt(16);
|
||||
int Zcoord = blockZ + random.nextInt(8);
|
||||
adamantine.generate(world, random, Xcoord, Ycoord, Zcoord);
|
||||
}
|
||||
for (int i = 0; i < Rarity.AGATE; i++) {
|
||||
int Xcoord = blockX + random.nextInt(32);
|
||||
int Ycoord = random.nextInt(60);
|
||||
int Zcoord = blockZ + random.nextInt(32);
|
||||
agate.generate(world, random, Xcoord, Ycoord, Zcoord);
|
||||
}
|
||||
for (int i = 0; i < Rarity.AMETHYST; i++) {
|
||||
int Xcoord = blockX + random.nextInt(24);
|
||||
int Ycoord = random.nextInt(60);
|
||||
int Zcoord = blockZ + random.nextInt(24);
|
||||
amethyst.generate(world, random, Xcoord, Ycoord, Zcoord);
|
||||
}
|
||||
for (int i = 0; i < Rarity.IRIDIUM; i++) {
|
||||
int Xcoord = blockX + random.nextInt(16);
|
||||
int Ycoord = random.nextInt(12);
|
||||
int Zcoord = blockZ + random.nextInt(16);
|
||||
iridium.generate(world, random, Xcoord, Ycoord, Zcoord);
|
||||
}
|
||||
for (int i = 0; i < Rarity.MITHRIL; i++) {
|
||||
int Xcoord = blockX + random.nextInt(16);
|
||||
int Ycoord = random.nextInt(64);
|
||||
int Zcoord = blockZ + random.nextInt(16);
|
||||
mithril.generate(world, random, Xcoord, Ycoord, Zcoord);
|
||||
}
|
||||
for (int i = 0; i < Rarity.TOPAZ; i++) {
|
||||
int Xcoord = blockX + random.nextInt(16);
|
||||
int Ycoord = random.nextInt(60);
|
||||
int Zcoord = blockZ + random.nextInt(16);
|
||||
topaz.generate(world, random, Xcoord, Ycoord, Zcoord);
|
||||
}
|
||||
for (int i = 0; i < Rarity.TOURMALINE; i++) {
|
||||
int Xcoord = blockX + random.nextInt(32);
|
||||
int Ycoord = random.nextInt(60);
|
||||
int Zcoord = blockZ + random.nextInt(32);
|
||||
tourmaline.generate(world, random, Xcoord, Ycoord, Zcoord);
|
||||
}
|
||||
for (int i = 0; i < Rarity.VERDITE; i++) {
|
||||
int Xcoord = blockX + random.nextInt(16);
|
||||
int Ycoord = random.nextInt(20) + 80;
|
||||
int Zcoord = blockZ + random.nextInt(16);
|
||||
verdite.generate(world, random, Xcoord, Ycoord, Zcoord);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue