我不知道问题是什么,我可以启动 Minecraft,但它会将我重定向到错误窗口。这是源代码:
package net.minecraft.src;
import java.util.Random;
public class mod_PixelatedExtension extends BaseMod {
public static final Item EmeraldSword = new ItemSword(10000,
EnumToolMaterial.MOD_EMERALD).setItemName("Emerald Sword");
public static final Item EmeraldPickaxe = new ItemPickaxe(10001,
EnumToolMaterial.MOD_EMERALD).setItemName("Emerald Pickaxe");
public static final Item EmeraldAxe = new ItemAxe(10002,
EnumToolMaterial.MOD_EMERALD).setItemName("Emerald Axe");
public static final Item EmeraldShovel = new ItemSpade(10003,
EnumToolMaterial.MOD_EMERALD).setItemName("Emerald Shovel");
public static final Item EmeraldHoe = new ItemHoe(10004,
EnumToolMaterial.MOD_EMERALD).setItemName("Emerald Hoe");
public static final Item AmethystGem = new Item(10005).setItemName(
"Amethyst Gem").setCreativeTab(CreativeTabs.tabMaterials);
public static final Block AmethystOre = new BlockAmethyst(151, 0)
.setHardness(6F).setResistance(7.0F).setBlockName("Amethyst Ore");
public static final Block RubyOre = new BlockRuby(151, 0).setHardness(6F)
.setResistance(7.0F).setBlockName("Ruby Ore");
public static final Item RubyGem = new Item(10006).setItemName("Ruby Gem")
.setCreativeTab(CreativeTabs.tabMaterials);
public void generateSurface(World world, Random random, int chunkX,
int chunkZ) {
Random randomGenerator = random;
for (int i = 0; i < 10; i++) {
// Ore Generator för Amethyst (BlockAmethyst.java)
int randPosX = chunkX + randomGenerator.nextInt(20);
int randPosY = random.nextInt(20);
int randPosZ = chunkZ + randomGenerator.nextInt(20);
(new WorldGenMinable(AmethystOre.blockID, 4)).generate(world,
random, randPosX, randPosY, randPosZ);
}
}
public void load() {
// Emerald
// Emerald svärdet
EmeraldSword.iconIndex = ModLoader.addOverride("/gui/items.png",
"/items/EmeraldSword.png");
ModLoader.addName(EmeraldSword, "Emerald Sword");
ModLoader.addRecipe(new ItemStack(EmeraldSword, 1), new Object[] {
" * ", " * ", " X ", 'X', Item.blazeRod, '*', Item.emerald });
// Emerald Picka
EmeraldPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png",
"/items/EmeraldPick.png");
ModLoader.addName(EmeraldPickaxe, "Emerald Pickaxe");
ModLoader.addRecipe(new ItemStack(EmeraldPickaxe, 1), new Object[] {
"***", " X ", " X ", 'X', Item.blazeRod, '*', Item.emerald });
// Emerald Axe
EmeraldAxe.iconIndex = ModLoader.addOverride("/gui/items.png",
"/items/EmeraldAxe.png");
ModLoader.addName(EmeraldAxe, "Emerald Axe");
ModLoader.addRecipe(new ItemStack(EmeraldAxe, 1), new Object[] { "** ",
"*X ", " X ", 'X', Item.blazeRod, '*', Item.emerald });
// Emerald Shovel
EmeraldShovel.iconIndex = ModLoader.addOverride("/gui/items.png",
"/items/EmeraldShovel.png");
ModLoader.addName(EmeraldShovel, "Emerald Shovel");
ModLoader.addRecipe(new ItemStack(EmeraldShovel, 1), new Object[] {
" * ", " X ", " X ", 'X', Item.blazeRod, '*', Item.emerald });
// Emerald Hoe
EmeraldHoe.iconIndex = ModLoader.addOverride("/gui/items.png",
"/items/EmeraldHoe.png");
ModLoader.addName(EmeraldHoe, "Emerald Hoe");
ModLoader.addRecipe(new ItemStack(EmeraldHoe, 1), new Object[] { "** ",
" X ", " X ", 'X', Item.blazeRod, '*', Item.emerald });
// Amethyst Gem
AmethystGem.iconIndex = ModLoader.addOverride("/gui/items.png",
"/items/Amethyst.png");
ModLoader.addName(AmethystGem, "Amethyst Gem");
// Amethyst Ore
ModLoader.registerBlock(AmethystOre);
AmethystOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png",
"/items/AmethystOre.png");
ModLoader.addName(AmethystOre, "Amethyst Ore");
// Amethyst Ore ---> Amethyst Gem
ModLoader.addSmelting(AmethystOre.blockID, new ItemStack(
mod_PixelatedExtension.AmethystGem, 1), 1.0F);
// Ruby Ore
ModLoader.registerBlock(RubyOre);
RubyOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png",
"/items/RubyOre.png");
ModLoader.addName(RubyOre, "Ruby Ore");
// Ruby Gem
RubyGem.iconIndex = ModLoader.addOverride("/gui/items.png",
"/items/RubyGem.png");
ModLoader.addName(RubyGem, "Ruby Gem");
// Ruby Ore ---> Ruby Gem
ModLoader.addSmelting(AmethystOre.blockID, new ItemStack(
mod_PixelatedExtension.RubyGem, 1), 1.0F);
}
public String getVersion() {
return "3.14159265";
}
}
以下行显示在控制台 (Eclipse) 中:
27 achievements
210 recipes
Setting user: Player731, -
Client asked for parameter: server
LWJGL Version: 2.4.2
ModLoader 1.4.7 Initializing...
Failed to load mod from "mod_PixelatedExtension.class"
Someone is closing me!
我不知道如何再给你提示,我不知道如何解决这个问题。