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.

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

Featured Replies

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?

  • Author

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.

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.