Jump to content

Proxy error


Geert4321

Recommended Posts

I a creating a new crafting table and got an error. The error is in the spoiler Error

cpw.mods.fml.common.LoaderException: cpw.mods.fml.common.LoaderException

at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:68)

at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:417)

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:140)

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:83)

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

at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:150)

at net.minecraft.client.Minecraft.startGame(Minecraft.java:420)

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

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

Caused by: cpw.mods.fml.common.LoaderException

at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:61)

... 26 more

--- END ERROR REPORT 404e0500 ----------

 

 

Here is my code:

 

ConcreteModBase.java

 

package net.concreteMod.src;

import java.util.Map;

import net.concreteMod.client.ClientPacketHandler;
import net.minecraft.src.Block;
import net.minecraft.src.EnumToolMaterial;
import net.minecraft.src.CreativeTabs;
import net.minecraft.src.EnumToolMaterial;
import net.minecraft.src.Item;
import net.minecraft.src.ItemStack;
import net.minecraft.src.Material;
import net.minecraft.src.ModLoader;
import net.minecraftforge.common.EnumHelper;
import net.minecraftforge.oredict.OreDictionary;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.Mod.PreInit;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.network.NetworkMod.NULL;
import cpw.mods.fml.common.network.NetworkMod.SidedPacketHandler;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import net.concreteMod.client.*;


@Mod (modid = "concreteMod", name = "concreteMod", version = "1.2.0")

@NetworkMod(clientSideRequired = true, serverSideRequired = false, clientPacketHandlerSpec = @SidedPacketHandler(channels = "ConcreteMod", packetHandler = ClientPacketHandler.class),
serverPacketHandlerSpec = @SidedPacketHandler(channels= "ConcreteMod", packetHandler = ServerPacketHandler.class))


public class ConcreteModBase {
public void addRenderer(Map map)
    {
            map.put(EntityDeathArrow.class, new RendererDeahArrow());
            map.put(EntityDeathCharge.class, new RendererDeathCharge(11));
    }
@SidedProxy(clientSide = "net.concreteMod.client.ClientProxyConcreteMod", serverSide = "net.concreteMod.src.CommonProxyConcreteMod")

@Instance("concreteMod") 
public static ConcreteModBase instance;

public static CommonProxyConcreteMod proxy = new CommonProxyConcreteMod();
static EnumToolMaterial EnumConcrete = EnumHelper.addToolMaterial("Concrete", 2, 2000, 5F, 2, 14);

    



public static	int magicBow1 = 7;
public static	int magicBow2 = 8;
public static	int magicBow3 = 9;
public static	int magicBow4 = 10;

public static final Block magicTable = new BlockMagicTable(169, Material.rock).setCreativeTab(CreativeTabs.tabDecorations).setBlockName("magicTable");
    public static final Item deathCharge = new ItemhardendStick(168).setCreativeTab(CreativeTabs.tabCombat).setIconCoord(10, 0).setItemName("Death Charge");
	public static final Item deathStaff = new ItemDeathStaff(167).setCreativeTab(CreativeTabs.tabCombat).setIconCoord(9, 0).setItemName("Staff Of Death");
public static final Item deathCrystal = new ItemDeathCrystal(166).setCreativeTab(CreativeTabs.tabMaterials);
public static final Item deathArrow = new ItemdeathArrow(165).setCreativeTab(CreativeTabs.tabCombat).setIconCoord(8, 0);
public static final Item magicCrystal = new ItemMagicCrystal(164);
public static final Block lifeCrystalOre = new BlockLifeCrystalOre(163, 4,Material.rock).setCreativeTab(CreativeTabs.tabBlock).setBlockName("lifeCrystalOre");
public static final Item magicBow = new ItemmagicBow(162).setCreativeTab(CreativeTabs.tabCombat).setItemName("Magic Bow").setIconCoord(7, 0);
public static final Block deathCrystalOre = new BlockDeathCrystalOre(161, 3, Material.rock).setCreativeTab(CreativeTabs.tabBlock).setBlockName("deathCrystalOre");
public static final Block magicCrystalOre = new BlockMagicCrystalOre(160, 2, Material.rock).setCreativeTab(CreativeTabs.tabBlock).setBlockName("magicCrystalOre");
public static final Item concreteSpade = new ItemconcreteSpade(159, EnumConcrete).setCreativeTab(CreativeTabs.tabTools).setIconCoord(6,0).setItemName("Concrete Shovel");
public static final Item concreteHoe = new ItemconcreteHoe(158, EnumConcrete).setCreativeTab(CreativeTabs.tabTools).setIconCoord(5,0).setItemName("Concrete Hoe");
public static final Item concreteAxe =  new ItemconcreteAxe(157, EnumConcrete).setCreativeTab(CreativeTabs.tabTools).setIconCoord(4,0).setItemName("Concrete Axe");
public static final Item concretePick = new ItemconcretePick(156, EnumConcrete).setCreativeTab(CreativeTabs.tabTools).setIconCoord(3,0).setItemName("Concrete Pick");
public static final Block tonshOre = new BlocktonshOre(155, 1 , Material.rock).setHardness(5.5F).setResistance(45F).setBlockName("tonshOre").setCreativeTab(CreativeTabs.tabBlock);
public static final Item hardendStick = new ItemhardendStick(154).setIconCoord(1,0).setCreativeTab(CreativeTabs.tabMaterials).setItemName("Hardend Stick");
public static final Item concreteSword = new ItemconcreteSword(153, EnumConcrete ).setCreativeTab(CreativeTabs.tabCombat).setIconCoord(2,0).setItemName("Concrete Sword");
public static final Item tonsh = new Itemtonsh(151).setCreativeTab(CreativeTabs.tabMaterials).setItemName("Tonsh");
public static final Block concrete = new Blockconcrete(150, 0, Material.rock).setHardness(10.0f).setResistance(10000f).setBlockName("concrete").setCreativeTab(CreativeTabs.tabBlock);
public static final Block rawTonsh = new BlockrawTonsh(152, 0, Material.rock).setHardness(5.5F).setResistance(45F).setCreativeTab(CreativeTabs.tabMaterials).setBlockName("rawTonsh");
@Init
public void load(FMLInitializationEvent event){
	proxy.registerRenderThings();

	GameRegistry.registerBlock(concrete);
	GameRegistry.registerBlock(rawTonsh);
	GameRegistry.registerBlock(tonshOre);
	GameRegistry.registerBlock(magicCrystalOre);
	GameRegistry.registerBlock(deathCrystalOre);
	GameRegistry.registerBlock(lifeCrystalOre);
	GameRegistry.registerBlock(magicTable);
	LanguageRegistry.addName(concrete, "Concrete");
	LanguageRegistry.addName(rawTonsh, "Raw Tonsh");
	LanguageRegistry.addName(tonshOre, "Tonsh Ore");
	LanguageRegistry.addName(magicCrystalOre, "Magic Crystal Ore");
	LanguageRegistry.addName(deathCrystalOre, "Death Crystal Ore");
	LanguageRegistry.addName(lifeCrystalOre, "Life Crystal Ore");
	LanguageRegistry.addName(magicTable, "Magic Crafting Table");

	LanguageRegistry.addName(tonsh, "Tonsh");
	LanguageRegistry.addName(hardendStick, "Hardend Stick");
	LanguageRegistry.addName(concreteSword, "Concrete Sword");
	LanguageRegistry.addName(concretePick, "Concrete Pick");
	LanguageRegistry.addName(concreteHoe, "Concrete Hoe");
	LanguageRegistry.addName(concreteSpade, "Concrete Sovel");
	LanguageRegistry.addName(concreteAxe, "Concrete Axe");
	LanguageRegistry.addName(magicBow, "Magic Bow");
	LanguageRegistry.addName(deathStaff, "Staff of Death");
	LanguageRegistry.addName(deathCharge, "Deathh Carge");

	NetworkRegistry.instance().registerGuiHandler(this, proxy);

	OreDictionary.registerOre(155, tonshOre);


	ModLoader.addOverride("/gui/items.png", "/concreteTexture/magicBow.png");
	GameRegistry.addSmelting(rawTonsh.blockID,new ItemStack(tonsh), 5.0F);

	GameRegistry.addRecipe(new ItemStack(concrete, 4),new Object[]{
		"xxx","xyx","xxx",Character.valueOf('x'),Block.stone,Character.valueOf('y'),tonsh
	});
	GameRegistry.addRecipe(new ItemStack(rawTonsh, 3), new Object[]{
		"xyx","xyx","xyx", Character.valueOf('x'),Block.stone,Character.valueOf('y'),tonshOre
	});
	 GameRegistry.addRecipe(new ItemStack(hardendStick,4), new Object[]{"x","x",
		 Character.valueOf('x'),concrete
	 });

	 GameRegistry.addRecipe(new ItemStack(concretePick,1), new Object[]{"yyy"," x "," x ",
		 Character.valueOf('x'),hardendStick, Character.valueOf('y'),concrete
	 });

	 GameRegistry.addRecipe(new ItemStack(concreteAxe,1), new Object[]{"xx ","xy "," y ",
		 Character.valueOf('x'),concrete, Character.valueOf('y'),hardendStick

	 });

	 GameRegistry.addRecipe(new ItemStack(concreteAxe,1), new Object[]{" xx"," yx"," y ",
		 Character.valueOf('x'),concrete, Character.valueOf('y'),hardendStick

	 });

	 GameRegistry.addRecipe(new ItemStack(concreteSword,1), new Object[]{" x "," x "," y ",
		 Character.valueOf('x'),concrete, Character.valueOf('y'),hardendStick

	 });

	 GameRegistry.addRecipe(new ItemStack(concreteHoe,1), new Object[]{ "yy "," x "," x ",
		 Character.valueOf('x'),hardendStick, Character.valueOf('y'),concrete
	 });

	 GameRegistry.addRecipe(new ItemStack(concreteHoe,1), new Object[]{ " yy"," x "," x ",
		 Character.valueOf('x'),hardendStick, Character.valueOf('y'),concrete
	 });

	 GameRegistry.addRecipe(new ItemStack(concreteSpade,1), new Object[]{ " y "," x "," x ",
		 Character.valueOf('x'),hardendStick, Character.valueOf('y'),concrete

	 });
	 GameRegistry.registerWorldGenerator(new ConcreteModGenerator());
}
@PreInit
public void init(FMLInitializationEvent preEvent){

}

}

 

CommonProxyConcreteMod.java

 

package net.concreteMod.src;

import net.minecraft.src.EntityPlayer;
import net.minecraft.src.TileEntity;
import net.minecraft.src.World;
import cpw.mods.fml.common.network.IGuiHandler;

public class CommonProxyConcreteMod implements IGuiHandler {

public void registerRenderThings() {

}

@Override
public Object getServerGuiElement(int ID, EntityPlayer player, World world,
		int x, int y, int z) {
		TileEntity tileentity = world.getBlockTileEntity(x, z, y);

		if (tileentity != null){
			switch (ID){
			case 0: return new ContainerMagicCrafting(player.inventory, player.worldObj, x, y, z);
			}
		}
		return null;
}

@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world,
		int x, int y, int z) {
	return null;
}
public void registerTiles(){
}
public void registerBlocks(){
}
public void addNames(){
}
public void addRecipes(){ 

}}

 

ClientProxyConcreteMod.java

 

package net.concreteMod.client;

import net.concreteMod.src.CommonProxyConcreteMod;
import net.concreteMod.src.ContainerMagicCrafting;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.TileEntity;
import net.minecraft.src.World;
import net.concreteMod.src.GuiMagicCrafting;
import net.minecraftforge.client.MinecraftForgeClient;

public class ClientProxyConcreteMod extends CommonProxyConcreteMod{
@Override
public void registerRenderThings() {
	MinecraftForgeClient.preloadTexture("/concreteTexture/blocks.png");
	MinecraftForgeClient.preloadTexture("/concreteTexture/items.png");
}
@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world,
		int x, int y, int z) {
	TileEntity tileentity = world.getBlockTileEntity(x, z, y);

	if (tileentity != null){
		switch (ID){
		case 0: return new GuiMagicCrafting(player.inventory, player.worldObj, x, y, z);
		}
}
	return null;

}
}

 

 

Would appreciate if you helped me because this is a big update for my mod. Thanks!

Link to comment
Share on other sites

This piece of code is wrong:

	@SidedProxy(clientSide = "net.concreteMod.client.ClientProxyConcreteMod", serverSide = "net.concreteMod.src.CommonProxyConcreteMod")

@Instance("concreteMod") 
public static ConcreteModBase instance;

public static CommonProxyConcreteMod proxy = new CommonProxyConcreteMod();

 

It should be:

	@Instance("concreteMod") 
public static ConcreteModBase instance;

@SidedProxy(clientSide = "net.concreteMod.client.ClientProxyConcreteMod", serverSide = "net.concreteMod.src.CommonProxyConcreteMod")
public static CommonProxyConcreteMod proxy;

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.