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

Hi I'm new to minecraft programming. Working through a book called "Minecraft modding with Forge" and got stuck.

 

I'm not sure why I am unable to import these classes.

 

Why am I getting these errors? Thanks a bunch :)

min.png

Edited by Demon Llama

Welcome!

A few important things. 
1) It's best if you use the code quotations tool in the forum or use Pastebin to show us the code. 
2) It's super helpful if you let us know what version you are running. It also does not work with me and the reason is there isn't a ChatComponentText in the Util's as far as I can see. Probably it was moved to a different name/function. 

 

My guess is that you'll need to find updated code for this particular portion. I see a "ChatAllowedCharacters" but thats it for chat under the Util's hierarchy. Sorry. Thats the best I can do for you :(. Hopefully someone smarter has a better idea!

  • Author
3 minutes ago, olrustyeye said:

Welcome!

A few important things. 
1) It's best if you use the code quotations tool in the forum or use Pastebin to show us the code. 
2) It's super helpful if you let us know what version you are running. It also does not work with me and the reason is there isn't a ChatComponentText in the Util's as far as I can see. Probably it was moved to a different name/function. 

 

My guess is that you'll need to find updated code for this particular portion. I see a "ChatAllowedCharacters" but thats it for chat under the Util's hierarchy. Sorry. Thats the best I can do for you :(. Hopefully someone smarter has a better idea!

Awwww. Thanks though. And thanks for the forum tips :D

 

Where can I find a documentation list for the Minecraft/Forge methods, events, classes, etc?

 

Thanks again!

17 minutes ago, Demon Llama said:

Awwww. Thanks though. And thanks for the forum tips :D

 

Where can I find a documentation list for the Minecraft/Forge methods, events, classes, etc?

 

Thanks again!

I wish there was more documentation. Sadly it's severly lacking. Not for forge's lack of trying but things change so much and few people actually want to go through the code and find things. 
That being said there is some pretty useful stuff here. 
https://mcforge.readthedocs.io/en/latest/
Nothing like what you're looking for but it's a good resource for what is there. 

  • Author
2 minutes ago, olrustyeye said:

I wish there was more documentation. Sadly it's severly lacking. Not for forge's lack of trying but things change so much and few people actually want to go through the code and find things. 
That being said there is some pretty useful stuff here. 
https://mcforge.readthedocs.io/en/latest/
Nothing like what you're looking for but it's a good resource for what is there. 

Ah thanks. I actually looked through all that and couldn't find enough info :/ 

Compared to bukkit, it's a lot less documentation. Darn I really wanted to work through this awesome book too D: 

2 minutes ago, Demon Llama said:

Ah thanks. I actually looked through all that and couldn't find enough info :/ 

Compared to bukkit, it's a lot less documentation. Darn I really wanted to work through this awesome book too D: 

I modded minecraft back in 1.3 and 1.5. Fun fact I actually owned the One Stop Mod Shop way way long ago haha. Things have changed, but the syntax on the basic stuff like blocks are the same. Find what version the book is using and switch to that go through it and then all you'll need to do is update your syntax!

 

  • Author
2 minutes ago, olrustyeye said:

I modded minecraft back in 1.3 and 1.5. Fun fact I actually owned the One Stop Mod Shop way way long ago haha. Things have changed, but the syntax on the basic stuff like blocks are the same. Find what version the book is using and switch to that go through it and then all you'll need to do is update your syntax!

 

OMG !!!!!! Great idea. Why didn't I think to downgrade so I could complete the book ? Haha.

Okay I will do that :D 

I'm super happy now !

Now to figure out how to undo everything and downgrade the forge version O.o

  • Author

https://pastebin.com/t7wP7RW4

 

Okay I'm not sure how to downgrade :/

I redid the whole forge folder and workspace and everything.

But now when I run ./gradlew setupDecompWorkspace, the build always fails.

 

Could someone help me out with how to go about properly downgrading?

 

 

EDIT: fixed the problem. I just picked a different version of 1.8 and the set up worked fine :D

Edited by Demon Llama
fixed my problem

"Chat" components were renamed to "Text" components in 1.9. ChatComponentText is now TextComponentString, EnumChatFormatting is now TextFormatting.

 

This issue tracker documents most renames in 1.8+.

 

You can also use MCPBot to find the current name of a field/method/parameter when you have its old name:

  • Use the findf/findm/findp commands with the old MCP (deobfuscated) name and the old Minecraft version to find the SRG (obfuscated) name.
  • Use the same command with the SRG name and the new Minecraft version (or omit the version argument for the current version) to find the current MCP name.
  • Alternatively, use the fh/mh/ph commands with the SRG name to display the name history instead of just the current name.

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.