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.

Featured Replies

Posted

Whenever my entity, which extends EntityCreature, is spawned, I run the following:

this.setItemStackToSlot(EntityEquipmentSlot.HEAD, new ItemStack(Blocks.PUMPKIN));

But it seemingly has no effect. I've also tried to run it a while after it has spawned and confirmed that is does execute. However, my entity still does not equip anything. I've also tried equipping it with a sword, but that also has no effect.

  • Author
3 minutes ago, diesieben07 said:

Show your code. Also, what makes you think that it's not equipped? Have you checked with the debugger? Does your renderer actually handle equipped items?

Was not aware of the need to add it to the render, but of course that was it, thanks.

 

For those with the same issue, I added the following to the constructor of my render:

this.addLayer(new LayerHeldItem(this));

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

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.