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

I am aware capabilities will help me write and store data in my world, but I'm honestly very confused how it works. I am trying to store the spawn point of a entity so whenever I reload the game the entity still knows its spawn point which will be used to find its way back home.

Although the docs on this is still outdated (my fault for incorrectly basing a branch, causing a larger delay on it), it still is plenty useful. As you said, capabilities are used to store extra information on TileEntities, Entities, ItemStacks, Worlds, and Chunks. You can attach your capability via a provider or by using the attached method to the class (usually on TileEntity and Entity I believe). Basically, it just stores excess information on the object provided. Now capability data is specifically for the logical server as by default, it is not sent to the client. There are three use cases for this information and how to synchronize efficiently without creating a bottleneck is depending on how or what information you sync.

 

Hopefully this gives you a good starting point. As for examples, I think Choonster made a pretty good one (it doesn't matter that it was for a previous version since the implementation of capabilities have still been the same).

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.