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.

Bezeram

Members
  • Joined

  • Last visited

  1. Bezeram started following Buggy foil
  2. Hello. I have implemented an item which is a compass with a custom function for the direction. The problem is with the foil it resets every time the compass model changes. Anyone know why this happens? Compass model: compass.json Compass implementation: CompassItem
  3. Solved it. There is literally a "onScreenOpen" client event. In the event parameter you can set the new screen with event.setNewScreen().
  4. Doesn't matter anymore I was bein dumb. I didn't know I had to use item tags : P Issue closed.
  5. How can I replace the vanilla DeathScreen with a custom one? My custom screen only adds an extra button.
  6. Hello! I am new to modding in Minecraft. I have created a custom compass item which basically points towards a target player, along with other logic. More or less, I have copied the vanilla implementation, apart from the class Item derived class, which contains several private non-static fields. Crucially however, those fields are not initialised when I register the Item using a DeferredRegister. For the client rendering I have attempted to use the vanilla CompassItemPropertyFunction, in which I have passed a lambda function which is supposed to get data from the custom compass item stored in its fields. The lambda function looks like this: (clientLevel, itemStack, entity) -> GlobalPos The compass has its private non-static fields initialised when the compass is given to the player via a game command. The problem: those fields are not initialised when attempting to return the target player's position in the getPos() function found in CompassItemPropertyFunction, even though they are in fact initialised as part of an ItemStack stored in a player's inventory. My question: why is the additional data I added in my custom compass item class all null, but the ItemStack instance might still contain tags for example?

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.