InfinitePower563 Posted June 20, 2020 Posted June 20, 2020 I’m new to coding with forge, so don’t just send me a github repo and say here. I want to know how to create a HUD with editable text. Can someone help please? Quote
DaemonUmbra Posted June 20, 2020 Posted June 20, 2020 If you're looking to mod with Forge you'd better get used to reading source code and looking at how Vanilla, Forge, and other Mods do things, documentation is notoriously sparse and is outdated almost as fast as it gets written. Quote This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy. As the most common issue I feel I should put this outside the main bulk: The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge. If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan. For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety. Reveal hidden contents Logs (Most issues require logs to diagnose): Reveal hidden contents Please post logs using one of the following sites (Thank you Lumber Wizard for the list): https://gist.github.com/: 100MB Requires member (Free) https://pastebin.com/: 512KB as guest, 10MB as Pro ($$$) https://hastebin.com/: 400KB Do NOT use sites like Mediafire, Dropbox, OneDrive, Google Drive, or a site that has a countdown before offering downloads. What to provide: ...for Crashes and Runtime issues: Minecraft 1.14.4 and newer: Post debug.log Older versions: Please update... ...for Installer Issues: Post your installer log, found in the same place you ran the installer This log will be called either installer.log or named the same as the installer but with .log on the end Note for Windows users: Windows hides file extensions by default so the installer may appear without the .jar extension then when the .log is added the log will appear with the .jar extension Where to get it: Mojang Launcher: When using the Mojang launcher debug.log is found in .minecraft\logs. Curse/Overwolf: If you are using the Curse Launcher, their configurations break Forge's log settings, fortunately there is an easier workaround than I originally thought, this works even with Curse's installation of the Minecraft launcher as long as it is not launched THROUGH Twitch: Reveal hidden contents Make sure you have the correct version of Forge installed (some packs are heavily dependent on one specific build of Forge) Make a launcher profile targeting this version of Forge. Set the launcher profile's GameDir property to the pack's instance folder (not the instances folder, the folder that has the pack's name on it). Now launch the pack through that profile and follow the "Mojang Launcher" instructions above. Video: Reveal hidden contents or alternately, Fallback ("No logs are generated"): If you don't see logs generated in the usual place, provide the launcher_log.txt from .minecraft Server Not Starting: Reveal hidden contents If your server does not start or a command window appears and immediately goes away, run the jar manually and provide the output. Reporting Illegal/Inappropriate Adfocus Ads: Reveal hidden contents Get a screenshot of the URL bar or copy/paste the whole URL into a thread on the General Discussion board with a description of the Ad. Lex will need the Ad ID contained in that URL to report it to Adfocus' support team. Posting your mod as a GitHub Repo: Reveal hidden contents When you have an issue with your mod the most helpful thing you can do when asking for help is to provide your code to those helping you. The most convenient way to do this is via GitHub or another source control hub. When setting up a GitHub Repo it might seem easy to just upload everything, however this method has the potential for mistakes that could lead to trouble later on, it is recommended to use a Git client or to get comfortable with the Git command line. The following instructions will use the Git Command Line and as such they assume you already have it installed and that you have created a repository. Open a command prompt (CMD, Powershell, Terminal, etc). Navigate to the folder you extracted Forge’s MDK to (the one that had all the licenses in). Run the following commands: git init git remote add origin [Your Repository's URL] In the case of GitHub it should look like: https://GitHub.com/[Your Username]/[Repo Name].git git fetch git checkout --track origin/master git stage * git commit -m "[Your commit message]" git push Navigate to GitHub and you should now see most of the files. note that it is intentional that some are not synced with GitHub and this is done with the (hidden) .gitignore file that Forge’s MDK has provided (hence the strictness on which folder git init is run from) Now you can share your GitHub link with those who you are asking for help. [Workaround line, please ignore]
InfinitePower563 Posted June 20, 2020 Author Posted June 20, 2020 On 6/20/2020 at 4:13 AM, DaemonUmbra said: If you're looking to mod with Forge you'd better get used to reading source code and looking at how Vanilla, Forge, and other Mods do things, documentation is notoriously sparse and is outdated almost as fast as it gets written. Expand Then can you fork over a github please? Quote
InfinitePower563 Posted June 20, 2020 Author Posted June 20, 2020 On 6/20/2020 at 3:17 PM, diesieben07 said: Vanilla source code cannot be published on Github, because it is copyrighted by Mojang. That is the entire reason Forge's build system is so complex (decompilation, patches, etc.). Expand I meant the HUD mod not the decompiled source code. Quote
Novârch Posted June 20, 2020 Posted June 20, 2020 On 6/20/2020 at 4:02 PM, InfinitePower563 said: I meant the HUD mod not the decompiled source code. Expand What HUD? If you're looking for how vanilla renders it's HUD, you can find the vanilla source code in your project's libraries. Quote It's sad how much time mods spend saying "x is no longer supported on this forum. Please update to a modern version of Minecraft to receive support".
InfinitePower563 Posted June 21, 2020 Author Posted June 21, 2020 On 6/20/2020 at 6:59 PM, Novârch said: What HUD? If you're looking for how vanilla renders it's HUD, you can find the vanilla source code in your project's libraries. Expand Like a little text box that has custom text Quote
DavidM Posted June 22, 2020 Posted June 22, 2020 (edited) Subscribe to RenderOverlayEvent and render your text there with FontRenderer#drawString. Make sure to check the component/type that is being rendered in the event. Edited June 22, 2020 by DavidM Quote Some tips: Reveal hidden contents Modder Support: Reveal hidden contents 1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code. 2. Always post your code. 3. Never copy and paste code. You won't learn anything from doing that. 4. Quote Programming via Eclipse's hotfixes will get you nowhere Expand 5. Learn to use your IDE, especially the debugger. 6. Quote The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it. Expand Support & Bug Reports: Reveal hidden contents 1. Read the EAQ before asking for help. Remember to provide the appropriate log(s). 2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.
InfinitePower563 Posted June 23, 2020 Author Posted June 23, 2020 On 6/22/2020 at 12:43 AM, DavidM said: Subscribe to RenderOverlayEvent and render your text there with FontRenderer#drawString. Make sure to check the component/type that is being rendered in the event. Expand Is RenderOverlayEvent static? Also, how do you register events. As I said, I’m new. Quote
Draco18s Posted June 23, 2020 Posted June 23, 2020 On 6/23/2020 at 7:46 PM, InfinitePower563 said: Is RenderOverlayEvent static? Expand No, its a class. 21 minutes ago, InfinitePower563 said: Also, how do you register events. As I said, I’m new. Expand Try reading the docs. Quote 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.
InfinitePower563 Posted June 24, 2020 Author Posted June 24, 2020 On 6/22/2020 at 12:43 AM, DavidM said: Subscribe to RenderOverlayEvent and render your text there with FontRenderer#drawString. Make sure to check the component/type that is being rendered in the event. Expand Which RenderOverlayEvent? RenderBlockOverlayEvent or RenderGameOverlayEvent? Quote
Draco18s Posted June 24, 2020 Posted June 24, 2020 Well, what's your text associated with? A block or the game overlay (HUD)? Quote 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.
InfinitePower563 Posted June 24, 2020 Author Posted June 24, 2020 (edited) On 6/24/2020 at 5:25 PM, Draco18s said: Well, what's your text associated with? A block or the game overlay (HUD)? Expand Just some text, like "Hi". Edited June 24, 2020 by InfinitePower563 Quote
Draco18s Posted June 24, 2020 Posted June 24, 2020 That did not answer the question. Quote 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.
DavidM Posted June 25, 2020 Posted June 25, 2020 On 6/24/2020 at 4:57 PM, InfinitePower563 said: Which RenderOverlayEvent? RenderBlockOverlayEvent or RenderGameOverlayEvent? Expand RenderGameOverlayEvent (I miss spelt it, my apologies). Quote Some tips: Reveal hidden contents Modder Support: Reveal hidden contents 1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code. 2. Always post your code. 3. Never copy and paste code. You won't learn anything from doing that. 4. Quote Programming via Eclipse's hotfixes will get you nowhere Expand 5. Learn to use your IDE, especially the debugger. 6. Quote The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it. Expand Support & Bug Reports: Reveal hidden contents 1. Read the EAQ before asking for help. Remember to provide the appropriate log(s). 2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.
InfinitePower563 Posted June 25, 2020 Author Posted June 25, 2020 On 6/25/2020 at 12:44 AM, DavidM said: RenderGameOverlayEvent (I miss spelt it, my apologies). Expand Thanks. Quote
Koolade446 Posted September 2, 2021 Posted September 2, 2021 (edited) On 6/20/2020 at 4:13 AM, DaemonUmbra said: If you're looking to mod with Forge you'd better get used to reading source code and looking at how Vanilla, Forge, and other Mods do things, documentation is notoriously sparse and is outdated almost as fast as it gets written. Expand On 6/20/2020 at 3:11 PM, InfinitePower563 said: Then can you fork over a github please? Expand well then where the heck do I get vanilla source code? I've tried using a decompiler on the vanilla Jar but thier file naming scheme makes no sense at all its like $q87634576auyfgiatf.class Edited September 2, 2021 by Koolade446 Spelling Quote
Draco18s Posted September 2, 2021 Posted September 2, 2021 On 9/2/2021 at 3:16 PM, Koolade446 said: well then where the heck do I get vanilla source code? I've tried using a decompiler on the vanilla Jar but thier file naming scheme makes no sense at all its like $q87634576auyfgiatf.class Expand In your IDE, under Referenced Libraries. Quote 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.
Recommended Posts
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.