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 2 of 2

Thread: I've got a question on my somehow broken code

  1. #1
    Junior Member
    Join Date
    Apr 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default I've got a question on my somehow broken code

    I am not sure how many of you know anything about minecraft and their classes but hopefully someone can help.

    The error I am recieving is in this line of code.
        	        EntityList.entityEggs.put(Integer.valueOf(id), new EntityEggsInfo(bkEggColor, fgEggColor));

    The error I am getting is "EntityEggsInfo cannot be resolved to a type"
    I have imported all needed classes and everything, haven't seen a single error other than this one.

    --- Update ---

    Full code below
    ---------------
        	private void registerEntity(Class<ModelHerobrineMob> entityClass, String entityName,
        	                        int bkEggColor, int fgEggColor) {
        	                int id = EntityRegistry.findGlobalUniqueEntityId();
     
        	        EntityRegistry.registerGlobalEntityID(entityClass, entityName, id);
        	        EntityList.entityEggs.put(Integer.valueOf(id), new EntityEggsInfo(bkEggColor, fgEggColor));
        	        }
        	          public void addSpawn(Class<ModelHerobrineMob> entityClass, int spawnProb, int min, int max, BiomeGenBase[] biomes) {
        	          if (spawnProb > 0) {
        	                  EntityRegistry.addSpawn(entityClass, spawnProb, min, max, EnumCreatureType.creature, biomes);
        	          }
        	  }
     
        @EventHandler
        public void load(FMLInitializationEvent event)
        {
        	proxy.registerRenderInformation();
        }


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,151
    My Mood
    Mellow
    Thanks
    187
    Thanked 660 Times in 647 Posts

    Default Re: I've got a question on my somehow broken code

    Welcome to the Forum! Thanks for taking the time to learn to post code correctly, and if you haven't already, please read this topic to see other useful info for newcomers.

Similar Threads

  1. Help with a broken for loop?
    By Iantaylora in forum What's Wrong With My Code?
    Replies: 4
    Last Post: December 19th, 2013, 05:11 PM
  2. Replies: 2
    Last Post: December 16th, 2013, 03:36 PM
  3. send image file from java to php broken pipe exception occured
    By ashi123 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: July 21st, 2011, 02:53 PM
  4. This is my code and i would like to ask a question..
    By savvas in forum What's Wrong With My Code?
    Replies: 2
    Last Post: May 24th, 2011, 01:01 PM
  5. Broken JPanel?
    By psu in forum What's Wrong With My Code?
    Replies: 6
    Last Post: March 22nd, 2011, 11:11 AM