F0X Posted November 21, 2018 Posted November 21, 2018 So I wanted to create my own mod, that makes some modifications wiht rendering and stuff, for example I need to edit the EntityRenderer class. I read about coremods and started developing my own, but then I saw many posts on this forum saying coremods are highly deprecated and shouldn't be used. Now my question is how to achieve my goal of building my own client modification, and how do mods like labymod or oldanimationsmod work, that definetely change the client code? I know i could for example just set Minecraft#entityRenderer to my own custom EntityRenderer, but is this a better way of dealing with the problem? Quote
Animefan8888 Posted November 21, 2018 Posted November 21, 2018 38 minutes ago, F0X said: but is this a better way of dealing with the problem? Yes, coremodding requires extreme knowledge of byte code manipulation and is very incompatible with mods. Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
Cadiboo Posted November 21, 2018 Posted November 21, 2018 2 hours ago, Animefan8888 said: is very incompatible with mods. Not if done very well, but that requires even more extensive knowledge, time and effort. 3 hours ago, F0X said: I know i could for example just set Minecraft#entityRenderer to my own custom EntityRenderer, but is this a better way of dealing with the problem? It depends what exactly you are trying to achieve and if other mods modify the same class/method. This is the more accepted (and much, much, MUCH easier) way of doing it. Coremods require learning an entirely new language (Java Bytecode) and learning how to use the ASM library, which is almost as hard as learning another new language. Java Bytecode is a low-level language and doesn’t have any of the structures your used to from other languages (as bytes it resembles Machine Code and as instructions it resembles Assembly) Coremods also break completely with the slightest change to the original code you’re modifying (if another variable is added anywhere in the method for example) Quote About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
Draco18s Posted November 21, 2018 Posted November 21, 2018 Cancel the entity's render even and render your own. 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.
Cadiboo Posted November 21, 2018 Posted November 21, 2018 Draco18s has a very good point. Why do you need to edit the EntityRenderer class? Are you sure you can’t use forge’s event system? Quote About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
F0X Posted November 22, 2018 Author Posted November 22, 2018 6 hours ago, Cadiboo said: Coremods require learning an entirely new language (Java Bytecode) and learning how to use the ASM library, which is almost as hard as learning another new language. Java Bytecode is a low-level language and doesn’t have any of the structures your used to from other languages (as bytes it resembles Machine Code and as instructions it resembles Assembly) Thats not the hugest problem to me, because I wanted to learn about bytecode-manipulation anyways, but it would really take a while 'til I am able to create a "good" coremod, true. 6 hours ago, Cadiboo said: Draco18s has a very good point. Why do you need to edit the EntityRenderer class? Are you sure you can’t use forge’s event system? I this particular case of course, but the thing is, I'm trying to create an "own client like" mod, that changes many behaviors of the normal client. Before I did this kind of thing with MCP directly, but this time I want a mod, because I want it to be compatible with other mods I use. This is one of my first mods with forge, so I am not really familiar with the whole Forge API, but I'm definetely going to try using the event system and for now probably not a coremod. Quote
F0X Posted November 22, 2018 Author Posted November 22, 2018 (edited) 7 hours ago, Draco18s said: Cancel the entity's render even and render your own. How do I do this? Sry to ask, but the docs are really short and there is no javadoc online. Edited November 22, 2018 by F0X Quote
Cadiboo Posted November 22, 2018 Posted November 22, 2018 In your event subscriber add a @SubscribeEvent to the RenderPlayer.Pre event, cancel it and do your rendering Quote About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
F0X Posted November 22, 2018 Author Posted November 22, 2018 Just now, Cadiboo said: In your event subscriber add a @SubscribeEvent to the RenderPlayer.Pre event, cancel it and do your rendering Thanks, I hate it when there's literally no documentation on things. Quote
Cadiboo Posted November 22, 2018 Posted November 22, 2018 https://mcforge.readthedocs.io/en/latest/events/intro/ Quote About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
F0X Posted November 22, 2018 Author Posted November 22, 2018 4 minutes ago, Cadiboo said: https://mcforge.readthedocs.io/en/latest/events/intro/ I know, but it doesn't tell you all the events and stuff, its just a brief introduction imo Quote
Cadiboo Posted November 22, 2018 Posted November 22, 2018 6 minutes ago, F0X said: I know, but it doesn't tell you all the events and stuff, its just a brief introduction imo Use your IDE to look at all the classes that extend Event Quote About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
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.