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've run into a strange issue where using a lambda to implement

ItemMeshDefinition

crashes the game with an

AbstractMethodError

any time the item is rendered in a GUI. This only happens in the obfuscated client, not in the development environment.

 

I've set up a small test case here. The lambda is used here.

 

To reproduce, simply open the mod's creative tab or spawn in its block. The block will render without issue in the world, but as soon as it's rendered in a GUI or a player's hand the game crashes.

 

You can see the crash report here.

 

Does anyone know why this happens or how to fix it? It seems like it may be some weird interaction between lambdas and the reobfuscation process.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

I don't know much about 1.8 or models, but that lambda seems weird... Are you sure that's what you meant to write?

WIP mods: easyautomation, easyenergy, easyelectronics, easymoney, easytrasportation, easysecurity, easymultiverse, easyfactions, easymagick, easyalchemy, easyseasons

  • Author

I don't know much about 1.8 or models, but that lambda seems weird... Are you sure that's what you meant to write?

 

Yes, it's just mapping to a constant model location regardless of the

ItemStack

's metadata/NBT.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

java thinks you're invoking an interface method without implementation though. well if only I knew more about that model stuff...

WIP mods: easyautomation, easyenergy, easyelectronics, easymoney, easytrasportation, easysecurity, easymultiverse, easyfactions, easymagick, easyalchemy, easyseasons

  • Author

java thinks you're invoking an interface method without implementation though. well if only I knew more about that model stuff...

 

Lambdas can be used in place of any interface with a single method (like

ItemMeshDefinition

), they act like an implementation of the interface with the lambda's body as the method body.

 

This works in the development environment, just not in the obfuscated client.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

I didn't know there was such interface. then your lambda seems fine. maybe it's the java version you're targeting?

 

I don't know the language used in build.gradle, but maybe there's something wrong there? for instance, I was told I should choose java version for building using these lines:

 

sourceCompatibility = 1.8
targetCompatibility = 1.8

 

but you do something different.

WIP mods: easyautomation, easyenergy, easyelectronics, easymoney, easytrasportation, easysecurity, easymultiverse, easyfactions, easymagick, easyalchemy, easyseasons

  • Author

Thanks diesieben07, that works perfectly.

 

I looked at the bytecode earlier using Bytecode Viewer and noticed the INVOKEDYNAMIC instruction (though I wasn't fully aware of what it did), but it seems that the program doesn't know how to display it properly.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

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.