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

Hey guys, I got a tricky one for you today...

 

I have an error in my code, yet it does not show up in Eclipse while running the game from my workspace. It only shows up when I export my modification and run it through the Minecraft launcher. Whenever I try to launch the GUI through the launcher it gives me a no such field error from the constant "width" whenever it reaches that line. I have compared my code to many different examples and yet it still will not work.

 

For starters:

 

1. I made sure that the Minecraft Forge versions in my workspace and client were the same. I double and even triple checked them after reinstalling both. Someone suggested that the code could be out of sync, but it is not the case.

 

Forge Build # (For both Launcher and Workspace)

forge.major.number=9
forge.minor.number=11
forge.revision.number=1
forge.build.number=916

 

2. Before, I had every reference to the width and height constant of the GUI referred to with "this.", and when I remove that keyword is does not make a difference. The game still crashes.

 

3. I have packaged my mod correctly based on the packaging in eclipse. Assets folders and mod folders are all in the correct places.

 

So here is the pastebin of the situation: http://pastebin.com/DE5y3dKA

 

To sum it up, I get

java.lang.NoSuchFieldError: width
        at co.einsteinium.wikilink.gui.GuiContainerWikiLinkMenu.func_73866_w_(GuiContainerWikiLinkMenu.java:64)

 

Here is the code file: GitHub

 

I would really appreciate any help on this, as I have no idea what the heck is going on. It seems like I have done everything right, but obviously not.

 

Thanks in advance,

 

 

Follow me on twitter! @keepablock

Read up on whats new! www.catacombs.co

width=700 height=60http://electronic-chronic.com/assets/keep-a-block/wikilink/wikilink_logo.png[/img]

Q: Are you getting the error client side or server side?

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.

It could be a reobfuscation issue.

You might want to try reobfuscating with a more recent version of mcp/forge.

 

Also, that codechicken.nei bit could be ruining it.

I had a similar issue awhile back, caused by reobfuscation of a field I had named the same as one of MCs fields.  (I think my issue was actually with a method name, but the same/similar probably applies) 

 

Be careful with extending classes that you don't try and use duplicate field names from the parent classes (the fields may be private in the parent and not visible in the child).  What will happen is MC will obfuscate your field name in the class (because it thinks it is an vanilla MC field), but none of the references to that field (for some reason it doesn't pick up the references to the field correctly, and they retain the original name as you specified).  When it goes to call your field from one of your classes, you get the no-field found error, as that field was re-named obfuscated.

 

In short -- check your naming, make sure you don't have any duplicate named fields/methods in your classes.

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.