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

Writing adventure mods requires you to make load of quest items, which MIGHT be unobtainable in future (deprecated) or even removed from game code.

While deprecation case doesn't really matter (since item is still in game), there is problem with stuff that is removed from game code.

 

Forge has its system that (I am assuming from observation, not code itself) when world is created creates "dictionary" which matches unlocalized name (short: UN) of item with its world-unique-internal-ID. Then all items of this UN are saved in world as those ids.

This is true, right?

 

For some time now - forge has detection of items that were not found in game code (were not registered in gameRegistry). I am sure everyone saw on-world-load GuiScreen that says that world couldn't assign item to loaded world-saved item.

 

Questions:

* When item is totally removed from registry - what happens to:

- Forge's UN-to-ID "dictionary"? Does the UN stay and points at null thing or is it also removed?

- What happens to world-saved things that cannot find its registy-matches? I know for sure that items and blocks simply disappear - my guess is that if loaded item/block points at nothing it's set to null/0 and removed from loaded-NBT (from world save). Are they removed from disk or just bypassed and left?

- What would happen if I'd remove item from game and after some time re-added other item with same UN (unloc name)? How will forge deal with it?

EDIT:

- What about TileEntities, when their block gets removed - are they not-loaded and if not - is their data lost or just bypassed by world-loading code?

- What about removing TE and leaving Block? Same cleanup disk-data questions apply.

 

 

Basically - if someone knows how forge deals with world-data cleaning up, I'd be glad to hear anything.

 

Also - I have no idea where to look for the code responsible - right now I am literally searching for stuff like "save" "load" keywords, but there is so damn much callbacks :o

 

Thanks :D

1.7.10 is no longer supported by forge, you are on your own.

  • Author

Everything clear as always, thanks man, saved me at least 2 hours.

 

As to Unlocalized name - I just messed up naming. That's what I ment (registry identifier).

 

Basically, if I'd remove something - until I load world for the first time after removal, I can easily register totally other thing to same (old) identifier and it will work (old will become new one, assuming there won't be loading - read NBT error).

 

And if I'd load it at least once, the world will forget about identifier and only leave locked id behind it - which will cause all old stuff to be removed and if I'd put other item with same name identifier - it will still get a new ID (forge won't remember it).

 

If that is right then I am so damn happy.

 

(I have to be reassured because i will be implementing something that simply can't have any issues with its removal in future).

 

Muchas Gracias :P

1.7.10 is no longer supported by forge, you are on your own.

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.