Jump to content

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


Recommended Posts

Posted

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.

Posted

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

Posted

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++;
}

Posted

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.

 

Posted

           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.

Posted

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

×   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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I tried do download the essential mod to my mod pack but i didnt work. I paly on 1.21 and it should work. I use neoforge for my modding. The weird things is my friend somehow added the mod to his modpack and many others that I somehow can´t. Is there anything i can do? 
    • Thanks, I've now installed a slightly newer version and the server is at least starting up now.
    • i have the same issue. Found 1 Create mod class dependency(ies) in createdeco-1.3.3-1.19.2.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Found 11 Create mod class dependency(ies) in createaddition-fabric+1.19.2-20230723a.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Detailed walkthrough of mods which rely on missing Create mod classes: Mod: createaddition-fabric+1.19.2-20230723a.jar Missing classes of create: com/simibubi/create/compat/jei/category/sequencedAssembly/JeiSequencedAssemblySubCategory com/simibubi/create/compat/recipeViewerCommon/SequencedAssemblySubCategoryType com/simibubi/create/compat/rei/CreateREI com/simibubi/create/compat/rei/EmptyBackground com/simibubi/create/compat/rei/ItemIcon com/simibubi/create/compat/rei/category/CreateRecipeCategory com/simibubi/create/compat/rei/category/WidgetUtil com/simibubi/create/compat/rei/category/animations/AnimatedBlazeBurner com/simibubi/create/compat/rei/category/animations/AnimatedKinetics com/simibubi/create/compat/rei/category/sequencedAssembly/ReiSequencedAssemblySubCategory com/simibubi/create/compat/rei/display/CreateDisplay Mod: createdeco-1.3.3-1.19.2.jar Missing classes of create: com/simibubi/create/content/kinetics/fan/SplashingRecipe
    • The crash points to moonlight lib - try other builds or make a test without this mod and the mods requiring it
    • Do you have shaders enabled? There is an issue with the mod simpleclouds - remove this mod or disable shaders, if enabled  
  • Topics

×
×
  • Create New...

Important Information

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