Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Mob invisible, makes sounds, has shadow, has hitbox, just can't see it.

Featured Replies

  • Author

Try trimming your render hutch file down to

	

    package infectModding.mob.render;
     
    import infectModding.mob.Hunch;
    import infectModding.mob.entity.EntityHunch;
    import net.minecraft.client.model.ModelBase;
    import net.minecraft.client.renderer.entity.RenderLiving;
    import net.minecraft.entity.Entity;
    import net.minecraft.entity.EntityLiving;
    import net.minecraft.util.ResourceLocation;
     
    public class RenderHunch extends RenderLiving {
    private static final ResourceLocation EntityTexture = new ResourceLocation("Fakelocationtogetthedefaulttexturetomakesureyourtextureisnottheproblem")//"eternisles:textures/mobs/hunch.png");
            @Override
            protected ResourceLocation getEntityTexture(Entity entity) {
                   
                    return EntityTexture;
            }
     
    }

And use a different model when defining the renderer.

The shortened version you provide has no constructor, so it won't run. Shortening it while keeping the constructor doesn't change it from being invisible either. I changed the texture to a non-existent location, however it still appears invisible and not with the white default missing texture.

 

As for changing the model, I tried changing it to the ModelBiped but it just crashes. I'm not too keen on working with it to make it work with this model, since it won't be used afterwards.

Found your problem.

 

Your model has a problem and renders 1.5 blocks bellow where it should

 

In your renderHunch do

  public void doRender(EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9){
{
super.doRender(par1EntityLiving,par2,par4+1.5,par6,par8,par9)
}

 

And it should work.

 

Edit: oops, doesn't work with in the models render code, sorry, you'll have to do it in your renderer's code

  • Author

Found your problem.

 

Your model has a problem and renders 1.5 blocks bellow where it should

 

In your renderHunch do

  public void doRender(EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9){
{
super.doRender(par1EntityLiving,par2,par4+1.5,par6,par8,par9)
}

 

And it should work.

 

Edit: oops, doesn't work with in the models render code, sorry, you'll have to do it in your renderer's code

Should I remove all my old methods?

 

I tried just adding the line in and it didn't fix the invisible bug, I also tried removing all the original methods and it didn't fix it.

 

My current render file is this:

http://pastebin.com/Htfw0CQD

 

I also am wondering, could there be an issue with my egg (it appears as normal, but maybe it is spawning the mob wrong since I changed the way the ID was done with that correction above).

 

Here is my egg code:

 

 

private static int startEntityId = 300;

private 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));


}

private int getUniqueEntityId() {

	do {
		startEntityId++;
	}
	while(EntityList.getStringFromID(startEntityId) != null);
	return startEntityId++;
}

From your Hunch file:

 

import com.sun.xml.internal.stream.Entity;

Thats not the right entity!

 

 

  • Author

From your Hunch file:

 

import com.sun.xml.internal.stream.Entity;

Thats not the right entity!

Wow, and someone on a previous forum was so adamant that I change that from the import net.minecraft.entity.Entity; one..

 

Well I changed it back and I have an interesting new issue. The model appears as two of the model stacked upon one another.

 

Edit; Fixed, removed redundant code.

 

           public void doRender(EntityLiving par1EntityLiving, double par2, double par4, double par6, float par8, float par9){
                  super.doRender(par1EntityLiving,par2,par4+1.5,par6,par8,par9);
              renderHunch((EntityHunch)par1EntityLiving, par2, par4, par6, par8, par9);
             
           }

 

You are rendering it twice. If the bottom model is at ground level, then remove

 super.doRender(par1EntityLiving,par2,par4+1.5,par6,par8,par9);

, otherwise, remove

 renderHunch((EntityHunch)par1EntityLiving, par2, par4, par6, par8, par9);

 

Also, did you make any changes to the egg since you last used it successfully? because changing an import should not effect code from another part of the mod.

  • Author

Yeah I forgot I had the redundant rendering and just fixed that as you replied, so it renders with the right texture and all. Only problem is he is floating in the air a bit (about his height up) and the hitbox is in the area below.  Testing the fix you posted atm.

 

Also the egg problem was I was using an old egg not the correct one.

 

 

edit: Fixed

 

Thank you so much! :D

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.