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

So i have an entity, which when spawned a special way is "binded" to the player. Like a pet but the player can only have one of it. I save the reference to that entity in an capability and then i can manipulate that entity in various ways. That works fine.

The issue i have is with saving/loading. I currently save the entitys uuid and then during load search for that uuid. if found i then sets the players data to that entity. however of course if the entity is in an unloaded chunk during the nbt read progress it wont find it and so fails to "rebind" that entity to the player. 

I also do the same progress from the entity side (save player uuid and search for player) so then when the entity loads it does get rebind to the player.

however during the time when the entity is unloaded the data in the capability is of course null so i cant do anything to the entity.

is there ways to manipulate unloaded entitys (like tp them to you)? is it smart to save the chunk, the entity is saved and temporarily load that chunk to do stuff?

  • Author

in theory i should be able to edit the players data file when the entity is saved to disk. that way i can save the chunk, where the entity is saved even after the player is gone

11 minutes ago, Flemmli97 said:

in theory i should be able to edit the players data file when the entity is saved to disk. that way i can save the chunk, where the entity is saved even after the player is gone

It would probably be better to save this to the World instead of to the Player. And just map it to the players uuid.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

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.