Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Already defined?

  1. #1
    Junior Member
    Join Date
    Aug 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Already defined?

    Hey there! I play a game called Minecraft, and I have decompiled it and edited it to my wishes. But when I attempt to recompile, I get the following:

    errors (7 of them):

    2011-08-19 18:53 -    commands.recompile - ERROR - == ERRORS FOUND ==
    2011-08-19 18:53 -    commands.recompile - ERROR - 
    2011-08-19 18:53 -    commands.recompile - ERROR - src\minecraft\net\minecraft\src\EntityAAShell.java:310: owner is already defined in net.minecraft.src.EntityAAShell
    2011-08-19 18:53 -    commands.recompile - ERROR - private EntityPlayer owner;
    2011-08-19 18:53 -    commands.recompile - ERROR - ^
    2011-08-19 18:53 -    commands.recompile - ERROR - 
    2011-08-19 18:53 -    commands.recompile - ERROR - src\minecraft\net\minecraft\src\EntityAntiTank.java:327: owner is already defined in net.minecraft.src.EntityAntiTank
    2011-08-19 18:53 -    commands.recompile - ERROR - private EntityPlayer owner;
    2011-08-19 18:53 -    commands.recompile - ERROR - ^
    2011-08-19 18:53 -    commands.recompile - ERROR - 
    2011-08-19 18:53 -    commands.recompile - ERROR - src\minecraft\net\minecraft\src\EntityBullet.java:331: owner is already defined in net.minecraft.src.EntityBullet
    2011-08-19 18:53 -    commands.recompile - ERROR - private EntityPlayer owner;
    2011-08-19 18:53 -    commands.recompile - ERROR - ^
    2011-08-19 18:53 -    commands.recompile - ERROR - 
    2011-08-19 18:53 -    commands.recompile - ERROR - src\minecraft\net\minecraft\src\EntityBullet2.java:328: owner is already defined in net.minecraft.src.EntityBullet2
    2011-08-19 18:53 -    commands.recompile - ERROR - private EntityPlayer owner;
    2011-08-19 18:53 -    commands.recompile - ERROR - ^
    2011-08-19 18:53 -    commands.recompile - ERROR - 
    2011-08-19 18:53 -    commands.recompile - ERROR - src\minecraft\net\minecraft\src\EntityBullet.java:217: cannot find symbol
    2011-08-19 18:53 -    commands.recompile - ERROR - symbol  : method addStat(net.minecraft.src.Achievement,int)
    2011-08-19 18:53 -    commands.recompile - ERROR - location: class net.minecraft.src.EntityLiving
    2011-08-19 18:53 -    commands.recompile - ERROR - owner.addStat(mod_Planes.shootGhast, 1);
    2011-08-19 18:53 -    commands.recompile - ERROR - ^
    2011-08-19 18:53 -    commands.recompile - ERROR - 
    2011-08-19 18:53 -    commands.recompile - ERROR - src\minecraft\net\minecraft\src\hacks.java:14: package mc does not exist
    2011-08-19 18:53 -    commands.recompile - ERROR - mc.renderGlobal.loadRenderers();
    2011-08-19 18:53 -    commands.recompile - ERROR - ^
    2011-08-19 18:53 -    commands.recompile - ERROR - 
    2011-08-19 18:53 -    commands.recompile - ERROR - src\minecraft\net\minecraft\src\mod_Planes.java:376: cannot find symbol
    2011-08-19 18:53 -    commands.recompile - ERROR - symbol  : method valueOf(int)
    2011-08-19 18:53 -    commands.recompile - ERROR - location: class net.minecraft.src.EntityPlane
    2011-08-19 18:53 -    commands.recompile - ERROR - planeList.add(entityplane.valueOf(EntityPlane.netID + 23116));
    2011-08-19 18:53 -    commands.recompile - ERROR - ^
    2011-08-19 18:53 -    commands.recompile - ERROR - 
    2011-08-19 18:53 -    commands.recompile - ERROR - 7 errors

    I went to EntityAAShell.java just to see if I could figure out the problem on my own with my bit of programming experience. But when I noticed the problem, which is the following:

        private int xTile;
        private int yTile;
        private int zTile;
        private int inTile;
        private boolean inGround;
        public int arrowShake;
        public EntityLiving owner;
        private int timeTillDeath;
        private int flyTime;
        private EntityPlayer owner;

    I was quite confused. Because from what I see, aren't EntityPlayer owner and EntityLiving owner completely different variables?


  2. #2
    Member
    Join Date
    Aug 2011
    Posts
    86
    My Mood
    Lurking
    Thanks
    16
    Thanked 4 Times in 4 Posts

    Default Re: Already defined?

    look in EntityBullet.java and EntityBullet2.java and looks like entityPlayer owner should be public.

  3. #3
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Already defined?

    src\minecraft\net\minecraft\src\EntityAAShell.java :310: owner is already defined in
    net.minecraft.src.EntityAAShell
    Is the variable: owner defined more than once? One definition is enough.

  4. #4
    Member
    Join Date
    Aug 2011
    Posts
    86
    My Mood
    Lurking
    Thanks
    16
    Thanked 4 Times in 4 Posts

    Default Re: Already defined?

    If it works in the unmodified code being defined more than once.....I don't get it either.

Similar Threads

  1. User-Defined Methods
    By ZippyShannon in forum What's Wrong With My Code?
    Replies: 4
    Last Post: July 28th, 2011, 10:23 PM
  2. Replies: 0
    Last Post: January 25th, 2011, 01:24 AM
  3. User Defined Methods
    By mgutierrez19 in forum Object Oriented Programming
    Replies: 11
    Last Post: October 20th, 2009, 06:57 PM