Jump to content

Recommended Posts

Posted

when i try and play in eclipse, test out new mob it works but when i build and put into mods foldier and launch minecraft i get this

 

 

 

---- Minecraft Crash Report ----

// Daisy, daisy...

 

Time: 14.6.20 10.02

Description: There was a severe problem during mod loading that has caused the game to fail

 

cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: com/hogans/craft/entities/EntityMage

at cpw.mods.fml.common.LoadController.transition(LoadController.java:162)

at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:514)

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

at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:467)

at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:815)

at net.minecraft.client.main.Main.main(SourceFile:103)

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 net.minecraft.launchwrapper.Launch.launch(Launch.java:134)

at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

Caused by: java.lang.NoClassDefFoundError: com/hogans/craft/entities/EntityMage

at net.Hoganscraft.mod.proxy.ClientProxy.registerRenderThings(ClientProxy.java:41)

at com.hogans.craft.HogansCraft.preInit(HogansCraft.java:744)

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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)

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

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

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

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

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

at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)

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

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

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

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

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

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

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

at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:512)

... 10 more

Caused by: java.lang.ClassNotFoundException: com.hogans.craft.entities.EntityMage

at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:188)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

... 39 more

Caused by: java.lang.ClassFormatError: Duplicate method name&signature in class file com/hogans/craft/entities/EntityMage

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(Unknown Source)

at java.security.SecureClassLoader.defineClass(Unknown Source)

at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:180)

... 41 more

 

 

A detailed walkthrough of the error, its code path and all known details is as follows:

---------------------------------------------------------------------------------------

 

-- System Details --

Details:

Minecraft Version: 1.7.2

Operating System: Windows 7 (amd64) version 6.1

Java Version: 1.7.0_60, Oracle Corporation

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

Memory: 228130768 bytes (217 MB) / 418381824 bytes (399 MB) up to 954728448 bytes (910 MB)

JVM Flags: 2 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1G

AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0

FML: MCP v9.03 FML v7.2.205.1101 Minecraft Forge 10.12.1.1101 5 mods loaded, 5 mods active

mcp{9.03} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized

FML{7.2.205.1101} [Forge Mod Loader] (forge-1.7.2-10.12.1.1101.jar) Unloaded->Constructed->Pre-initialized

Forge{10.12.1.1101} [Minecraft Forge] (forge-1.7.2-10.12.1.1101.jar) Unloaded->Constructed->Pre-initialized

DamageIndicatorsMod{3.1.1} [Damage Indicators] ([1.7.2]DamageIndicatorsMod-3.1.1.jar) Unloaded->Constructed->Pre-initialized

HogansCraft{Alpha 1.0} [HogansCraft] (Hoganscraft-1.7.2-1.0.jar) Unloaded->Constructed->Errored

 

 

 

 

 

 

 

 

Proud mod developer of:

 

Mob Armor mod

Block monster mod

Clay Living Dolls mod

Much More Spiders mod

Elemental cows reborn

Mr gorilla mod

Posted

Is the package supposed to be com.hogans.craft.entities.EntityMage ?

 

or is it supposed to be com.hoganscraft.entities.EntityMage ?

We all stuff up sometimes... But I seem to be at the bottom of that pot.

Posted

com.hogans.craft.entities;EntityMage

Proud mod developer of:

 

Mob Armor mod

Block monster mod

Clay Living Dolls mod

Much More Spiders mod

Elemental cows reborn

Mr gorilla mod

Posted

That error is caused when Java can find your class at compile time but not at runtime, so your classpath has a problem, I'm guessing that perhaps your mod folder structure is not right, so Forge is only finding some of your mod source, not all of it.

 

Your mod file should look something like this structure

http://greyminecraftcoder.blogspot.com.au/2013/12/overview-of-forge-and-what-it-can-do.html

 

>  at net.Hoganscraft.mod.proxy.ClientProxy.registerRenderThings(ClientProxy.java:41)

>  at com.hogans.craft.HogansCraft.preInit(HogansCraft.java:744)

 

And dude that package naming convention is just begging for subtle bugs :)

hogans.craft

Hoganscraft

HogansCraft class just for good measure:)

 

package names should be lower case to avoid confusing the other folks out there

 

(And - to avoid subtle bugs due to Windows not being case sensitive, but zip files are - perhaps this is your problem here too?)

 

-TGG

 

 

Posted

strange thing that is happening only with EntityMage.class when i remove it and build , it works perfectly

Proud mod developer of:

 

Mob Armor mod

Block monster mod

Clay Living Dolls mod

Much More Spiders mod

Elemental cows reborn

Mr gorilla mod

Posted

EntityMage.class code

 

 

 

package com.hogans.craft.entities;

 

import com.hogans.craft.HogansCraft;

 

import net.minecraft.block.Block;

import net.minecraft.entity.Entity;

import net.minecraft.entity.EntityLiving;

import net.minecraft.entity.EntityLivingBase;

import net.minecraft.entity.IRangedAttackMob;

import net.minecraft.entity.SharedMonsterAttributes;

import net.minecraft.entity.ai.EntityAIArrowAttack;

import net.minecraft.entity.ai.EntityAIAttackOnCollide;

import net.minecraft.entity.ai.EntityAIBreakDoor;

import net.minecraft.entity.ai.EntityAIHurtByTarget;

import net.minecraft.entity.ai.EntityAILookIdle;

import net.minecraft.entity.ai.EntityAIMoveThroughVillage;

import net.minecraft.entity.ai.EntityAINearestAttackableTarget;

import net.minecraft.entity.ai.EntityAIOpenDoor;

import net.minecraft.entity.ai.EntityAISwimming;

import net.minecraft.entity.ai.EntityAIWander;

import net.minecraft.entity.ai.EntityAIWatchClosest;

import net.minecraft.entity.boss.EntityDragon;

import net.minecraft.entity.boss.EntityWither;

import net.minecraft.entity.effect.EntityLightningBolt;

import net.minecraft.entity.item.EntityEnderCrystal;

import net.minecraft.entity.monster.EntityCreeper;

import net.minecraft.entity.monster.EntityIronGolem;

import net.minecraft.entity.monster.EntityMob;

import net.minecraft.entity.monster.EntityZombie;

import net.minecraft.entity.passive.EntityVillager;

import net.minecraft.entity.player.EntityPlayer;

import net.minecraft.entity.projectile.EntityArrow;

import net.minecraft.entity.projectile.EntityFireball;

import net.minecraft.entity.projectile.EntitySmallFireball;

import net.minecraft.entity.projectile.EntityWitherSkull;

import net.minecraft.init.Items;

import net.minecraft.item.Item;

import net.minecraft.item.ItemStack;

import net.minecraft.potion.Potion;

import net.minecraft.potion.PotionEffect;

import net.minecraft.util.DamageSource;

import net.minecraft.util.MathHelper;

import net.minecraft.world.EnumDifficulty;

import net.minecraft.world.World;

import net.minecraftforge.common.ForgeModContainer;

 

 

public class EntityMage extends EntityMob{

 

 

 

/** Random offset used in floating behavior */

    private float heightOffset = 0.5F;

 

    /** ticks until heightOffset is randomized */

    private int heightOffsetUpdateTime;

    private int field_70846_g;

 

 

 

 

 

 

 

 

 

 

 

public EntityMage(World world) {

super(world);

float moveSpeed = 0.6F;

experienceValue = 15;

isImmuneToFire = true;

 

       

       

 

    }

 

 

 

 

 

 

 

 

 

 

protected void func_110147_ax()

    {

        super.func_110142_aN();

       

    }

 

    protected void entityInit()

    {

        super.entityInit();

        this.dataWatcher.addObject(16, new Byte((byte)0));

    }

 

 

 

protected void addRandomArmor()

    {

        super.addRandomArmor();

        this.setCurrentItemOrArmor(0, new ItemStack(Items.bone));

    }

 

 

 

   

 

 

 

 

 

 

 

 

protected Item getDropItem()

    {

        return Items.blaze_rod;

    }

   

    protected void dropRareDrop(int par1) {

    this.entityDropItem(new ItemStack(HogansCraft.DragonApple, 1, 1), 0.0F);

    }

   

 

 

   

   

   

    protected String getLivingSound()

    {

        return "mob.zombie.say";

    }

 

 

    /**

    * Returns the sound this mob makes when it is hurt.

    */

    protected String getHurtSound()

    {

        return "mob.zombie.hurt";

    }

 

    /**

    * Returns the sound this mob makes on death.

    */

    protected String getDeathSound()

    {

        return "mob.zombie.death";

    }

 

    protected void func_145780_a(int p_145780_1_, int p_145780_2_, int p_145780_3_, Block p_145780_4_)

    {

        this.playSound("mob.zombie.step", 0.15F, 1.0F);

    }

   

   

   

   

   

   

    public void onLivingUpdate()

    {

        if (!this.worldObj.isRemote)

        {

            if (this.isWet())

            {

                this.attackEntityFrom(DamageSource.magic, 0.0F);

            }

 

            --this.heightOffsetUpdateTime;

 

            if (this.heightOffsetUpdateTime <= 0)

            {

                this.heightOffsetUpdateTime = 100;

                this.heightOffset = 0.9F + (float)this.rand.nextGaussian() * 3.0F;

            }

 

            if (this.getEntityToAttack() != null && this.getEntityToAttack().posY + (double)this.getEntityToAttack().getEyeHeight() > this.posY + (double)this.getEyeHeight() + (double)this.heightOffset)

            {

                this.motionY += (0.30000001192092896D - this.motionY) * 0.30000001192092896D;

            }

        }

 

        if (this.rand.nextInt(24) == 0)

        {

            this.worldObj.playSoundEffect(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D, "fire.fire", 1.0F + this.rand.nextFloat(), this.rand.nextFloat() * 0.7F + 0.3F);

        }

 

        if (!this.onGround && this.motionY < 0.0D)

        {

            this.motionY *= 0.6D;

        }

 

        for (int i = 0; i < 2; ++i)

        {

            this.worldObj.spawnParticle("largesmoke", this.posX + (this.rand.nextDouble() - 0.5D) * (double)this.width, this.posY + this.rand.nextDouble() * (double)this.height, this.posZ + (this.rand.nextDouble() - 0.5D) * (double)this.width, 0.0D, 0.0D, 0.0D);

        }

 

        super.onLivingUpdate();

    }

   

   

    /**

    * Basic mob attack. Default to touch of death in EntityCreature. Overridden by each mob to define their attack.

    */

    protected void attackEntity(Entity par1Entity, float par2)

    {

        if (this.attackTime <= 0 && par2 < 2.0F && par1Entity.boundingBox.maxY > this.boundingBox.minY && par1Entity.boundingBox.minY < this.boundingBox.maxY)

        {

            this.attackTime = 1;

            this.attackEntityAsMob(par1Entity);

        }

        else if (par2 < 30.0F)

        {

            double d0 = par1Entity.posX - this.posX;

            double d1 = par1Entity.boundingBox.minY + (double)(par1Entity.height / 2.0F) - (this.posY + (double)(this.height / 2.0F));

            double d2 = par1Entity.posZ - this.posZ;

 

            if (this.attackTime == 0)

            {

                ++this.field_70846_g;

 

                if (this.field_70846_g == 1)

                {

                    this.attackTime = 5;

                    this.func_70844_e(true);

                }

                else if (this.field_70846_g <= 4)

                {

                    this.attackTime = 1;

                }

                else

                {

                    this.attackTime = 5;

                    this.field_70846_g = 0;

                    this.func_70844_e(false);

                }

 

                if (this.field_70846_g > 1)

                {

                    float f1 = MathHelper.sqrt_float(par2) * 0.5F;

                    this.worldObj.playAuxSFXAtEntity((EntityPlayer)null, 1009, (int)this.posX, (int)this.posY, (int)this.posZ, 0);

 

                    for (int i = 0; i < 1; ++i)

                    {

                        EntityWitherSkull entitywitherskull = new EntityWitherSkull(this.worldObj, this, d0 + this.rand.nextGaussian() * (double)f1, d1, d2 + this.rand.nextGaussian() * (double)f1);

                        entitywitherskull.posY = this.posY + (double)(this.height / 2.2F) + 0.5D;

                        this.worldObj.spawnEntityInWorld(entitywitherskull);

                    }

                }

            }

 

            this.rotationYaw = (float)(Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F;

            this.hasAttacked = true;

        }

    }

 

    protected void fall(float par1) {}

 

   

   

   

   

   

 

private void func_70844_e(boolean b) {

// TODO Auto-generated method stub

 

}

 

protected void applyEntityAttributes()

    {

        super.applyEntityAttributes();

        this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(120.0D);

        this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.43000000417232513D);

        this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(20.0D);

        this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(650.0D);

       

    }

 

//* Returns the current armor value as determined by a call to InventoryPlayer.getTotalArmorValue

   

    public int getTotalArmorValue()

    {

            return 15;

    }

 

 

 

 

 

 

 

 

 

 

 

 

     

        }

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

       

   

 

 

 

 

 

 

 

 

 

 

       

     

 

 

 

 

Proud mod developer of:

 

Mob Armor mod

Block monster mod

Clay Living Dolls mod

Much More Spiders mod

Elemental cows reborn

Mr gorilla mod

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.