HappleAcks Posted April 9, 2014 Author Posted April 9, 2014 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. Quote
darty11 Posted April 9, 2014 Posted April 9, 2014 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 Quote
HappleAcks Posted April 9, 2014 Author Posted April 9, 2014 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++; } Quote
darty11 Posted April 9, 2014 Posted April 9, 2014 From your Hunch file: import com.sun.xml.internal.stream.Entity; Thats not the right entity! Quote
HappleAcks Posted April 9, 2014 Author Posted April 9, 2014 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. Quote
darty11 Posted April 9, 2014 Posted April 9, 2014 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. Quote
HappleAcks Posted April 9, 2014 Author Posted April 9, 2014 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! Quote
Recommended Posts
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.