Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Mod won't work on server?


Recommended Posts

Ok so I am making a big mod and I have broken it down into parts. This is the MagicTools piece of it and it works fine on single player, but when I try multiplayer it crashes?

 

Also even with only forge in the minecraft_server.jar it never starts up completely, it only gets to 2 mods loaded?

 

Anyway, here is the error code i get:

 

---- Minecraft Crash Report ----

// I let you down. Sorry :(

 

Time: 8/22/12 10:19 PM

Description: Exception in server tick loop

 

java.lang.NoSuchFieldError: DEATH

at mod_MagicTools.<clinit>(mod_MagicTools.java:11)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Unknown Source)

at cpw.mods.fml.common.modloader.ModLoaderModContainer.constructMod(ModLoaderModContainer.java:483)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)

at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)

at com.google.common.eventbus.EventBus.post(EventBus.java:268)

at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:123)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)

at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)

at com.google.common.eventbus.EventBus.post(EventBus.java:268)

at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:81)

at cpw.mods.fml.common.Loader.loadMods(Loader.java:408)

at cpw.mods.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:75)

at cpw.mods.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:325)

at ft.b(DedicatedServer.java:49)

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:415)

at ep.run(SourceFile:539)

 

Relevant Details:

- Minecraft Version: 1.3.2

- Operating System: Windows 7 (amd64) version 6.1

- Java Version: 1.7.0_04, Oracle Corporation

- Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

- Memory: 910878368 bytes (868 MB) / 1029046272 bytes (981 MB) up to 1029046272 bytes (981 MB)

- JVM Flags: 2 total; -Xmx1024M -Xms1024M

- Is Modded: Definitely; 'forge,fml'

- Profiler Position: N/A (disabled)

- Type: Dedicated Server

 

 

and here are the mod files:

EnumToolMaterial:

 

package net.minecraft.src;

 

public enum EnumToolMaterial

{

    WOOD(0, 59, 2.0F, 0, 15),

    STONE(1, 131, 4.0F, 1, 5),

    IRON(2, 250, 6.0F, 2, 14),

    EMERALD(3, 1561, 8.0F, 3, 10),

    GOLD(0, 32, 12.0F, 0, 22),

DEATH(0, 12000, 1.0F, 2550, 0),

NETH(0, 3122, 1.0F, 4, 9),

OBSID(3, 4683, 14.0F, 4, 12),

TRI(0, 1000000, 1.0F, 20, 0),

SEA(0, 3122, 1.0F, 4, 7),

BOLT(0, 1000000, 1.0F, 20, 0);

 

    /**

    * The level of material this tool can harvest (3 = DIAMOND, 2 = IRON, 1 = STONE, 0 = IRON/GOLD)

    */

    private final int harvestLevel;

 

    /**

    * The number of uses this material allows. (wood = 59, stone = 131, iron = 250, diamond = 1561, gold = 32)

    */

    private final int maxUses;

 

    /**

    * The strength of this tool material against blocks which it is effective against.

    */

    private final float efficiencyOnProperMaterial;

 

    /** Damage versus entities. */

    private final int damageVsEntity;

 

    /** Defines the natural enchantability factor of the material. */

    private final int enchantability;

 

    private EnumToolMaterial(int par3, int par4, float par5, int par6, int par7)

    {

        this.harvestLevel = par3;

        this.maxUses = par4;

        this.efficiencyOnProperMaterial = par5;

        this.damageVsEntity = par6;

        this.enchantability = par7;

    }

 

    /**

    * The number of uses this material allows. (wood = 59, stone = 131, iron = 250, diamond = 1561, gold = 32)

    */

    public int getMaxUses()

    {

        return this.maxUses;

    }

 

    /**

    * The strength of this tool material against blocks which it is effective against.

    */

    public float getEfficiencyOnProperMaterial()

    {

        return this.efficiencyOnProperMaterial;

    }

 

    /**

    * Damage versus entities.

    */

    public int getDamageVsEntity()

    {

        return this.damageVsEntity;

    }

 

    /**

    * The level of material this tool can harvest (3 = DIAMOND, 2 = IRON, 1 = STONE, 0 = IRON/GOLD)

    */

    public int getHarvestLevel()

    {

        return this.harvestLevel;

    }

 

    /**

    * Return the natural enchantability factor of the material.

    */

    public int getEnchantability()

    {

        return this.enchantability;

    }

}

 

 

 

mod_MagicTools

 

package net.minecraft.src;

 

import net.minecraftforge.client.MinecraftForgeClient;

import net.minecraftforge.common.Configuration;

import net.minecraftforge.common.MinecraftForge;

 

public class mod_MagicTools extends BaseMod

{

 

//Define

public static final Item scythe = (new MagicSword(16700, EnumToolMaterial.DEATH)).setIconIndex(0).setItemName("scythe");

public static final Item nethSword = (new MagicSword(16701, EnumToolMaterial.NETH)).setIconIndex(1).setItemName("nethSword");

public static final Item obsidSword = (new MagicSword(16702, EnumToolMaterial.OBSID)).setIconIndex(2).setItemName("obsidSword");

public static final Item seaSword = (new MagicSword(16703, EnumToolMaterial.SEA)).setIconIndex(3).setItemName("seaSword");

public static final Item trident = (new MagicSword(16704, EnumToolMaterial.TRI)).setIconIndex(4).setItemName("trident");

public static final Item bolt = (new MagicSword(16705, EnumToolMaterial.BOLT)).setIconIndex(5).setItemName("bolt");

public static final Item obsidSpade = (new MagicSpade(16707, EnumToolMaterial.OBSID)).setIconIndex(11).setItemName("obsidSpade");

public static final Item obsidHoe = (new MagicHoe(16708, EnumToolMaterial.OBSID)).setIconIndex(14).setItemName("obsidHoe");

public static final Item obsidPick = (new MagicPick(16709, EnumToolMaterial.OBSID)).setIconIndex(12).setItemName("obsidPick");

public static final Item obsidAxe = (new MagicAxe(16710, EnumToolMaterial.OBSID)).setIconIndex(13).setItemName("obsidAxe");

public static final Item nethGem = (new MagicItem(16750)).setIconIndex(64).setItemName("nethGem").setTabToDisplayOn(CreativeTabs.tabMaterials);

public static final Item sandGem = (new MagicItem(16751)).setIconIndex(65).setItemName("sandGem").setTabToDisplayOn(CreativeTabs.tabMaterials);

public static final Item soulGem = (new MagicItem(16752)).setIconIndex(66).setItemName("soulGem").setTabToDisplayOn(CreativeTabs.tabMaterials);

public static final Item obsidStick = (new MagicItem(16753)).setIconIndex(67).setItemName("obsidStick").setTabToDisplayOn(CreativeTabs.tabMaterials);

public static final Item obsidIngot = (new MagicItem(16754)).setIconIndex(68).setItemName("obsidIngot").setTabToDisplayOn(CreativeTabs.tabMaterials);

public static final Item seaGem = (new MagicItem(16755)).setIconIndex(69).setItemName("seaGem").setTabToDisplayOn(CreativeTabs.tabMaterials);

public static final Item eleCrystal = (new MagicItem(16756)).setIconIndex(70).setItemName("eleCrystal").setTabToDisplayOn(CreativeTabs.tabMaterials);

public static final Item lightningRod = (new MagicItem(16757)).setIconIndex(71).setItemName("lightningRod").setTabToDisplayOn(CreativeTabs.tabMaterials);

public static final Item hadesHelm = (new MagicArmor(16758, EnumArmorMaterial.HADES, ModLoader.addArmor("hades"), 0)).setIconIndex(6).setItemName("hadesHelm");

public static final Item camoHelm = (new MagicArmor(16759, EnumArmorMaterial.CAMO, ModLoader.addArmor("camo"), 0)).setIconIndex(7).setItemName("camoHelm");

public static final Item camoPlate = (new MagicArmor(16760, EnumArmorMaterial.CAMO, 6, 1)).setIconIndex(8).setItemName("camoPlate");

public static final Item camoLegs = (new MagicArmor(16761, EnumArmorMaterial.CAMO, 6, 2)).setIconIndex(9).setItemName("camoLegs");

public static final Item camoBoots = (new MagicArmor(16762, EnumArmorMaterial.CAMO, 6, 3)).setIconIndex(10).setItemName("camoBoots");

public static final Item soul = (new MagicItem(19763)).setIconIndex(72).setItemName("soul").setTabToDisplayOn(CreativeTabs.tabMaterials);

 

public mod_MagicTools()

{

 

}

 

public void load()

{

MinecraftForgeClient.preloadTexture("/MagicTools/Items.png");

 

//Names

ModLoader.addName(scythe, "§b Death's Scythe");

ModLoader.addName(nethSword, "§e Sword Of The Nether");

ModLoader.addName(obsidSword, "Obsidian Sword");

ModLoader.addName(obsidSpade, "Obsidian Shovel");

ModLoader.addName(obsidHoe, "Obsidian Hoe");

ModLoader.addName(obsidAxe, "Obsidian Axe");

ModLoader.addName(obsidPick, "Obsidian Pickaxe");

ModLoader.addName(seaSword, "§e Sword Of The Sea");

ModLoader.addName(trident, "§c Poseidon's Trident");

ModLoader.addName(bolt, "§c Zeus' Lightning Bolt");

ModLoader.addName(nethGem, "§a Nether Gem");

ModLoader.addName(sandGem, "§a SoulSand Gem");

ModLoader.addName(soulGem, "§e Soul Gem");

ModLoader.addName(obsidStick, "Obsidian Stick");

ModLoader.addName(obsidIngot, "Obsidian Ingot");

ModLoader.addName(seaGem, "§a Sea Gem");

ModLoader.addName(eleCrystal, "§a Electric Crystal");

ModLoader.addName(lightningRod, "Lightning Rod");

ModLoader.addName(hadesHelm, "§c Hades' Helm Of Darkness");

ModLoader.addName(camoHelm, "Camouflage Helmet");

ModLoader.addName(camoPlate, "Camouflage Chestplate");

ModLoader.addName(camoLegs, "Camouflage Leggings");

ModLoader.addName(camoBoots, "Camouflage Boots");

ModLoader.addName(soul, "Soul");

 

//Recipes

ModLoader.addRecipe(new ItemStack(nethGem, 1), new Object[]

{

"SSS", "SMS", "SSS", 'S', Item.diamond, 'M', Block.netherrack

});

 

ModLoader.addRecipe(new ItemStack(sandGem, 1), new Object[]

{

"SSS", "SMS", "SSS", 'S', Item.diamond, 'M', Block.slowSand

});

 

ModLoader.addRecipe(new ItemStack(soulGem, 1), new Object []

{

"MSM", "SRS", "MSM", 'S', nethGem, 'M', sandGem, 'R', Item.diamond

});

 

ModLoader.addRecipe(new ItemStack(obsidStick, 1), new Object[]

{

"  ", " S ", " S ", 'S', Block.obsidian

});

 

ModLoader.addRecipe(new ItemStack(obsidStick, 1), new Object[]

{

" S ", " S ", "  ", 'S', Block.obsidian

});

 

ModLoader.addRecipe(new ItemStack(obsidStick, 1), new Object[]

{

"  ", "S  ", "S  ", 'S', Block.obsidian

});

 

ModLoader.addRecipe(new ItemStack(obsidStick, 1), new Object[]

{

"  ", "  S", "  S", 'S', Block.obsidian

});

 

ModLoader.addRecipe(new ItemStack(obsidStick, 1), new Object[]

{

"S  ", "S  ", "  ", 'S', Block.obsidian

});

 

ModLoader.addRecipe(new ItemStack(obsidStick, 1), new Object[]

{

"  S", "  S", "  ", 'S', Block.obsidian

});

 

ModLoader.addRecipe(new ItemStack(scythe, 1), new Object[]

{

"SSS", "  M", "  M", 'S', soulGem, 'M', obsidStick

});

 

ModLoader.addRecipe(new ItemStack(nethSword, 1), new Object[]

{

" S ", " S ", " M ", 'S', nethGem, 'M', Item.stick

});

 

ModLoader.addRecipe(new ItemStack(seaSword, 1), new Object[]

{

"S  ", "S  ", "M  ", 'S', nethGem, 'M', Item.stick

});

 

ModLoader.addRecipe(new ItemStack(seaSword, 1), new Object[]

{

"  S", "  S", "  M", 'S', nethGem, 'M', Item.stick

});

 

ModLoader.addRecipe(new ItemStack(obsidSword, 1), new Object[]

{

" S ", " S ", " M ", 'S', obsidIngot, 'M', Item.stick

});

 

ModLoader.addRecipe(new ItemStack(seaSword, 1), new Object[]

{

"S  ", "S  ", "M  ", 'S', obsidIngot, 'M', Item.stick

});

 

ModLoader.addRecipe(new ItemStack(seaSword, 1), new Object[]

{

"  S", "  S", "  M", 'S', obsidIngot, 'M', Item.stick

});

 

ModLoader.addRecipe(new ItemStack(seaGem, 1), new Object[]

{

"SSS", "SMS", "SSS", 'S', Item.diamond, 'M', Item.bucketWater

});

 

ModLoader.addRecipe(new ItemStack(seaSword, 1), new Object[]

{

" S ", " S ", " M ", 'S', seaGem, 'M', Item.stick

});

 

ModLoader.addRecipe(new ItemStack(seaSword, 1), new Object[]

{

"S  ", "S  ", "M  ", 'S', seaGem, 'M', Item.stick

});

 

ModLoader.addRecipe(new ItemStack(seaSword, 1), new Object[]

{

"  S", "  S", "  M", 'S', seaGem, 'M', Item.stick

});

 

ModLoader.addRecipe(new ItemStack(trident, 1), new Object[]

{

"S S", "SSS", " S ", 'S', seaGem

});

 

ModLoader.addRecipe(new ItemStack(lightningRod, 1), new Object[]

{

" S ", " S ", " S ", 'S', Item.ingotIron

});

 

ModLoader.addRecipe(new ItemStack(lightningRod, 1), new Object[]

{

"  S", "  S", "  S", 'S', Item.ingotIron

});

 

ModLoader.addRecipe(new ItemStack(lightningRod, 1), new Object[]

{

"S  ", "S  ", "S  ", 'S', Item.ingotIron

});

 

ModLoader.addRecipe(new ItemStack(eleCrystal, 1), new Object[]

{

"SSS", "SMS", "SSS", 'S', Item.diamond, 'M', Block.glowStone

});

 

ModLoader.addRecipe(new ItemStack(bolt, 1), new Object[]

{

"SMS", "SMS", "SMS", 'S', eleCrystal, 'M', lightningRod

});

 

ModLoader.addRecipe(new ItemStack(camoHelm, 1), new Object[]

{

"SSS", "S S", "  ", 'S', Block.leaves

});

 

ModLoader.addRecipe(new ItemStack(camoHelm, 1), new Object[]

{

"  ", "SSS", "S S", 'S', Block.leaves

});

 

ModLoader.addRecipe(new ItemStack(camoPlate, 1), new Object[]

{

"S S", "SSS", "SSS", 'S', Block.leaves

});

 

ModLoader.addRecipe(new ItemStack(camoLegs, 1), new Object[]

{

"SSS", "S S", "S S", 'S', Block.leaves

});

 

ModLoader.addRecipe(new ItemStack(camoBoots, 1), new Object[]

{

"  ", "S S", "S S", 'S', Block.leaves

});

 

ModLoader.addRecipe(new ItemStack(camoBoots, 1), new Object[]

{

"S S", "S S", "  ", 'S', Block.leaves

});

 

ModLoader.addRecipe(new ItemStack(soulGem, 1), new Object[]

{

"  ", " S ", " M ", 'S', soul, 'M', Item.diamond

});

 

ModLoader.addRecipe(new ItemStack(soulGem, 1), new Object[]

{

"  ", "  S", "  M", 'S', soul, 'M', Item.diamond

});

 

ModLoader.addRecipe(new ItemStack(soulGem, 1), new Object[]

{

"  ", "S  ", "M  ", 'S', soul, 'M', Item.diamond

});

 

ModLoader.addRecipe(new ItemStack(soulGem, 1), new Object[]

{

" S ", " M ", "  ", 'S', soul, 'M', Item.diamond

});

 

ModLoader.addRecipe(new ItemStack(soulGem, 1), new Object[]

{

"  S", "  M", "  ", 'S', soul, 'M', Item.diamond

});

 

ModLoader.addRecipe(new ItemStack(soulGem, 1), new Object[]

{

"S  ", "M  ", "  ", 'S', soul, 'M', Item.diamond

});

 

ModLoader.addRecipe(new ItemStack(obsidPick, 1), new Object[]

{

"SSS", " M ", " M ", 'S', obsidIngot, 'M', Item.stick

});

 

ModLoader.addRecipe(new ItemStack(obsidAxe, 1), new Object[]

{

"SS ", "SM ", " M ", 'S', obsidIngot, 'M', Item.stick

});

 

ModLoader.addRecipe(new ItemStack(obsidHoe, 1), new Object[]

{

"SS ", " M ", " M ", 'S', obsidIngot, 'M', Item.stick

});

 

ModLoader.addRecipe(new ItemStack(obsidSpade, 1), new Object[]

{

" S ", " M ", " M ", 'S', obsidIngot, 'M', Item.stick

});

 

//Smelting

ModLoader.addSmelting(Block.obsidian.blockID, new ItemStack(obsidIngot, 1));

}

 

public String getVersion()

{

return "1.3.2";

}

}

 

 

MagicArmor

 

package net.minecraft.src;

 

import net.minecraftforge.client.MinecraftForgeClient;

import net.minecraftforge.common.Configuration;

import net.minecraftforge.common.MinecraftForge;

 

public class MagicArmor extends ItemArmor

{

public MagicArmor(int i, EnumArmorMaterial enumarmormaterial, int j, int k)

{

super(i, enumarmormaterial, j, k);

}

 

public String getTextureFile()

{

return "/MagicTools/Items.png";

}

}

 

 

MagicAxe

 

package net.minecraft.src;

 

import net.minecraftforge.client.MinecraftForgeClient;

import net.minecraftforge.common.Configuration;

import net.minecraftforge.common.MinecraftForge;

 

public class MagicAxe extends ItemAxe

{

protected MagicAxe (int i, EnumToolMaterial enumtoolmaterial)

{

super(i, enumtoolmaterial);

}

 

public String getTextureFile()

{

return "/MagicTools/Items.png";

}

}

 

 

MagicHoe

 

package net.minecraft.src;

 

import net.minecraftforge.client.MinecraftForgeClient;

import net.minecraftforge.common.Configuration;

import net.minecraftforge.common.MinecraftForge;

 

public class MagicHoe extends ItemHoe

{

protected MagicHoe (int i, EnumToolMaterial enumtoolmaterial)

{

super(i, enumtoolmaterial);

}

 

public String getTextureFile()

{

return "/MagicTools/Items.png";

}

}

 

 

MagicItem

 

package net.minecraft.src;

 

import net.minecraftforge.client.MinecraftForgeClient;

import net.minecraftforge.common.Configuration;

import net.minecraftforge.common.MinecraftForge;

 

public class MagicItem extends Item

{

protected MagicItem(int i)

{

super(i);

}

 

public String getTextureFile()

{

return "/MagicTools/Items.png";

}

}

 

 

MagicPick

 

package net.minecraft.src;

 

import net.minecraftforge.client.MinecraftForgeClient;

import net.minecraftforge.common.Configuration;

import net.minecraftforge.common.MinecraftForge;

 

public class MagicPick extends ItemPickaxe

{

protected MagicPick (int i, EnumToolMaterial enumtoolmaterial)

{

super(i, enumtoolmaterial);

}

 

public String getTextureFile()

{

return "/MagicTools/Items.png";

}

}

 

 

MagicSpade

 

package net.minecraft.src;

 

import net.minecraftforge.client.MinecraftForgeClient;

import net.minecraftforge.common.Configuration;

import net.minecraftforge.common.MinecraftForge;

 

public class MagicSpade extends ItemSpade

{

protected MagicSpade (int i, EnumToolMaterial enumtoolmaterial)

{

super(i, enumtoolmaterial);

}

 

public String getTextureFile()

{

return "/MagicTools/Items.png";

}

}

 

 

MagicSword

 

package net.minecraft.src;

 

import net.minecraftforge.client.MinecraftForgeClient;

import net.minecraftforge.common.Configuration;

import net.minecraftforge.common.MinecraftForge;

 

public class MagicSword extends ItemSword

{

protected MagicSword (int i, EnumToolMaterial enumtoolmaterial)

{

super(i, enumtoolmaterial);

}

 

public String getTextureFile()

{

return "/MagicTools/Items.png";

}

}

 

 

And I know its probably something blaintly obvious that I missed, but this is the first time I've ever tried SMP modding and there I couldn't find an updated tutorial to save my life.

 

Please help.

Link to post
Share on other sites

1) You're editing base classes by adding your tool types to the enums, use Forge's EnumHelper classes

2) You can condense all of those addRecipie calls down to one line each, you do not need to wrap them in Object[]'s..

 

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Patreon: http://www.patreon.com/lexmanos
Paypal: http://paypal.me/LexManos

BitCoin: 1Q8rWvUNMM2T1ZfDaFeeYQyVXtYoeT6tTn

Link to post
Share on other sites

Ok, now it gives me a different error.

 

 

---- Minecraft Crash Report ----

// Everything's going to plan. No, really, that was supposed to happen.

 

Time: 8/24/12 4:58 PM

Description: Exception in server tick loop

 

java.lang.NoSuchMethodError: ModLoader.getMinecraftInstance()Lnet/minecraft/client/Minecraft;

at net.minecraftforge.client.MinecraftForgeClient.preloadTexture(MinecraftForgeClient.java:42)

at mod_MagicTools.load(mod_MagicTools.java:54)

at cpw.mods.fml.common.modloader.ModLoaderModContainer.init(ModLoaderModContainer.java:535)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)

at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)

at com.google.common.eventbus.EventBus.post(EventBus.java:268)

at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:123)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)

at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)

at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)

at com.google.common.eventbus.EventBus.post(EventBus.java:268)

at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:81)

at cpw.mods.fml.common.Loader.initializeMods(Loader.java:605)

at cpw.mods.fml.server.FMLServerHandler.finishServerLoading(FMLServerHandler.java:84)

at cpw.mods.fml.common.FMLCommonHandler.onServerStarted(FMLCommonHandler.java:355)

at ft.b(DedicatedServer.java:111)

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:415)

at ep.run(SourceFile:539)

 

Relevant Details:

- Minecraft Version: 1.3.2

- Operating System: Windows 7 (amd64) version 6.1

- Java Version: 1.7.0_04, Oracle Corporation

- Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

- Memory: 1864709944 bytes (1778 MB) / 2058027008 bytes (1962 MB) up to 2058027008 bytes (1962 MB)

- JVM Flags: 2 total; -Xmx2g -Xms2g

- FML: ~ERROR~ NullPointerException: null

- Is Modded: Definitely; 'forge,fml'

- Profiler Position: N/A (disabled)

- Type: Dedicated Server

 

 

I made the change for the tools and the armor and I also fixed one error myself.

 

Here is the new mod_MagicTools:

 

package net.minecraft.src;

 

import net.minecraftforge.client.MinecraftForgeClient;

import net.minecraftforge.common.Configuration;

import net.minecraftforge.common.MinecraftForge;

import net.minecraftforge.common.EnumHelper;

 

public class mod_MagicTools extends BaseMod

{

//Enum

static EnumToolMaterial DEATH = EnumHelper.addToolMaterial("DEATH", 0, 12000, 1.0F, 2550, 0);

static EnumToolMaterial NETH = EnumHelper.addToolMaterial("NETH", 0, 3122, 1.0F, 4, 9);

static EnumToolMaterial OBSID = EnumHelper.addToolMaterial("OBSID", 3, 4683, 14.0F, 4, 12);

static EnumToolMaterial TRI = EnumHelper.addToolMaterial("TRI", 0, 1000000, 1.0F, 20, 0);

static EnumToolMaterial SEA = EnumHelper.addToolMaterial("SEA", 0, 3122, 1.0F, 4, 7);

static EnumToolMaterial BOLT = EnumHelper.addToolMaterial("BOLT", 0, 1000000, 1.0F, 20, 0);

 

static EnumArmorMaterial CAMO = EnumHelper.addArmorMaterial("CAMO", 0, new int[]{0, 0, 0, 0}, 0);

static EnumArmorMaterial HADES = EnumHelper.addArmorMaterial("HADES", 100, new int[]{3, 0, 0, 0}, 0);

 

//Define

public static final Item scythe = (new MagicSword(16700, DEATH)).setIconIndex(0).setItemName("scythe");

public static final Item nethSword = (new MagicSword(16701, NETH)).setIconIndex(1).setItemName("nethSword");

public static final Item obsidSword = (new MagicSword(16702, OBSID)).setIconIndex(2).setItemName("obsidSword");

public static final Item seaSword = (new MagicSword(16703, SEA)).setIconIndex(3).setItemName("seaSword");

public static final Item trident = (new MagicSword(16704, TRI)).setIconIndex(4).setItemName("trident");

public static final Item bolt = (new MagicSword(16705, BOLT)).setIconIndex(5).setItemName("bolt");

public static final Item obsidSpade = (new MagicSpade(16707, OBSID)).setIconIndex(11).setItemName("obsidSpade");

public static final Item obsidHoe = (new MagicHoe(16708, OBSID)).setIconIndex(14).setItemName("obsidHoe");

public static final Item obsidPick = (new MagicPick(16709, OBSID)).setIconIndex(12).setItemName("obsidPick");

public static final Item obsidAxe = (new MagicAxe(16710, OBSID)).setIconIndex(13).setItemName("obsidAxe");

public static final Item nethGem = (new MagicItem(16750)).setIconIndex(64).setItemName("nethGem").setTabToDisplayOn(CreativeTabs.tabMaterials);

public static final Item sandGem = (new MagicItem(16751)).setIconIndex(65).setItemName("sandGem").setTabToDisplayOn(CreativeTabs.tabMaterials);

public static final Item soulGem = (new MagicItem(16752)).setIconIndex(66).setItemName("soulGem").setTabToDisplayOn(CreativeTabs.tabMaterials);

public static final Item obsidStick = (new MagicItem(16753)).setIconIndex(67).setItemName("obsidStick").setTabToDisplayOn(CreativeTabs.tabMaterials);

public static final Item obsidIngot = (new MagicItem(16754)).setIconIndex(68).setItemName("obsidIngot").setTabToDisplayOn(CreativeTabs.tabMaterials);

public static final Item seaGem = (new MagicItem(16755)).setIconIndex(69).setItemName("seaGem").setTabToDisplayOn(CreativeTabs.tabMaterials);

public static final Item eleCrystal = (new MagicItem(16756)).setIconIndex(70).setItemName("eleCrystal").setTabToDisplayOn(CreativeTabs.tabMaterials);

public static final Item lightningRod = (new MagicItem(16757)).setIconIndex(71).setItemName("lightningRod").setTabToDisplayOn(CreativeTabs.tabMaterials);

public static final Item hadesHelm = (new MagicArmor(16758, HADES, 5, 0)).setIconIndex(6).setItemName("hadesHelm");

public static final Item camoHelm = (new MagicArmor(16759, CAMO, 6, 0)).setIconIndex(7).setItemName("camoHelm");

public static final Item camoPlate = (new MagicArmor(16760, CAMO, 6, 1)).setIconIndex(8).setItemName("camoPlate");

public static final Item camoLegs = (new MagicArmor(16761, CAMO, 6, 2)).setIconIndex(9).setItemName("camoLegs");

public static final Item camoBoots = (new MagicArmor(16762, CAMO, 6, 3)).setIconIndex(10).setItemName("camoBoots");

public static final Item soul = (new MagicItem(19763)).setIconIndex(72).setItemName("soul").setTabToDisplayOn(CreativeTabs.tabMaterials);

 

public mod_MagicTools()

{

 

}

 

public void load()

{

MinecraftForgeClient.preloadTexture("/MagicTools/Items.png");

 

//Names

ModLoader.addName(scythe, "§b Death's Scythe");

ModLoader.addName(nethSword, "§e Sword Of The Nether");

ModLoader.addName(obsidSword, "Obsidian Sword");

ModLoader.addName(obsidSpade, "Obsidian Shovel");

ModLoader.addName(obsidHoe, "Obsidian Hoe");

ModLoader.addName(obsidAxe, "Obsidian Axe");

ModLoader.addName(obsidPick, "Obsidian Pickaxe");

ModLoader.addName(seaSword, "§e Sword Of The Sea");

ModLoader.addName(trident, "§c Poseidon's Trident");

ModLoader.addName(bolt, "§c Zeus' Lightning Bolt");

ModLoader.addName(nethGem, "§a Nether Gem");

ModLoader.addName(sandGem, "§a SoulSand Gem");

ModLoader.addName(soulGem, "§e Soul Gem");

ModLoader.addName(obsidStick, "Obsidian Stick");

ModLoader.addName(obsidIngot, "Obsidian Ingot");

ModLoader.addName(seaGem, "§a Sea Gem");

ModLoader.addName(eleCrystal, "§a Electric Crystal");

ModLoader.addName(lightningRod, "Lightning Rod");

ModLoader.addName(hadesHelm, "§c Hades' Helm Of Darkness");

ModLoader.addName(camoHelm, "Camouflage Helmet");

ModLoader.addName(camoPlate, "Camouflage Chestplate");

ModLoader.addName(camoLegs, "Camouflage Leggings");

ModLoader.addName(camoBoots, "Camouflage Boots");

ModLoader.addName(soul, "Soul");

 

//Recipes

ModLoader.addRecipe(new ItemStack(nethGem, 1), new Object[]

{

"SSS", "SMS", "SSS", 'S', Item.diamond, 'M', Block.netherrack

});

 

ModLoader.addRecipe(new ItemStack(sandGem, 1), new Object[]

{

"SSS", "SMS", "SSS", 'S', Item.diamond, 'M', Block.slowSand

});

 

ModLoader.addRecipe(new ItemStack(soulGem, 1), new Object []

{

"MSM", "SRS", "MSM", 'S', nethGem, 'M', sandGem, 'R', Item.diamond

});

 

ModLoader.addRecipe(new ItemStack(obsidStick, 1), new Object[]

{

"  ", " S ", " S ", 'S', Block.obsidian

});

 

ModLoader.addRecipe(new ItemStack(obsidStick, 1), new Object[]

{

" S ", " S ", "  ", 'S', Block.obsidian

});

 

ModLoader.addRecipe(new ItemStack(obsidStick, 1), new Object[]

{

"  ", "S  ", "S  ", 'S', Block.obsidian

});

 

ModLoader.addRecipe(new ItemStack(obsidStick, 1), new Object[]

{

"  ", "  S", "  S", 'S', Block.obsidian

});

 

ModLoader.addRecipe(new ItemStack(obsidStick, 1), new Object[]

{

"S  ", "S  ", "  ", 'S', Block.obsidian

});

 

ModLoader.addRecipe(new ItemStack(obsidStick, 1), new Object[]

{

"  S", "  S", "  ", 'S', Block.obsidian

});

 

ModLoader.addRecipe(new ItemStack(scythe, 1), new Object[]

{

"SSS", "  M", "  M", 'S', soulGem, 'M', obsidStick

});

 

ModLoader.addRecipe(new ItemStack(nethSword, 1), new Object[]

{

" S ", " S ", " M ", 'S', nethGem, 'M', Item.stick

});

 

ModLoader.addRecipe(new ItemStack(seaSword, 1), new Object[]

{

"S  ", "S  ", "M  ", 'S', nethGem, 'M', Item.stick

});

 

ModLoader.addRecipe(new ItemStack(seaSword, 1), new Object[]

{

"  S", "  S", "  M", 'S', nethGem, 'M', Item.stick

});

 

ModLoader.addRecipe(new ItemStack(obsidSword, 1), new Object[]

{

" S ", " S ", " M ", 'S', obsidIngot, 'M', Item.stick

});

 

ModLoader.addRecipe(new ItemStack(seaSword, 1), new Object[]

{

"S  ", "S  ", "M  ", 'S', obsidIngot, 'M', Item.stick

});

 

ModLoader.addRecipe(new ItemStack(seaSword, 1), new Object[]

{

"  S", "  S", "  M", 'S', obsidIngot, 'M', Item.stick

});

 

ModLoader.addRecipe(new ItemStack(seaGem, 1), new Object[]

{

"SSS", "SMS", "SSS", 'S', Item.diamond, 'M', Item.bucketWater

});

 

ModLoader.addRecipe(new ItemStack(seaSword, 1), new Object[]

{

" S ", " S ", " M ", 'S', seaGem, 'M', Item.stick

});

 

ModLoader.addRecipe(new ItemStack(seaSword, 1), new Object[]

{

"S  ", "S  ", "M  ", 'S', seaGem, 'M', Item.stick

});

 

ModLoader.addRecipe(new ItemStack(seaSword, 1), new Object[]

{

"  S", "  S", "  M", 'S', seaGem, 'M', Item.stick

});

 

ModLoader.addRecipe(new ItemStack(trident, 1), new Object[]

{

"S S", "SSS", " S ", 'S', seaGem

});

 

ModLoader.addRecipe(new ItemStack(lightningRod, 1), new Object[]

{

" S ", " S ", " S ", 'S', Item.ingotIron

});

 

ModLoader.addRecipe(new ItemStack(lightningRod, 1), new Object[]

{

"  S", "  S", "  S", 'S', Item.ingotIron

});

 

ModLoader.addRecipe(new ItemStack(lightningRod, 1), new Object[]

{

"S  ", "S  ", "S  ", 'S', Item.ingotIron

});

 

ModLoader.addRecipe(new ItemStack(eleCrystal, 1), new Object[]

{

"SSS", "SMS", "SSS", 'S', Item.diamond, 'M', Block.glowStone

});

 

ModLoader.addRecipe(new ItemStack(bolt, 1), new Object[]

{

"SMS", "SMS", "SMS", 'S', eleCrystal, 'M', lightningRod

});

 

ModLoader.addRecipe(new ItemStack(camoHelm, 1), new Object[]

{

"SSS", "S S", "  ", 'S', Block.leaves

});

 

ModLoader.addRecipe(new ItemStack(camoHelm, 1), new Object[]

{

"  ", "SSS", "S S", 'S', Block.leaves

});

 

ModLoader.addRecipe(new ItemStack(camoPlate, 1), new Object[]

{

"S S", "SSS", "SSS", 'S', Block.leaves

});

 

ModLoader.addRecipe(new ItemStack(camoLegs, 1), new Object[]

{

"SSS", "S S", "S S", 'S', Block.leaves

});

 

ModLoader.addRecipe(new ItemStack(camoBoots, 1), new Object[]

{

"  ", "S S", "S S", 'S', Block.leaves

});

 

ModLoader.addRecipe(new ItemStack(camoBoots, 1), new Object[]

{

"S S", "S S", "  ", 'S', Block.leaves

});

 

ModLoader.addRecipe(new ItemStack(soulGem, 1), new Object[]

{

"  ", " S ", " M ", 'S', soul, 'M', Item.diamond

});

 

ModLoader.addRecipe(new ItemStack(soulGem, 1), new Object[]

{

"  ", "  S", "  M", 'S', soul, 'M', Item.diamond

});

 

ModLoader.addRecipe(new ItemStack(soulGem, 1), new Object[]

{

"  ", "S  ", "M  ", 'S', soul, 'M', Item.diamond

});

 

ModLoader.addRecipe(new ItemStack(soulGem, 1), new Object[]

{

" S ", " M ", "  ", 'S', soul, 'M', Item.diamond

});

 

ModLoader.addRecipe(new ItemStack(soulGem, 1), new Object[]

{

"  S", "  M", "  ", 'S', soul, 'M', Item.diamond

});

 

ModLoader.addRecipe(new ItemStack(soulGem, 1), new Object[]

{

"S  ", "M  ", "  ", 'S', soul, 'M', Item.diamond

});

 

ModLoader.addRecipe(new ItemStack(obsidPick, 1), new Object[]

{

"SSS", " M ", " M ", 'S', obsidIngot, 'M', Item.stick

});

 

ModLoader.addRecipe(new ItemStack(obsidAxe, 1), new Object[]

{

"SS ", "SM ", " M ", 'S', obsidIngot, 'M', Item.stick

});

 

ModLoader.addRecipe(new ItemStack(obsidHoe, 1), new Object[]

{

"SS ", " M ", " M ", 'S', obsidIngot, 'M', Item.stick

});

 

ModLoader.addRecipe(new ItemStack(obsidSpade, 1), new Object[]

{

" S ", " M ", " M ", 'S', obsidIngot, 'M', Item.stick

});

 

//Smelting

ModLoader.addSmelting(Block.obsidian.blockID, new ItemStack(obsidIngot, 1));

}

 

public String getVersion()

{

return "1.3.2";

}

}

 

 

And i did reset the base files back to their original code.

 

Also, like I said before when I try to load up a server with only forge installed it gets stuck on "MinecraftForge v4.0.0.228 Initialized"

Link to post
Share on other sites

Seems like you arnt installing forge properly thats all I can say as that function does exist.

You need to start from scratch and try agian.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Patreon: http://www.patreon.com/lexmanos
Paypal: http://paypal.me/LexManos

BitCoin: 1Q8rWvUNMM2T1ZfDaFeeYQyVXtYoeT6tTn

Link to post
Share on other sites

I fixed the server and everything, it loads up now. I just had to move the PreloadTextures thing into a different function and it worked fine.

 

But now when I try to join it I the client crashes.

Here is the error log:

 

---- Minecraft Crash Report ----

// I just don't know what went wrong :(

 

Time: 8/24/12 6:26 PM

Description: Unexpected error

 

java.lang.NullPointerException

at cpw.mods.fml.common.network.FMLNetworkHandler.bindNetworkId(FMLNetworkHandler.java:261)

at cpw.mods.fml.common.network.ModIdentifiersPacket.execute(ModIdentifiersPacket.java:67)

at cpw.mods.fml.common.network.FMLNetworkHandler.handleFMLPacket(FMLNetworkHandler.java:89)

at cpw.mods.fml.common.network.FMLNetworkHandler.handlePacket250Packet(FMLNetworkHandler.java:59)

at asv.a(NetClientHandler.java:1288)

at ce.a(SourceFile:56)

at bb.b(TcpConnection.java:438)

at asv.d(NetClientHandler.java:99)

at asy.c(SourceFile:69)

at net.minecraft.client.Minecraft.l(Minecraft.java:1484)

at net.minecraft.client.Minecraft.J(Minecraft.java:831)

at net.minecraft.client.Minecraft.run(Minecraft.java:761)

at java.lang.Thread.run(Unknown Source)

 

Relevant Details:

- Minecraft Version: 1.3.2

- Operating System: Windows 7 (amd64) version 6.1

- Java Version: 1.7.0_04, Oracle Corporation

- Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

- Memory: 467938984 bytes (446 MB) / 514523136 bytes (490 MB) up to 954466304 bytes (910 MB)

- JVM Flags: 2 total; -Xms512m -Xmx1024m

- LWJGL: 2.4.2

- OpenGL: AMD Radeon HD 7700 Series GL version 4.2.11733 Compatibility Profile Context, ATI Technologies Inc.

- Is Modded: Definitely; 'forge,fml'

- Type: Client

- Texture Pack: Default

- Profiler Position: N/A (disabled)

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.