Jump to content

Recommended Posts

Posted

I keep getting this error when i go to debug my mod:

 

 

2013-04-02 17:18:22 [sEVERE] [ForgeModLoader] Attempted to load a proxy type herz.class3.common.ClientProxy into herz.class3.Class3.instance, but the types don't match

 

2013-04-02 17:18:22 [sEVERE] [ForgeModLoader] An error occured trying to load a proxy into {clientSide=herz.class3.common.ClientProxy, serverSide=herz.class3.CommonProxy}.herz.class3.Class3

cpw.mods.fml.common.LoaderException

 

 

 

and here's the main class code:

 

 

package herz.class3;

 

import herz.class3.biomes.biomeGenCity;

import herz.class3.biomes.biomeGenRural;

import herz.class3.block.blockAsphalt;

import herz.class3.block.blockBarbedWire;

import herz.class3.block.blockBricks;

import herz.class3.block.blockCeramicTiles;

import herz.class3.block.blockConcrete;

import herz.class3.block.blockCrate;

import herz.class3.block.blockFlares;

import herz.class3.block.blockGarbage;

import herz.class3.block.blockLamp;

import herz.class3.block.blockPlywood;

import herz.class3.block.blockRoofing;

import herz.class3.block.blockRottenCake;

import herz.class3.block.blockSheetRock;

import herz.class3.block.blockSiding;

import herz.class3.block.blockStucco;

import herz.class3.common.Class3EventSounds;

import herz.class3.common.ClientPacketHandler;

import herz.class3.common.CommonProxy;

import herz.class3.common.CraftingHandler;

import herz.class3.common.GuiHandler;

import herz.class3.common.ServerPacketHandler;

import herz.class3.creativetab.tabClass3Armor;

import herz.class3.creativetab.tabClass3Blocks;

import herz.class3.creativetab.tabClass3Food;

import herz.class3.creativetab.tabClass3Guns;

import herz.class3.creativetab.tabClass3Misc;

import herz.class3.creativetab.tabClass3Weapons;

import herz.class3.entity.entityBlighted;

import herz.class3.entity.entityBlitzer;

import herz.class3.entity.entityBoneFragment;

import herz.class3.entity.entityBullet;

import herz.class3.entity.entityCrawler;

import herz.class3.entity.entityFractured;

import herz.class3.entity.entityGrenade;

import herz.class3.entity.entityHighExplosiveGrenade;

import herz.class3.entity.entityModernArrow;

import herz.class3.entity.entityMolotov;

import herz.class3.entity.entityNail;

import herz.class3.entity.entityPipebomb;

import herz.class3.entity.entityShotGunBullet;

import herz.class3.entity.entitySmokeGrenade;

import herz.class3.entity.entityStarved;

import herz.class3.entity.tileEntityCrate;

import herz.class3.guns.itemGunAK47;

import herz.class3.guns.itemGunM4A1;

import herz.class3.guns.itemGunMosin;

import herz.class3.guns.itemGunRemington;

import herz.class3.guns.itemGunVector;

import herz.class3.guns.itemGunWinchester;

import herz.class3.guns.itemNailGun;

 

import java.beans.EventHandler;

import java.io.File;

import java.util.Random;

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

import net.minecraft.client.Minecraft;

import net.minecraft.client.renderer.texture.IconRegister;

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.entity.Entity;

import net.minecraft.entity.EntityEggInfo;

import net.minecraft.entity.EntityList;

import net.minecraft.entity.EnumCreatureType;

import net.minecraft.entity.projectile.EntityArrow;

import net.minecraft.item.EnumArmorMaterial;

import net.minecraft.item.EnumToolMaterial;

import net.minecraft.item.Item;

import net.minecraft.item.ItemStack;

import net.minecraft.potion.Potion;

import net.minecraft.util.DamageSource;

import net.minecraft.util.EntityDamageSourceIndirect;

import net.minecraft.world.World;

import net.minecraft.world.WorldType;

import net.minecraft.world.biome.BiomeGenBase;

import net.minecraft.world.biome.WorldChunkManager;

import net.minecraft.world.chunk.IChunkProvider;

import net.minecraftforge.client.event.sound.SoundEvent;

import net.minecraftforge.client.event.sound.SoundLoadEvent;

import net.minecraftforge.common.EnumHelper;

import net.minecraftforge.common.MinecraftForge;

import net.minecraftforge.event.ForgeSubscribe;

import cpw.mods.fml.common.IWorldGenerator;

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.PostInit;

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.event.FMLPostInitializationEvent;

import cpw.mods.fml.common.event.FMLPreInitializationEvent;

import cpw.mods.fml.common.network.NetworkMod;

import cpw.mods.fml.common.network.NetworkMod.SidedPacketHandler;

import cpw.mods.fml.common.network.NetworkRegistry;

import cpw.mods.fml.common.registry.EntityRegistry;

import cpw.mods.fml.common.registry.GameRegistry;

import cpw.mods.fml.common.registry.LanguageRegistry;

import net.minecraft.block.Block;

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.item.Item;

import net.minecraft.item.crafting.FurnaceRecipes;

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.event.FMLInitializationEvent;

import cpw.mods.fml.common.network.NetworkMod;

import cpw.mods.fml.common.network.NetworkRegistry;

import cpw.mods.fml.common.registry.GameRegistry;

import cpw.mods.fml.common.registry.LanguageRegistry;

import cpw.mods.fml.common.SidedProxy;

import cpw.mods.fml.relauncher.Side;

import cpw.mods.fml.relauncher.SideOnly;

 

@Mod(modid = "Class3", name = "Class Three", version = "0.5")

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

public class Class3

{

@Instance("Class3")

@SidedProxy (clientSide = "herz.class3.common.ClientProxy", serverSide = "herz.class3.CommonProxy")

 

public static Class3 instance = new Class3();

public static CommonProxy proxy;

 

private GuiHandler guiHandler = new GuiHandler();

private static int startEntityId;

 

//Enums

public static EnumToolMaterial sharp1 = EnumHelper.addToolMaterial("Sharp Tier 1", 1, 24, 100F, 4, 15);

public static EnumToolMaterial sharp2 = EnumHelper.addToolMaterial("Sharp Tier 2", 1, 48, 100F, 6, 15);

public static EnumToolMaterial sharp3 = EnumHelper.addToolMaterial("Sharp Tier 3", 1, 96, 100F, 8, 15);

 

public static EnumToolMaterial blunt1 = EnumHelper.addToolMaterial("Blunt Tier 1", 1, 48, 100F, 2, 15);

public static EnumToolMaterial blunt2 = EnumHelper.addToolMaterial("Blunt Tier 2", 1, 96, 100F, 4, 15);

public static EnumToolMaterial blunt3 = EnumHelper.addToolMaterial("Blunt Tier 3", 1, 192, 100F, 6, 15);

 

public static EnumToolMaterial piercing1 = EnumHelper.addToolMaterial("Piercing Tier 1", 2, 32, 100F, 3, 15);

public static EnumToolMaterial piercing2 = EnumHelper.addToolMaterial("Piercing Tier 2", 2, 64, 100F, 5, 15);

public static EnumToolMaterial piercing3 = EnumHelper.addToolMaterial("Piercing Tier 3", 2, 128, 100F, 7, 15);

 

public static EnumArmorMaterial military1 = EnumHelper.addArmorMaterial("Military Tier 1", 2, new int[]{4, 6, 5, 4}, 4);

public static EnumArmorMaterial military2 = EnumHelper.addArmorMaterial("Military Tier 2", 2, new int[]{5, 8, 6, 5}, 4);

public static EnumArmorMaterial military3 = EnumHelper.addArmorMaterial("Military Tier 3", 2, new int[]{5, 10, 8, 4}, 4);

 

public static EnumArmorMaterial civilian1 = EnumHelper.addArmorMaterial("Civilian Tier 1", 2, new int[]{1, 3, 2, 1}, 4);

public static EnumArmorMaterial civilian2 = EnumHelper.addArmorMaterial("Civilian Tier 2", 2, new int[]{1, 4, 3, 1}, 4);

public static EnumArmorMaterial civilian3 = EnumHelper.addArmorMaterial("Civilian Tier 3", 2, new int[]{2, 4, 3, 2}, 4);

 

public static EnumArmorMaterial work1 = EnumHelper.addArmorMaterial("Work Tier 1", 2, new int[]{2, 5, 4, 2}, 4);

public static EnumArmorMaterial work2 = EnumHelper.addArmorMaterial("Work Tier 2", 2, new int[]{3, 6, 4, 3}, 4);

public static EnumArmorMaterial work3 = EnumHelper.addArmorMaterial("Work Tier 3", 2, new int[]{3, 7, 5, 3}, 4);

 

 

//Damage Types

public static DamageSource causeNailDamage(entityNail par0entityNails, Entity par1Entity)

{

return (new EntityDamageSourceIndirect("Nail", par0entityNails, par1Entity)).setProjectile();

}

 

public static DamageSource causeModernArrowDamage(entityModernArrow par0entityModernArrows, Entity par1Entity)

{

return (new EntityDamageSourceIndirect("ModernArrow", par0entityModernArrows, par1Entity)).setProjectile();

}

 

public static DamageSource causeBulletDamage(entityBullet entityBullet, Entity par1Entity)

{

return (new EntityDamageSourceIndirect("Bullet", entityBullet, par1Entity)).setProjectile();

}

 

public static DamageSource causeShotGunBulletDamage(entityBullet entityShotGunBullet, Entity par1Entity)

{

return (new EntityDamageSourceIndirect("Shot Gun Bullet", entityShotGunBullet, par1Entity)).setProjectile();

}

 

public static DamageSource causeBoneDamage(entityBoneFragment BoneFragment, Entity par1Entity)

{

return (new EntityDamageSourceIndirect("BoneFragment", BoneFragment, par1Entity)).setProjectile();

}

 

public static final CreativeTabs tabclass3melee = new tabClass3Weapons(CreativeTabs.getNextID(), "HerzTabw");

    public static final CreativeTabs tabclass3blocks = new tabClass3Blocks(CreativeTabs.getNextID(), "HerzTab");

    public static final CreativeTabs tabclass3guns = new tabClass3Guns(CreativeTabs.getNextID(), "HerzTabw");

    public static final CreativeTabs tabclass3armor = new tabClass3Armor(CreativeTabs.getNextID(), "HerzTaba");

    public static final CreativeTabs tabclass3food = new tabClass3Food(CreativeTabs.getNextID(), "HerzTabwf");

    public static final CreativeTabs tabclass3misc = new tabClass3Misc(CreativeTabs.getNextID(), "HerzTabm");

   

    //Biomes

    public static BiomeGenBase city;

    public static BiomeGenBase rural;

 

    @PreInit

    public void preInit(FMLPreInitializationEvent event)

    {

    MinecraftForge.EVENT_BUS.register(new Class3EventSounds());

    }

 

    @Init

    public void load(FMLInitializationEvent event)

    {

    proxy.registerRenderers();

    NetworkRegistry.instance().registerGuiHandler(this, proxy); //Registers the class that deals with GUI data

 

    herz.class3.Class3Blocks.loadBlocks();

    herz.class3.Class3Items.loadItems();

    herz.class3.Class3Guns.loadGuns();

    herz.class3.Class3Recipes.loadRecipes();

 

    GameRegistry.registerCraftingHandler(new CraftingHandler());

   

//Biomes

    city = (new biomeGenCity(50).setBiomeName("City").setMinMaxHeight(0.0F, 0.0F));

    GameRegistry.addBiome(city);

    rural = (new biomeGenRural(51).setBiomeName("Rural").setMinMaxHeight(0.0F, 0.0F));

GameRegistry.addBiome(rural);

 

    //Entities

    //Mobs

    EntityRegistry.registerModEntity(entityBlighted.class, "Blighted", 1, this, 80, 3, true);

    EntityRegistry.addSpawn(entityBlighted.class, 7, 2, 4, EnumCreatureType.monster, new BiomeGenBase[] {Class3.city});

    LanguageRegistry.instance().addStringLocalization("entity.CLASS3.Blighted.name", "Blighted");

    registerEntityEgg(entityBlighted.class, 0xff0000, 0xff0000);

    EntityRegistry.registerModEntity(entityCrawler.class, "Crawler", 2, this, 80, 3, true);

    EntityRegistry.addSpawn(entityCrawler.class, 2, 1, 2, EnumCreatureType.monster, new BiomeGenBase[] {Class3.city});

    LanguageRegistry.instance().addStringLocalization("entity.CLASS3.Crawler.name", "Crawler");

    registerEntityEgg(entityCrawler.class, 0xff0000, 0xff0000);

    EntityRegistry.registerModEntity(entityBlitzer.class, "Blitzer", 3, this, 80, 3, true);

    EntityRegistry.addSpawn(entityBlitzer.class, 3, 1, 3, EnumCreatureType.monster, new BiomeGenBase[] {Class3.city});

    LanguageRegistry.instance().addStringLocalization("entity.CLASS3.Blitzer.name", "Blitzer");

    registerEntityEgg(entityBlitzer.class, 0xff0000, 0xff0000);

    EntityRegistry.registerModEntity(entityStarved.class, "Starved", 4, this, 80, 3, true);

    EntityRegistry.addSpawn(entityStarved.class, 5, 4, 6, EnumCreatureType.monster, new BiomeGenBase[] {Class3.city});

    LanguageRegistry.instance().addStringLocalization("entity.CLASS3.Starved.name", "Starved");

    registerEntityEgg(entityStarved.class, 0xff0000, 0xff0000);

    EntityRegistry.registerModEntity(entityFractured.class, "Fractured", 5, this, 80, 3, true);

    EntityRegistry.addSpawn(entityFractured.class, 3, 1, 3, EnumCreatureType.monster, new BiomeGenBase[] {Class3.city});

    LanguageRegistry.instance().addStringLocalization("entity.CLASS3.Fractured.name", "Fractured");

    registerEntityEgg(entityFractured.class, 0xff0000, 0xff0000);

   

    //Projectiles

    EntityRegistry.registerModEntity(entityNail.class, "nails", 20, this, 80, 3, true);

    EntityRegistry.registerModEntity(entityModernArrow.class, "modernarrows", 21, this, 80, 3, true);

    EntityRegistry.registerModEntity(entityBullet.class, "Bullet", 22, this, 80, 3, true);

    EntityRegistry.registerModEntity(entityShotGunBullet.class, "ShotGunBullet", 23, this, 80, 3, true);

    EntityRegistry.registerModEntity(entityGrenade.class, "Grenades", 24, this, 80, 3, true);

    EntityRegistry.registerModEntity(entityHighExplosiveGrenade.class, "HEGrenades", 25, this, 80, 3, true);

    EntityRegistry.registerModEntity(entitySmokeGrenade.class, "SGrenades", 26, this, 80, 3, true);

    EntityRegistry.registerModEntity(entityMolotov.class, "Molotovs", 27, this, 80, 3, true);

    EntityRegistry.registerModEntity(entityPipebomb.class, "PipeBomb", 28, this, 80, 3, true);

    EntityRegistry.registerModEntity(entityBoneFragment.class, "BoneFragment", 29, this, 80, 3, true);

 

    //Tile Entities

    GameRegistry.registerTileEntity(tileEntityCrate.class, "tileentitycrate");

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

}

 

    //Entity eggs & Ids

    public static int getUniqueEntityId()

    {

    do

    {

    startEntityId++;

    }

    while(EntityList.getStringFromID(startEntityId) != null);

    {

    return startEntityId;

    }

    }

   

    public static void registerEntityEgg(Class<? extends Entity> entity, int primaryColor, int secondaryColor)

    {

    int id = getUniqueEntityId();

    EntityList.IDtoClassMapping.put(id, entity);

    EntityList.entityEggs.put(id, new EntityEggInfo(id, primaryColor, secondaryColor));

    }

 

    @PostInit

    public void postInit(FMLPostInitializationEvent event)

    {

    }

   

    public static void generateWorld(int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider)

    {

    long worldSeed = world.getSeed();

    Random fmlRandom = new Random(worldSeed);

    long xSeed = fmlRandom.nextLong() >> 2 + 1L;

    long zSeed = fmlRandom.nextLong() >> 2 + 1L;

    fmlRandom.setSeed((xSeed * chunkX + zSeed * chunkZ) ^ worldSeed);

    }

}

 

 

 

Edit: Problem Fixed

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.