-1
我不知道問題出在哪裏,我可以啓動Minecraft,但它會將我重定向到一個錯誤窗口。這裏的源代碼: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!
我不知道怎麼給你了提示,我不知道如何解決這一問題。
沒有比'mod_PixelatedExtension.class''加載mod失敗更多的錯誤信息? –
java編譯器會說些什麼嗎? –
嘗試清潔和構建。一旦我遇到了一個隨機的'ClassNotFoundException'清理和構建解決。 –