Jump to content

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


HappleAcks

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

           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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

    • JANGKRIK4D >> SLOT DANA GOPAY OVO | SLOT GACOR GAMPANG MAXWIN X100 X250 X500  << DAFTAR JANGKRIK4D >> JANGKRIK4D SITUS SLOT PGSOFT GAMING TERPERCAYA JANGKRIK4D 🚀 SITUS PGSLOT DAN PGSOFT GAMING TERPERCAYA 🚀 – JANGKRIK4D situs pgslot paling gacor telah hadir bersama JANGKRIK4D yang karena telah memberikan berbagai macam permainan untuk mendapatkan jackpot yang besar karena sudah menjadi pioneer untuk penyedia game paling mujarab beserta jajaran pgsoft gaming terpercaya yang telah bersama dengan JANGKRIK4D menjalin kerja sama resmi serta berlisensi untuk memberikan kemenangan paling besar untuk para player yang mencoba menamatkan permainan yang telah memeberikan kemenangan fantastis saat ini. jangkrik4d slot gacor slot deposit dana demo slot gacor demo slot pg demo pg soft slot deposit gopay slot deposit pulsa slot server jepang
    • LINK DAFTAR KLIK DISINI slot deposit dana 5000 ribu via spaylater  adalah permainan slot dana gacor dengan menyediakan slot server thailand deposit dana. dan slot deposit dana adalah slot terbesar di thailand. anda cukup daftar disini dan mainkan disini slot deposit 5000 ribu via dana sudah dipastikan dengan deposit dana akan membuat akun anda menjadi akun special. situs deposit dana adalah situs yang terpercaya dan terakurat. Slot dana merupakan situs slot deposit dana yang sangat trending dan sangat dikenal luas di masyarakat. dengan adanya MAXWINBET77 anda bisa mendapatkan keuntungan besar setiap hari tanpa adanya potongan  yang pastinya menguntungkan bagi anda. situs slot dana  maxwinbet77 adalah situs slot dana terbaik 2024 dan dijamin mudah maxwin.
    • MELATI88 adalah pilihan terbaik bagi Anda yang ingin bermain slot dengan deposit pulsa tanpa potongan besar sebesar 5000. Dengan berbagai keunggulan yang kami tawarkan, kami siap memberikan Anda pengalaman bermain yang tak terlupakan. Bergabunglah dengan kami sekarang dan mulailah petualangan bermain slot yang seru dan menguntungkan!    
    • SENSASLOT adalah pilihan tepat bagi Anda yang menginginkan pengalaman bermain slot tanpa potongan besar saat deposit menggunakan Dana. Berikut adalah beberapa alasan mengapa Anda harus memilih SENSASLOT: Deposit Dana Tanpa Potongan Kami bangga menjadi salah satu situs slot pertama yang menawarkan deposit menggunakan Dana tanpa potongan besar sebesar 1000 ribu. Ini berarti Anda dapat melakukan deposit sebesar 1000 ribu dan mendapatkan seluruhnya untuk digunakan dalam permainan slot kami. Beragam Pilihan Permainan SENSASLOT menyajikan koleksi permainan slot yang beragam dan menarik dari berbagai provider terkemuka. Mulai dari tema klasik hingga yang paling modern, Anda akan menemukan banyak pilihan permainan yang sesuai dengan selera dan preferensi Anda. Kemudahan Bertransaksi Selain deposit Dana tanpa potongan besar, kami juga menyediakan berbagai metode pembayaran lainnya untuk kenyamanan Anda. Proses deposit dan penarikan dana di SENSASLOT cepat, mudah, dan aman.    
    • GIGASLOT adalah pilihan utama bagi para pemain yang menginginkan pengalaman bermain slot yang menyenangkan dan menguntungkan. Berikut adalah beberapa alasan mengapa Anda harus memilih GIGASLOT: Slot Gacor dengan Maxwin Kami menyajikan koleksi slot gacor terbaik dengan peluang meraih maxwin yang menggiurkan. Dengan berbagai tema permainan dan fitur bonus yang menarik, Anda akan selalu merasa terhibur dan berkesempatan untuk meraih kemenangan besar. Deposit Terjangkau Melalui Bank Permata Kami memahami bahwa kemudahan dalam bertransaksi adalah hal penting bagi para pemain. Oleh karena itu, kami menyediakan layanan deposit melalui Bank Permata dengan nominal deposit yang terjangkau, mulai dari 10K saja! Prosesnya cepat, mudah, dan aman, sehingga Anda dapat langsung memulai petualangan bermain tanpa hambatan. GIGASLOT adalah pilihan terbaik untuk Anda yang ingin menikmati slot gacor dengan maxwin dan melakukan deposit yang terjangkau melalui Bank Permata. Dengan berbagai keunggulan yang kami tawarkan, kami siap memberikan Anda pengalaman bermain .    
  • Topics

×
×
  • Create New...

Important Information

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