Updated for 1.7.2
This commit is contained in:
parent
cc178e1a3b
commit
29228e18fe
105 changed files with 1939 additions and 2690 deletions
|
|
@ -7,25 +7,30 @@ import mysticores.MysticOres;
|
|||
import mysticores.items.Items;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class BlockBase extends Block {
|
||||
Icon[] textures;
|
||||
IIcon[] textures;
|
||||
|
||||
public BlockBase(int ID) {
|
||||
super(ID, Material.rock);
|
||||
setCreativeTab(MysticOres.MysticOresTab);
|
||||
public BlockBase() {
|
||||
super(Material.rock);
|
||||
setCreativeTab(MysticOres.MysticOresTab);
|
||||
setHarvestLevel("pickaxe", 2);
|
||||
setHarvestLevel("pickaxe", 3, 0);
|
||||
setHarvestLevel("pickaxe", 3, 2);
|
||||
setHarvestLevel("pickaxe", 1, 6);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -74,7 +79,7 @@ public class BlockBase extends Block {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIcon(int side, int meta) {
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return textures[meta];
|
||||
}
|
||||
|
||||
|
|
@ -95,14 +100,14 @@ public class BlockBase extends Block {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(int i, CreativeTabs tab, List list) {
|
||||
for (int meta = 0; meta < ItemBase.BLOCK_NAMES.length; meta++) {
|
||||
public void getSubBlocks(Item i, CreativeTabs tab, List list) {
|
||||
for (int meta = 0; meta < BlockHandler.BLOCK_NAMES.size(); meta++) {
|
||||
list.add(new ItemStack(i, 1, meta));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int idDropped(int par1, Random random, int par3) {
|
||||
public Item getItemDropped(int par1, Random random, int par3) {
|
||||
switch (par1) {
|
||||
case 1:
|
||||
case 2:
|
||||
|
|
@ -111,7 +116,7 @@ public class BlockBase extends Block {
|
|||
case 7:
|
||||
case 11:
|
||||
case 12:
|
||||
return Items.Resource.itemID;
|
||||
return Items.Resource;
|
||||
case 8:
|
||||
return BlackSoulstoneDrops(par1, random, par3);
|
||||
case 9:
|
||||
|
|
@ -119,17 +124,12 @@ public class BlockBase extends Block {
|
|||
case 10:
|
||||
return RedSoulstoneDrops(par1, random, par3);
|
||||
default:
|
||||
return blockID;
|
||||
return super.getItemDropped(par1, random, par3);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int idPicked(World world, int x, int y, int z) {
|
||||
return this.blockID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBlockSolidOnSide(World world, int x, int y, int z, ForgeDirection side) {
|
||||
public boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side) {
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if (meta == 12)
|
||||
return false;
|
||||
|
|
@ -138,9 +138,9 @@ public class BlockBase extends Block {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
public boolean isOpaqueCube(){
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int quantityDropped(int meta, int fortune, Random random) {
|
||||
|
|
@ -164,79 +164,73 @@ public class BlockBase extends Block {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister register) {
|
||||
textures = new Icon[16];
|
||||
for (int i = 0; i < ItemBase.BLOCK_NAMES.length; i++) {
|
||||
textures[i] = register.registerIcon("mysticores:" + ItemBase.BLOCK_NAMES[i]);
|
||||
public void registerBlockIcons(IIconRegister register) {
|
||||
textures = new IIcon[16];
|
||||
for (int i = 0; i < BlockHandler.BLOCK_NAMES.size(); i++) {
|
||||
textures[i] = register.registerIcon("mysticores:" + BlockHandler.BLOCK_NAMES.get(i));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
public boolean renderAsNormalBlock(){
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int par) {
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
int blockID = world.getBlockId(x, y, z);
|
||||
if (meta == 12 && blockID == this.blockID)
|
||||
Block blockID = world.getBlock(x, y, z);
|
||||
if (meta == 12 && blockID == this)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canSilkHarvest() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public static int BlackSoulstoneDrops(int par1, Random random, int par3) {
|
||||
public static Item BlackSoulstoneDrops(int par1, Random random, int par3) {
|
||||
int rand = random.nextInt(2);
|
||||
switch (rand) {
|
||||
case 0:
|
||||
return Item.coal.itemID;
|
||||
return net.minecraft.init.Items.coal;
|
||||
case 1:
|
||||
return Item.gunpowder.itemID;
|
||||
return net.minecraft.init.Items.gunpowder;
|
||||
default:
|
||||
return Item.sugar.itemID;
|
||||
return net.minecraft.init.Items.sugar;
|
||||
}
|
||||
}
|
||||
|
||||
public static int BlueSoulstoneDrops(int par1, Random random, int par3) {
|
||||
public static Item BlueSoulstoneDrops(int par1, Random random, int par3) {
|
||||
int rand = random.nextInt(5);
|
||||
switch (rand) {
|
||||
case 0:
|
||||
return Item.diamond.itemID;
|
||||
return net.minecraft.init.Items.diamond;
|
||||
case 1:
|
||||
return Block.obsidian.blockID;
|
||||
return Item.getItemFromBlock(Blocks.obsidian);
|
||||
case 2:
|
||||
return Item.gunpowder.itemID;
|
||||
return net.minecraft.init.Items.gunpowder;
|
||||
case 3:
|
||||
return Item.glowstone.itemID;
|
||||
return net.minecraft.init.Items.glowstone_dust;
|
||||
case 4:
|
||||
return Item.blazeRod.itemID;
|
||||
return net.minecraft.init.Items.blaze_rod;
|
||||
case 5:
|
||||
return Item.emerald.itemID;
|
||||
default:
|
||||
return Item.emerald.itemID;
|
||||
return net.minecraft.init.Items.emerald;
|
||||
}
|
||||
}
|
||||
|
||||
public static int RedSoulstoneDrops(int par1, Random random, int par3) {
|
||||
public static Item RedSoulstoneDrops(int par1, Random random, int par3) {
|
||||
int rand = random.nextInt(4);
|
||||
switch (rand) {
|
||||
case 0:
|
||||
return Item.glowstone.itemID;
|
||||
return net.minecraft.init.Items.glowstone_dust;
|
||||
case 1:
|
||||
return Item.gunpowder.itemID;
|
||||
return net.minecraft.init.Items.gunpowder;
|
||||
case 2:
|
||||
return Item.redstone.itemID;
|
||||
return net.minecraft.init.Items.redstone;
|
||||
case 3:
|
||||
return Block.obsidian.blockID;
|
||||
return Item.getItemFromBlock(Blocks.obsidian);
|
||||
default:
|
||||
return Item.blazePowder.itemID;
|
||||
return net.minecraft.init.Items.blaze_powder;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,31 +1,18 @@
|
|||
package mysticores.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class BlockHandler {
|
||||
public static ArrayList<String> BLOCK_NAMES = new ArrayList<String>(Arrays.asList("Adamantine Ore", "Amethyst Ore", "Iridium Ore", "Mithril Ore", "Tourmaline Ore", "Topaz Ore", "Verdite Ore", "Bloodstone", "Black Soulstone",
|
||||
"Blue Soulstone", "Red Soulstone", "Agate Ore", "Tempered Glass"));
|
||||
public static Block BlockBase;
|
||||
public static int BASEID = 540;
|
||||
|
||||
public static void initialize() {
|
||||
BlockBase = new BlockBase(BASEID).setStepSound(Block.soundStoneFootstep);
|
||||
GameRegistry.registerBlock(BlockBase, ItemBase.class, "Base Blocks");
|
||||
setBlockHarvestLevels();
|
||||
}
|
||||
|
||||
private static void setBlockHarvestLevels() {
|
||||
MinecraftForge.setBlockHarvestLevel(BlockBase, 0, "pickaxe", 3);
|
||||
MinecraftForge.setBlockHarvestLevel(BlockBase, 1, "pickaxe", 2);
|
||||
MinecraftForge.setBlockHarvestLevel(BlockBase, 2, "pickaxe", 3);
|
||||
MinecraftForge.setBlockHarvestLevel(BlockBase, 3, "pickaxe", 2);
|
||||
MinecraftForge.setBlockHarvestLevel(BlockBase, 4, "pickaxe", 2);
|
||||
MinecraftForge.setBlockHarvestLevel(BlockBase, 5, "pickaxe", 2);
|
||||
MinecraftForge.setBlockHarvestLevel(BlockBase, 6, "pickaxe", 1);
|
||||
MinecraftForge.setBlockHarvestLevel(BlockBase, 7, "pickaxe", 2);
|
||||
MinecraftForge.setBlockHarvestLevel(BlockBase, 8, "pickaxe", 2);
|
||||
MinecraftForge.setBlockHarvestLevel(BlockBase, 9, "pickaxe", 2);
|
||||
MinecraftForge.setBlockHarvestLevel(BlockBase, 10, "pickaxe", 2);
|
||||
MinecraftForge.setBlockHarvestLevel(BlockBase, 11, "pickaxe", 2);
|
||||
BlockBase = new BlockBase().setStepSound(Block.soundTypeStone);
|
||||
GameRegistry.registerBlock(BlockBase, ItemBase.class, "Base Blocks", "mysticores", BLOCK_NAMES);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,36 +1,22 @@
|
|||
package mysticores.blocks;
|
||||
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemBlockWithMetadata;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemBase extends ItemBlock {
|
||||
public static String[] BLOCK_NAMES = new String[] { "Adamantine Ore", "Amethyst Ore", "Iridium Ore", "Mithril Ore", "Tourmaline Ore", "Topaz Ore", "Verdite Ore", "Bloodstone", "Black Soulstone",
|
||||
"Blue Soulstone", "Red Soulstone", "Agate Ore", "Tempered Glass" };
|
||||
import java.util.ArrayList;
|
||||
|
||||
public ItemBase(int par1) {
|
||||
super(par1);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIconFromDamage(int par1) {
|
||||
return BlockHandler.BlockBase.getIcon(2, par1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int par1) {
|
||||
return par1;
|
||||
public class ItemBase extends ItemBlockWithMetadata {
|
||||
public final ArrayList<String> names;
|
||||
public ItemBase(Block block, ArrayList<String> names) {
|
||||
super(block, block);
|
||||
this.names = names;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemStack) {
|
||||
int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, BLOCK_NAMES.length);
|
||||
return BLOCK_NAMES[meta];
|
||||
int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, names.size());
|
||||
return names.get(meta);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,22 @@
|
|||
package mysticores.items;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.EnumToolMaterial;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.common.EnumHelper;
|
||||
import net.minecraftforge.common.util.EnumHelper;
|
||||
|
||||
public class EnumTools
|
||||
{
|
||||
static EnumToolMaterial verditeToolMaterial = EnumHelper.addToolMaterial("Verdite", 1, 262, 5.0F, 1, 5);
|
||||
static EnumToolMaterial mithrilToolMaterial = EnumHelper.addToolMaterial("Mithril", 2, 500, 7.0F, 2, 9);
|
||||
static EnumToolMaterial adamantineToolMaterial = EnumHelper.addToolMaterial("Adamantine", 3, 3000, 10.0F, 5, 13);
|
||||
static EnumToolMaterial iridiumToolMaterial = EnumHelper.addToolMaterial("Iridium", 3, 4000, 12.0F, 7, 15);
|
||||
static EnumToolMaterial obsidianToolMaterial = EnumHelper.addToolMaterial("Obsidian", 2, 100, 4.0F, 6, 11);
|
||||
static EnumToolMaterial bloodstoneToolMaterial = EnumHelper.addToolMaterial("Bloodstone", 3, 200, 16.0F, 8, 12);
|
||||
static Item.ToolMaterial verditeToolMaterial = EnumHelper.addToolMaterial("Verdite", 1, 262, 5.0F, 1, 5);
|
||||
static Item.ToolMaterial mithrilToolMaterial = EnumHelper.addToolMaterial("Mithril", 2, 500, 7.0F, 2, 9);
|
||||
static Item.ToolMaterial adamantineToolMaterial = EnumHelper.addToolMaterial("Adamantine", 3, 3000, 10.0F, 5, 13);
|
||||
static Item.ToolMaterial iridiumToolMaterial = EnumHelper.addToolMaterial("Iridium", 3, 4000, 12.0F, 7, 15);
|
||||
static Item.ToolMaterial obsidianToolMaterial = EnumHelper.addToolMaterial("Obsidian", 2, 100, 4.0F, 6, 11);
|
||||
static Item.ToolMaterial bloodstoneToolMaterial = EnumHelper.addToolMaterial("Bloodstone", 3, 200, 16.0F, 8, 12);
|
||||
|
||||
static { verditeToolMaterial.customCraftingMaterial = Item.itemsList[Items.Resource.itemID]; }
|
||||
static { mithrilToolMaterial.customCraftingMaterial = Item.itemsList[Items.Resource.itemID]; }
|
||||
static { adamantineToolMaterial.customCraftingMaterial = Item.itemsList[Items.Resource.itemID]; }
|
||||
static { iridiumToolMaterial.customCraftingMaterial = Item.itemsList[Items.Resource.itemID]; }
|
||||
static { obsidianToolMaterial.customCraftingMaterial = Item.itemsList[Block.obsidian.blockID]; }
|
||||
static { bloodstoneToolMaterial.customCraftingMaterial = Item.itemsList[Items.Resource.itemID]; }
|
||||
static { verditeToolMaterial.customCraftingMaterial = Items.Resource; }
|
||||
static { mithrilToolMaterial.customCraftingMaterial = Items.Resource; }
|
||||
static { adamantineToolMaterial.customCraftingMaterial = Items.Resource; }
|
||||
static { iridiumToolMaterial.customCraftingMaterial = Items.Resource; }
|
||||
static { obsidianToolMaterial.customCraftingMaterial = Item.getItemFromBlock(Blocks.obsidian); }
|
||||
static { bloodstoneToolMaterial.customCraftingMaterial = Items.Resource; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,36 +3,36 @@ package mysticores.items;
|
|||
import java.util.List;
|
||||
|
||||
import mysticores.MysticOres;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemResource extends Item {
|
||||
private Icon[] icons;
|
||||
private IIcon[] icons;
|
||||
private static final String[] RESOURCE_TYPES = new String[] { "Verdite Ingot", "Mithril Ingot", "Adamantine Ingot", "Iridium Ingot", "Iridium Nugget", "Tourmaline Gem", "Agate Gem", "Topaz Gem",
|
||||
"Amethyst Gem", "Mystic Powder", "Bloodstone Shard", "Glass Shard", "Obsidian Shard", "Obsidian Rod" };
|
||||
|
||||
public ItemResource(int id) {
|
||||
super(id);
|
||||
public ItemResource() {
|
||||
super();
|
||||
this.setHasSubtypes(true);
|
||||
this.setCreativeTab(MysticOres.MysticOresTab);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIconFromDamage(int meta) {
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
int j = MathHelper.clamp_int(meta, 0, RESOURCE_TYPES.length);
|
||||
return icons[j];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) {
|
||||
public void getSubItems(Item par1, CreativeTabs par2CreativeTabs, List par3List) {
|
||||
for (int var4 = 0; var4 < RESOURCE_TYPES.length; var4++)
|
||||
par3List.add(new ItemStack(par1, 1, var4));
|
||||
}
|
||||
|
|
@ -45,8 +45,8 @@ public class ItemResource extends Item {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister iconRegister) {
|
||||
icons = new Icon[RESOURCE_TYPES.length];
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
icons = new IIcon[RESOURCE_TYPES.length];
|
||||
for (int i = 0; i < RESOURCE_TYPES.length; ++i)
|
||||
icons[i] = iconRegister.registerIcon("mysticores:" + RESOURCE_TYPES[i]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,15 +9,15 @@ import cpw.mods.fml.relauncher.Side;
|
|||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemSatchel extends Item {
|
||||
public ItemSatchel(int par1) {
|
||||
super(par1);
|
||||
public ItemSatchel() {
|
||||
super();
|
||||
setCreativeTab(MysticOres.MysticOresTab);
|
||||
setMaxStackSize(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean hasEffect(ItemStack par1ItemStack) {
|
||||
public boolean hasEffect(ItemStack par1ItemStack, int i) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,11 +4,8 @@ import java.lang.reflect.Field;
|
|||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import mysticores.MysticOres;
|
||||
import mysticores.lib.ItemID;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemAxe;
|
||||
import net.minecraft.item.ItemHoe;
|
||||
import net.minecraft.item.ItemPickaxe;
|
||||
import net.minecraft.item.ItemSpade;
|
||||
import net.minecraft.item.ItemSword;
|
||||
|
||||
|
|
@ -23,62 +20,62 @@ public class Items {
|
|||
public static Item Satchel;
|
||||
|
||||
public static void initialize() {
|
||||
Resource = new ItemResource(ItemID.RESOURCES);
|
||||
VerditeSword = new ItemSword(ItemID.VERDITESWORD, EnumTools.verditeToolMaterial).setUnlocalizedName("VerditeSword").setTextureName("mysticores:VerditeSword")
|
||||
Resource = new ItemResource();
|
||||
VerditeSword = new ItemSword(EnumTools.verditeToolMaterial).setUnlocalizedName("VerditeSword").setTextureName("mysticores:VerditeSword")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
VerditePickaxe = new ItemPickaxe(ItemID.VERDITEPICKAXE, EnumTools.verditeToolMaterial).setUnlocalizedName("VerditePickaxe").setTextureName("mysticores:VerditePickaxe")
|
||||
VerditePickaxe = new ItemPick(EnumTools.verditeToolMaterial).setUnlocalizedName("VerditePickaxe").setTextureName("mysticores:VerditePickaxe")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
VerditeShovel = new ItemSpade(ItemID.VERDITESHOVEL, EnumTools.verditeToolMaterial).setUnlocalizedName("VerditeShovel").setTextureName("mysticores:VerditeShovel")
|
||||
VerditeShovel = new ItemSpade(EnumTools.verditeToolMaterial).setUnlocalizedName("VerditeShovel").setTextureName("mysticores:VerditeShovel")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
VerditeAxe = new ItemAxe(ItemID.VERDITEAXE, EnumTools.verditeToolMaterial).setUnlocalizedName("VerditeAxe").setTextureName("mysticores:VerditeAxe").setCreativeTab(MysticOres.MysticOresTab);
|
||||
VerditeHoe = new ItemHoe(ItemID.VERDITEHOE, EnumTools.verditeToolMaterial).setUnlocalizedName("VerditeHoe").setTextureName("mysticores:VerditeHoe").setCreativeTab(MysticOres.MysticOresTab);
|
||||
MithrilSword = new ItemSword(ItemID.MITHRILSWORD, EnumTools.mithrilToolMaterial).setUnlocalizedName("MithrilSword").setTextureName("mysticores:MithrilSword")
|
||||
VerditeAxe = new ItemHatchet(EnumTools.verditeToolMaterial).setUnlocalizedName("VerditeAxe").setTextureName("mysticores:VerditeAxe").setCreativeTab(MysticOres.MysticOresTab);
|
||||
VerditeHoe = new ItemHoe(EnumTools.verditeToolMaterial).setUnlocalizedName("VerditeHoe").setTextureName("mysticores:VerditeHoe").setCreativeTab(MysticOres.MysticOresTab);
|
||||
MithrilSword = new ItemSword(EnumTools.mithrilToolMaterial).setUnlocalizedName("MithrilSword").setTextureName("mysticores:MithrilSword")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
MithrilPickaxe = new ItemPickaxe(ItemID.MITHRILPICKAXE, EnumTools.mithrilToolMaterial).setUnlocalizedName("MithrilPickaxe").setTextureName("mysticores:MithrilPickaxe")
|
||||
MithrilPickaxe = new ItemPick(EnumTools.mithrilToolMaterial).setUnlocalizedName("MithrilPickaxe").setTextureName("mysticores:MithrilPickaxe")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
MithrilShovel = new ItemSpade(ItemID.MITHRILSHOVEL, EnumTools.mithrilToolMaterial).setUnlocalizedName("MithrilShovel").setTextureName("mysticores:MithrilShovel")
|
||||
MithrilShovel = new ItemSpade(EnumTools.mithrilToolMaterial).setUnlocalizedName("MithrilShovel").setTextureName("mysticores:MithrilShovel")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
MithrilAxe = new ItemAxe(ItemID.MITHRILAXE, EnumTools.mithrilToolMaterial).setUnlocalizedName("MithrilAxe").setTextureName("mysticores:MithrilAxe").setCreativeTab(MysticOres.MysticOresTab);
|
||||
MithrilHoe = new ItemHoe(ItemID.MITHRILHOE, EnumTools.mithrilToolMaterial).setUnlocalizedName("MithrilHoe").setTextureName("mysticores:MithrilHoe").setCreativeTab(MysticOres.MysticOresTab);
|
||||
AdamantineSword = new ItemSword(ItemID.ADAMANTINESWORD, EnumTools.adamantineToolMaterial).setUnlocalizedName("AdamantineSword").setTextureName("mysticores:AdamantineSword")
|
||||
MithrilAxe = new ItemHatchet(EnumTools.mithrilToolMaterial).setUnlocalizedName("MithrilAxe").setTextureName("mysticores:MithrilAxe").setCreativeTab(MysticOres.MysticOresTab);
|
||||
MithrilHoe = new ItemHoe(EnumTools.mithrilToolMaterial).setUnlocalizedName("MithrilHoe").setTextureName("mysticores:MithrilHoe").setCreativeTab(MysticOres.MysticOresTab);
|
||||
AdamantineSword = new ItemSword(EnumTools.adamantineToolMaterial).setUnlocalizedName("AdamantineSword").setTextureName("mysticores:AdamantineSword")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
AdamantinePickaxe = new ItemPickaxe(ItemID.ADAMANTINEPICKAXE, EnumTools.adamantineToolMaterial).setUnlocalizedName("AdamantinePickaxe").setTextureName("mysticores:AdamantinePickaxe")
|
||||
AdamantinePickaxe = new ItemPick(EnumTools.adamantineToolMaterial).setUnlocalizedName("AdamantinePickaxe").setTextureName("mysticores:AdamantinePickaxe")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
AdamantineShovel = new ItemSpade(ItemID.ADAMANTINESHOVEL, EnumTools.adamantineToolMaterial).setUnlocalizedName("AdamantineShovel").setTextureName("mysticores:AdamantineShovel")
|
||||
AdamantineShovel = new ItemSpade(EnumTools.adamantineToolMaterial).setUnlocalizedName("AdamantineShovel").setTextureName("mysticores:AdamantineShovel")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
AdamantineAxe = new ItemAxe(ItemID.ADAMANTINEAXE, EnumTools.adamantineToolMaterial).setUnlocalizedName("AdamantineAxe").setTextureName("mysticores:AdamantineAxe")
|
||||
AdamantineAxe = new ItemHatchet(EnumTools.adamantineToolMaterial).setUnlocalizedName("AdamantineAxe").setTextureName("mysticores:AdamantineAxe")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
AdamantineHoe = new ItemHoe(ItemID.ADAMANTINEHOE, EnumTools.adamantineToolMaterial).setUnlocalizedName("AdamantineHoe").setTextureName("mysticores:AdamantineHoe")
|
||||
AdamantineHoe = new ItemHoe(EnumTools.adamantineToolMaterial).setUnlocalizedName("AdamantineHoe").setTextureName("mysticores:AdamantineHoe")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
IridiumSword = new ItemSword(ItemID.IRIDIUMSWORD, EnumTools.iridiumToolMaterial).setUnlocalizedName("IridiumSword").setTextureName("mysticores:IridiumSword")
|
||||
IridiumSword = new ItemSword(EnumTools.iridiumToolMaterial).setUnlocalizedName("IridiumSword").setTextureName("mysticores:IridiumSword")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
IridiumPickaxe = new ItemPickaxe(ItemID.IRIDIUMPICKAXE, EnumTools.iridiumToolMaterial).setUnlocalizedName("IridiumPickaxe").setTextureName("mysticores:IridiumPickaxe")
|
||||
IridiumPickaxe = new ItemPick(EnumTools.iridiumToolMaterial).setUnlocalizedName("IridiumPickaxe").setTextureName("mysticores:IridiumPickaxe")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
IridiumShovel = new ItemSpade(ItemID.IRIDIUMSHOVEL, EnumTools.iridiumToolMaterial).setUnlocalizedName("IridiumShovel").setTextureName("mysticores:IridiumShovel")
|
||||
IridiumShovel = new ItemSpade(EnumTools.iridiumToolMaterial).setUnlocalizedName("IridiumShovel").setTextureName("mysticores:IridiumShovel")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
IridiumAxe = new ItemAxe(ItemID.IRIDIUMAXE, EnumTools.iridiumToolMaterial).setUnlocalizedName("IridiumAxe").setTextureName("mysticores:IridiumAxe").setCreativeTab(MysticOres.MysticOresTab);
|
||||
IridiumHoe = new ItemHoe(ItemID.IRIDIUMHOE, EnumTools.iridiumToolMaterial).setUnlocalizedName("IridiumHoe").setTextureName("mysticores:IridiumHoe").setCreativeTab(MysticOres.MysticOresTab);
|
||||
BloodstoneSword = new ItemSword(ItemID.BLOODSTONESWORD, EnumTools.bloodstoneToolMaterial).setUnlocalizedName("BloodstoneSword").setTextureName("mysticores:BloodstoneSword")
|
||||
IridiumAxe = new ItemHatchet(EnumTools.iridiumToolMaterial).setUnlocalizedName("IridiumAxe").setTextureName("mysticores:IridiumAxe").setCreativeTab(MysticOres.MysticOresTab);
|
||||
IridiumHoe = new ItemHoe(EnumTools.iridiumToolMaterial).setUnlocalizedName("IridiumHoe").setTextureName("mysticores:IridiumHoe").setCreativeTab(MysticOres.MysticOresTab);
|
||||
BloodstoneSword = new ItemSword(EnumTools.bloodstoneToolMaterial).setUnlocalizedName("BloodstoneSword").setTextureName("mysticores:BloodstoneSword")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
BloodstonePickaxe = new ItemPickaxe(ItemID.BLOODSTONEPICKAXE, EnumTools.bloodstoneToolMaterial).setUnlocalizedName("BloodstonePickaxe").setTextureName("mysticores:BloodstonePickaxe")
|
||||
BloodstonePickaxe = new ItemPick(EnumTools.bloodstoneToolMaterial).setUnlocalizedName("BloodstonePickaxe").setTextureName("mysticores:BloodstonePickaxe")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
BloodstoneShovel = new ItemSpade(ItemID.BLOODSTONESHOVEL, EnumTools.bloodstoneToolMaterial).setUnlocalizedName("BloodstoneShovel").setTextureName("mysticores:BloodstoneShovel")
|
||||
BloodstoneShovel = new ItemSpade(EnumTools.bloodstoneToolMaterial).setUnlocalizedName("BloodstoneShovel").setTextureName("mysticores:BloodstoneShovel")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
BloodstoneAxe = new ItemAxe(ItemID.BLOODSTONEAXE, EnumTools.bloodstoneToolMaterial).setUnlocalizedName("BloodstoneAxe").setTextureName("mysticores:BloodstoneAxe")
|
||||
BloodstoneAxe = new ItemHatchet(EnumTools.bloodstoneToolMaterial).setUnlocalizedName("BloodstoneAxe").setTextureName("mysticores:BloodstoneAxe")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
BloodstoneHoe = new ItemHoe(ItemID.BLOODSTONEHOE, EnumTools.bloodstoneToolMaterial).setUnlocalizedName("BloodstoneHoe").setTextureName("mysticores:BloodstoneHoe")
|
||||
BloodstoneHoe = new ItemHoe(EnumTools.bloodstoneToolMaterial).setUnlocalizedName("BloodstoneHoe").setTextureName("mysticores:BloodstoneHoe")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
ObsidianSword = new ItemSword(ItemID.OBSIDIANSWORD, EnumTools.obsidianToolMaterial).setUnlocalizedName("ObsidianSword").setTextureName("mysticores:ObsidianSword")
|
||||
ObsidianSword = new ItemSword(EnumTools.obsidianToolMaterial).setUnlocalizedName("ObsidianSword").setTextureName("mysticores:ObsidianSword")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
ObsidianPickaxe = new ItemPickaxe(ItemID.OBSIDIANPICKAXE, EnumTools.obsidianToolMaterial).setUnlocalizedName("ObsidianPickaxe").setTextureName("mysticores:ObsidianPickaxe")
|
||||
ObsidianPickaxe = new ItemPick(EnumTools.obsidianToolMaterial).setUnlocalizedName("ObsidianPickaxe").setTextureName("mysticores:ObsidianPickaxe")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
ObsidianShovel = new ItemSpade(ItemID.OBSIDIANSHOVEL, EnumTools.obsidianToolMaterial).setUnlocalizedName("ObsidianShovel").setTextureName("mysticores:ObsidianShovel")
|
||||
ObsidianShovel = new ItemSpade(EnumTools.obsidianToolMaterial).setUnlocalizedName("ObsidianShovel").setTextureName("mysticores:ObsidianShovel")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
ObsidianAxe = new ItemAxe(ItemID.OBSIDIANAXE, EnumTools.obsidianToolMaterial).setUnlocalizedName("ObsidianAxe").setTextureName("mysticores:ObsidianAxe")
|
||||
ObsidianAxe = new ItemHatchet(EnumTools.obsidianToolMaterial).setUnlocalizedName("ObsidianAxe").setTextureName("mysticores:ObsidianAxe")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
ObsidianHoe = new ItemHoe(ItemID.OBSIDIANHOE, EnumTools.obsidianToolMaterial).setUnlocalizedName("ObsidianHoe").setTextureName("mysticores:ObsidianHoe")
|
||||
ObsidianHoe = new ItemHoe(EnumTools.obsidianToolMaterial).setUnlocalizedName("ObsidianHoe").setTextureName("mysticores:ObsidianHoe")
|
||||
.setCreativeTab(MysticOres.MysticOresTab);
|
||||
Satchel = new ItemSatchel(ItemID.SATCHEL).setUnlocalizedName("Satchel");
|
||||
Satchel = new ItemSatchel().setUnlocalizedName("Satchel");
|
||||
try {
|
||||
for(Field f:Items.class.getFields()){
|
||||
Item it = (Item) f.get(null);
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
package mysticores.lib;
|
||||
|
||||
public class ItemID {
|
||||
public static int VERDITESWORD = 7050, VERDITEPICKAXE = 7051, VERDITESHOVEL = 7052, VERDITEAXE = 7053, VERDITEHOE = 7054;
|
||||
public static int MITHRILSWORD = 7055, MITHRILPICKAXE = 7056, MITHRILSHOVEL = 7057, MITHRILAXE = 7058, MITHRILHOE = 7059;
|
||||
public static int ADAMANTINESWORD = 7060, ADAMANTINEPICKAXE = 7061, ADAMANTINESHOVEL = 7062, ADAMANTINEAXE = 7063, ADAMANTINEHOE = 7064;
|
||||
public static int IRIDIUMSWORD = 7065, IRIDIUMPICKAXE = 7066, IRIDIUMSHOVEL = 7067, IRIDIUMAXE = 7068, IRIDIUMHOE = 7069;
|
||||
public static int OBSIDIANSWORD = 7070, OBSIDIANPICKAXE = 7071, OBSIDIANSHOVEL = 7072, OBSIDIANAXE = 7073, OBSIDIANHOE = 7074;
|
||||
public static int BLOODSTONESWORD = 7075, BLOODSTONEPICKAXE = 7076, BLOODSTONESHOVEL = 7077, BLOODSTONEAXE = 7078, BLOODSTONEHOE = 7079;
|
||||
public static int SATCHEL = 7080;
|
||||
public static int RESOURCES = 7081;
|
||||
}
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
package mysticores;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import mysticores.blocks.BlockHandler;
|
||||
import mysticores.items.Items;
|
||||
import mysticores.util.ConfigurationManager;
|
||||
|
|
@ -7,30 +9,38 @@ import mysticores.util.OreDictManager;
|
|||
import mysticores.util.RecipeManager;
|
||||
import mysticores.worldgen.GeneratorManager;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
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;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.network.NetworkMod;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
@Mod(modid = "mysticores", name = "Mystic Ores", version = "0.1")
|
||||
@NetworkMod(clientSideRequired = true)
|
||||
public class MysticOres implements IFuelHandler {
|
||||
@Instance("mysticores")
|
||||
public static MysticOres instance;
|
||||
public boolean ENABLE = true;
|
||||
public static final CreativeTabs MysticOresTab = new CreativeTabs("MysticOresTab") {
|
||||
@Override
|
||||
public ItemStack getIconItemStack() {
|
||||
return new ItemStack(BlockHandler.BlockBase, 1, 7);
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public Item getTabIconItem() {
|
||||
return Item.getItemFromBlock(BlockHandler.BlockBase);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int func_151243_f()
|
||||
{
|
||||
return 7;
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public int getBurnTime(ItemStack fuel) {
|
||||
if (fuel.getItem().itemID == Items.Resource.itemID && fuel.getItemDamage() == 4)
|
||||
if (fuel.getItem() == Items.Resource && fuel.getItemDamage() == 4)
|
||||
return 12800;
|
||||
else
|
||||
return 0;
|
||||
|
|
@ -39,11 +49,13 @@ public class MysticOres implements IFuelHandler {
|
|||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
ConfigurationManager.initialize(event.getSuggestedConfigurationFile());
|
||||
BlockHandler.initialize();
|
||||
Items.initialize();
|
||||
OreDictManager.initialize();
|
||||
RecipeManager.initialize();
|
||||
GeneratorManager.initialize();
|
||||
GameRegistry.registerFuelHandler(this);
|
||||
if(ENABLE){
|
||||
BlockHandler.initialize();
|
||||
Items.initialize();
|
||||
OreDictManager.initialize();
|
||||
RecipeManager.initialize();
|
||||
GeneratorManager.initialize();
|
||||
GameRegistry.registerFuelHandler(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -2,47 +2,14 @@ package mysticores.util;
|
|||
|
||||
import java.io.File;
|
||||
|
||||
import mysticores.blocks.BlockHandler;
|
||||
import mysticores.lib.ItemID;
|
||||
import mysticores.MysticOres;
|
||||
import mysticores.lib.Rarity;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
public class ConfigurationManager {
|
||||
public static void initialize(File file) {
|
||||
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();
|
||||
MysticOres.instance.ENABLE = config.get("General", "Enable", true).getBoolean(true);
|
||||
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();
|
||||
|
|
|
|||
|
|
@ -2,8 +2,7 @@ package mysticores.util;
|
|||
|
||||
import mysticores.blocks.BlockHandler;
|
||||
import mysticores.items.Items;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
|
|
@ -19,31 +18,31 @@ public class RecipeManager {
|
|||
}
|
||||
|
||||
private static void powderRecipes() {
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Block.oreGold, 2), OreDictManager.INGOTS[9], "oreGold"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Block.oreIron, 2), OreDictManager.INGOTS[9], "oreIron"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.gold_ore, 2), OreDictManager.INGOTS[9], "oreGold"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.iron_ore, 2), OreDictManager.INGOTS[9], "oreIron"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.Resource, 2, 10), OreDictManager.INGOTS[9], OreDictManager.INGOTS[10]));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Item.gunpowder, 2), OreDictManager.INGOTS[9], Item.gunpowder));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(net.minecraft.init.Items.gunpowder, 2), OreDictManager.INGOTS[9], net.minecraft.init.Items.gunpowder));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.Resource, 2, 4), OreDictManager.INGOTS[9], OreDictManager.INGOTS[4]));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Block.oreCoal, 2), OreDictManager.INGOTS[9], Block.oreCoal));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Block.oreIron, 3), OreDictManager.INGOTS[9], "oreIron"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Block.oreGold, 3), OreDictManager.INGOTS[9], "oreGold"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Block.oreRedstone, 2), OreDictManager.INGOTS[9], "oreRedstone"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Block.oreLapis, 2), OreDictManager.INGOTS[9], "oreLapis"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Block.oreDiamond, 2), OreDictManager.INGOTS[9], "oreDiamond"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Item.sugar, 18), OreDictManager.INGOTS[9], Item.sugar));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Item.redstone, 12), OreDictManager.INGOTS[9], Item.redstone));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Item.glowstone, 6), OreDictManager.INGOTS[9], Item.glowstone));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Item.gunpowder, 3), OreDictManager.INGOTS[9], Item.gunpowder));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.coal_ore, 2), OreDictManager.INGOTS[9], Blocks.coal_ore));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.iron_ore, 3), OreDictManager.INGOTS[9], "oreIron"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.gold_ore, 3), OreDictManager.INGOTS[9], "oreGold"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.redstone_ore, 2), OreDictManager.INGOTS[9], "oreRedstone"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.lapis_ore, 2), OreDictManager.INGOTS[9], "oreLapis"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Blocks.diamond_ore, 2), OreDictManager.INGOTS[9], "oreDiamond"));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(net.minecraft.init.Items.sugar, 18), OreDictManager.INGOTS[9], net.minecraft.init.Items.sugar));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(net.minecraft.init.Items.redstone, 12), OreDictManager.INGOTS[9], net.minecraft.init.Items.redstone));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(net.minecraft.init.Items.glowstone_dust, 6), OreDictManager.INGOTS[9], net.minecraft.init.Items.glowstone_dust));
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(net.minecraft.init.Items.gunpowder, 3), OreDictManager.INGOTS[9], net.minecraft.init.Items.gunpowder));
|
||||
}
|
||||
|
||||
private static void recipes() {
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Block.glass, 1), "##", "##", '#', OreDictManager.INGOTS[11]));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Block.obsidian, 1), "##", "##", '#', OreDictManager.INGOTS[12]));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockHandler.BlockBase, 8, 7), "XXX", "XOX", "XXX", Character.valueOf('X'), Block.dirt, Character.valueOf('O'),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.glass, 1), "##", "##", '#', OreDictManager.INGOTS[11]));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Blocks.obsidian, 1), "##", "##", '#', OreDictManager.INGOTS[12]));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockHandler.BlockBase, 8, 7), "XXX", "XOX", "XXX", Character.valueOf('X'), Blocks.dirt, Character.valueOf('O'),
|
||||
OreDictManager.INGOTS[6]));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockHandler.BlockBase, 16, 7), "XXX", "XOX", "XXX", Character.valueOf('X'), OreDictManager.ORES[3], Character.valueOf('O'),
|
||||
OreDictManager.INGOTS[6]));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockHandler.BlockBase, 8, 3), "XXX", "XOX", "XXX", Character.valueOf('X'), Block.dirt, Character.valueOf('O'),
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockHandler.BlockBase, 8, 3), "XXX", "XOX", "XXX", Character.valueOf('X'), Blocks.dirt, Character.valueOf('O'),
|
||||
OreDictManager.INGOTS[8]));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockHandler.BlockBase, 8, 12), "###", "#D#", "###", '#', OreDictManager.INGOTS[11], 'D', OreDictManager.INGOTS[12]));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(BlockHandler.BlockBase, 1, 7), "##", "##", '#', OreDictManager.INGOTS[10]));
|
||||
|
|
@ -52,21 +51,21 @@ public class RecipeManager {
|
|||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(BlockHandler.BlockBase, 2, 0), OreDictManager.INGOTS[9], OreDictManager.ORES[0]));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.Resource, 2, 13), "#", "#", '#', OreDictManager.INGOTS[12]));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.Resource, 1, 3), "###", "#O#", "###", '#', OreDictManager.INGOTS[4], 'O', OreDictManager.INGOTS[2]));
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.Resource, 4, 11), Block.glass);
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.Resource, 4, 12), Block.obsidian);
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.Resource, 4, 11), Blocks.glass);
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.Resource, 4, 12), Blocks.obsidian);
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(Items.Resource, 8, 9), OreDictManager.INGOTS[5], OreDictManager.INGOTS[7], OreDictManager.INGOTS[8], OreDictManager.INGOTS[6]));
|
||||
}
|
||||
|
||||
private static void smelting() {
|
||||
FurnaceRecipes.smelting().addSmelting(BlockHandler.BlockBase.blockID, 6, new ItemStack(Items.Resource, 1, 0), 0.4F);
|
||||
FurnaceRecipes.smelting().addSmelting(BlockHandler.BlockBase.blockID, 3, new ItemStack(Items.Resource, 1, 1), 0.7F);
|
||||
FurnaceRecipes.smelting().addSmelting(BlockHandler.BlockBase.blockID, 0, new ItemStack(Items.Resource, 1, 2), 0.9F);
|
||||
FurnaceRecipes.smelting().addSmelting(BlockHandler.BlockBase.blockID, 2, new ItemStack(Items.Resource, 1, 4), 0.4F);
|
||||
FurnaceRecipes.smelting().addSmelting(BlockHandler.BlockBase.blockID, 4, new ItemStack(Items.Resource, 1, 5), 0.4F);
|
||||
FurnaceRecipes.smelting().addSmelting(BlockHandler.BlockBase.blockID, 11, new ItemStack(Items.Resource, 1, 6), 0.4F);
|
||||
FurnaceRecipes.smelting().addSmelting(BlockHandler.BlockBase.blockID, 5, new ItemStack(Items.Resource, 1, 7), 0.4F);
|
||||
FurnaceRecipes.smelting().addSmelting(BlockHandler.BlockBase.blockID, 1, new ItemStack(Items.Resource, 1, 8), 0.4F);
|
||||
FurnaceRecipes.smelting().addSmelting(BlockHandler.BlockBase.blockID, 7, new ItemStack(Items.Resource, 1, 10), 0.4F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(BlockHandler.BlockBase,1, 6), new ItemStack(Items.Resource, 1, 0), 0.4F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(BlockHandler.BlockBase,1, 3), new ItemStack(Items.Resource, 1, 1), 0.7F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(BlockHandler.BlockBase,1, 0), new ItemStack(Items.Resource, 1, 2), 0.9F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(BlockHandler.BlockBase,1, 2), new ItemStack(Items.Resource, 1, 4), 0.4F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(BlockHandler.BlockBase,1, 4), new ItemStack(Items.Resource, 1, 5), 0.4F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(BlockHandler.BlockBase,1, 11), new ItemStack(Items.Resource, 1, 6), 0.4F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(BlockHandler.BlockBase,1, 5), new ItemStack(Items.Resource, 1, 7), 0.4F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(BlockHandler.BlockBase,1, 1), new ItemStack(Items.Resource, 1, 8), 0.4F);
|
||||
FurnaceRecipes.smelting().func_151394_a(new ItemStack(BlockHandler.BlockBase,1, 7), new ItemStack(Items.Resource, 1, 10), 0.4F);
|
||||
}
|
||||
|
||||
private static void toolRecipes() {
|
||||
|
|
@ -95,16 +94,16 @@ public class RecipeManager {
|
|||
ToolRecipes.AdvancedShovelRecipe(Items.IridiumShovel, OreDictManager.INGOTS[3]);
|
||||
ToolRecipes.AdvancedAxeRecipe(Items.IridiumAxe, OreDictManager.INGOTS[3]);
|
||||
ToolRecipes.AdvancedHoeRecipe(Items.IridiumHoe, OreDictManager.INGOTS[3]);
|
||||
ToolRecipes.AdvancedSwordRecipe(Items.ObsidianSword, new ItemStack(Block.obsidian));
|
||||
ToolRecipes.AdvancedPickaxeRecipe(Items.ObsidianPickaxe, new ItemStack(Block.obsidian));
|
||||
ToolRecipes.AdvancedShovelRecipe(Items.ObsidianShovel, new ItemStack(Block.obsidian));
|
||||
ToolRecipes.AdvancedAxeRecipe(Items.ObsidianAxe, new ItemStack(Block.obsidian));
|
||||
ToolRecipes.AdvancedHoeRecipe(Items.ObsidianHoe, new ItemStack(Block.obsidian));
|
||||
ToolRecipes.AdvancedSwordRecipe(Items.ObsidianSword, new ItemStack(Blocks.obsidian));
|
||||
ToolRecipes.AdvancedPickaxeRecipe(Items.ObsidianPickaxe, new ItemStack(Blocks.obsidian));
|
||||
ToolRecipes.AdvancedShovelRecipe(Items.ObsidianShovel, new ItemStack(Blocks.obsidian));
|
||||
ToolRecipes.AdvancedAxeRecipe(Items.ObsidianAxe, new ItemStack(Blocks.obsidian));
|
||||
ToolRecipes.AdvancedHoeRecipe(Items.ObsidianHoe, new ItemStack(Blocks.obsidian));
|
||||
ToolRecipes.AdvancedSwordRecipe(Items.BloodstoneSword, OreDictManager.ORES[7]);
|
||||
ToolRecipes.AdvancedPickaxeRecipe(Items.BloodstonePickaxe, OreDictManager.ORES[7]);
|
||||
ToolRecipes.AdvancedShovelRecipe(Items.BloodstoneShovel, OreDictManager.ORES[7]);
|
||||
ToolRecipes.AdvancedAxeRecipe(Items.BloodstoneAxe, OreDictManager.ORES[7]);
|
||||
ToolRecipes.AdvancedHoeRecipe(Items.BloodstoneHoe, OreDictManager.ORES[7]);
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.Satchel, 1), "#$#", "$%$", "#$#", '#', Item.silk, '$', OreDictManager.INGOTS[9], '%', Block.enderChest));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Items.Satchel, 1), "#$#", "$%$", "#$#", '#', net.minecraft.init.Items.string, '$', OreDictManager.INGOTS[9], '%', Blocks.ender_chest));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
|||
|
||||
public class GeneratorManager {
|
||||
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));
|
||||
GameRegistry.registerWorldGenerator(new NetherGenMineable(BlockHandler.BlockBase.blockID, 10, Rarity.REDSOULSTONE));
|
||||
GameRegistry.registerWorldGenerator(new WorldGenOres(), 100);
|
||||
GameRegistry.registerWorldGenerator(new NetherGenMineable(BlockHandler.BlockBase, 7, Rarity.BLOODSTONE + 1), 100);
|
||||
GameRegistry.registerWorldGenerator(new NetherGenMineable(BlockHandler.BlockBase, 8, Rarity.BLACKSOULSTONE + 1), 100);
|
||||
GameRegistry.registerWorldGenerator(new NetherGenMineable(BlockHandler.BlockBase, 9, Rarity.BLUESOULSTONE + 1), 100);
|
||||
GameRegistry.registerWorldGenerator(new NetherGenMineable(BlockHandler.BlockBase, 10, Rarity.REDSOULSTONE), 100);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,21 +3,22 @@ package mysticores.worldgen;
|
|||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
||||
public class NetherGenHelper extends WorldGenerator {
|
||||
private int minableBlockId;
|
||||
private Block minableBlockId;
|
||||
private int minableBlockMeta = 0;
|
||||
private int numberOfBlocks;
|
||||
|
||||
public NetherGenHelper(int par1, int par2) {
|
||||
public NetherGenHelper(Block par1, int par2) {
|
||||
this.minableBlockId = par1;
|
||||
this.numberOfBlocks = par2;
|
||||
}
|
||||
|
||||
public NetherGenHelper(int id, int meta, int number) {
|
||||
public NetherGenHelper(Block id, int meta, int number) {
|
||||
this(id, number);
|
||||
minableBlockMeta = meta;
|
||||
}
|
||||
|
|
@ -52,8 +53,8 @@ public class NetherGenHelper extends WorldGenerator {
|
|||
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) {
|
||||
Block blocktoreplace = par1World.getBlock(var38, var41, var44);
|
||||
if (var39 * var39 + var42 * var42 + var45 * var45 < 1.0D && blocktoreplace == Blocks.netherrack) {
|
||||
par1World.setBlock(var38, var41, var44, this.minableBlockId, minableBlockMeta, 3);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package mysticores.worldgen;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
|
@ -10,11 +11,11 @@ import cpw.mods.fml.common.IWorldGenerator;
|
|||
public class NetherGenMineable implements IWorldGenerator {
|
||||
private WorldGenerator helper;
|
||||
|
||||
public NetherGenMineable(int blockId, int numBlocks) {
|
||||
public NetherGenMineable(Block blockId, int numBlocks) {
|
||||
helper = new NetherGenHelper(blockId, numBlocks);
|
||||
}
|
||||
|
||||
public NetherGenMineable(int blockId, int meta, int numBlocks) {
|
||||
public NetherGenMineable(Block blockId, int meta, int numBlocks) {
|
||||
helper = new NetherGenHelper(blockId, meta, numBlocks);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue