Jump to content

[1.6.4] The problem with the renderer model (if player on the server).


Recommended Posts

Posted

Hi all!

 

I created new Inventory, which open if i press 'I'. Inventory have one new slot. If in this slot put the backpack, his should be rendered behind the player back.

 

I use RenderPlayerAPI, because mod must be compatibility with Smart Moving.

 

But if i put backpack into the slot on server. It will be visible only for me.

 

LxzOyX9.jpg

j3iYA7S.jpg

 

Render method:

 

 public void renderModel(EntityLivingBase entityLiving, float f1, float f2, float f3, float f4, float f5, float f6)
    {
        super.renderModel(entityLiving, f1, f2, f3, f4, f5, f6);
        
        EntityPlayer player = (EntityPlayer)entityLiving;
        InventoryEx inv = PlayerExtended.get(player).inventory;
        
        if (inv.bagtype == 1)
        {        
            this.mc.getTextureManager().bindTexture(small_t);
            super.renderPlayerAPI.getModelBipedMainField().bipedBody.postRender(0.0625F);
            this.small.render(0.0625F);
        }
    }

 

'bagtype' - type of backpack. Automatically changes to 1, if he is in the slot.

 

I registry Render into ClientProxy.

 

RenderPlayerAPI.register(NichieInfo.ID, RenderBackpackOnPlayer.class);

 

How to fix this?

Posted

First of all, don't make mods for 1.6.4.

You'll need to send packets to make the data available on all clients.

 

Mod must be on version 1.6.4. (It will be updated to 1.7.2, but now it must be on 1.6.4)

 

I know, what need to send packets. But how to do this on version 1.6.4?

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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