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 understand Mojang changed ResourceLocation to force lowercase. That has been a minor irritation. The AttachCapabilitiesEvent#addCapability uses a ResourceLocation too. As a result this new behavior has broke loading a 1.10.x. and earlier world data IF you used a mixed or uppercase resource name. Fortunately you only lose data since the saved capability is simply recreated with defaults again using the lowercased identifier. I was curious if there is a way I can dynamically fix world data.

 

event.addCapability(new ResourceLocation(MXTuneMain.MODID, "IPlayerMusicOptions"), new ICapabilitySerializable<NBTTagCompound>()

 

The result for pre 1.11 is what I would expect.

sKj32.png

 

The result for 1.11 was not surprising once I looked at my code and saw the ResourceLocation parameter.

sKjeO.png

 

I've seen examples to fix your registry renames using the FMLMissingMappingsEvent. But that's for Items and Blocks.

 

At this point I need to do more research. Does anyone have any ideas or suggestions?

  • Author

After reviewing some NBT specs I'd would say it would be better to allow mixed case in the resource path portion of a ResourceLocation. NBT is case sensitive. Should capabilities respect the case of the name you choose? In my opinion it should. A CapResourcePath could be created that extends ResourcePath.

 

 

it would be better to allow mixed case in the resource path portion of a ResourceLocation

 

Not going to happen.  Mojang already made the change.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

  • Author

Oh I understand what Mojang did. I'm fine with it, but since hindsight is 20/20, using a ResourceLocation for the capability tag is less than ideal. World save data and resources/assets live in two different worlds.

True, they do.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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.