So as said above, I use Eclipse and the Minecraft Coder Pack. My first question is, I don't know how to upload the mob's file to the Minecraft Coder Pack in Eclipse, but then, the more important question is, where can I find the model for the entity in the source code? All I know is that the files are either a Java file or ".class", I definitely don't know how to read ".class" files. All help would be great.
Just some background, I am not just trying to rip the models and make them into my own mod and post them to the internet. I fully intend to change them up, use different texture mappings and then put it in my mod. I don't normally justify this, it's just that I'm terrible at modelling and I can't find the patience to do so myself. (In Specific, I'm trying to get all the tailed beast models from Mathioks Naruto Mod, and yes, I will credit him, I don't want this to feel like I'm stealing.) Thanks for all answers in advance!
Assuming you want the model files from a mod you need to decompile it; I have no experience* with decompiling what I assume is a Forge mod but you could try adding it to the Minecraft jar located in "mcp\jars\version" and while there will be a lot of errors when it tries to recompile it due to missing Forge libraries it should at least give the decompiled and deobfuscated source. The files themselves are most likely named something like "ModelEntityName" (some mods may obfuscate their own code but most do not, only references to vanilla classes or methods).
*I have successfully decompiled Optifine by decompiling a Minecraft jar with Optifine manually installed; in this case it was functional within MCP after I removed the installer classes, though any Forge mod will not work, but should still produce usable source code (it decompiled the Optifine installer files but they failed to recompile due to missing dependencies).
Yeah, I got the mod into the MCP folder but it still doesn't really have any models in it. It has the Java files, for example "Kurama.java", but it doesn't work. I took it and tried to edit it in Blockbench, but it was completely empty, as in, it opened but there was no model to edit... So, is there any way to dig into the deeper files and find the models that were used in the mod? Or, even to convert that Java file back into the model's file. Thanks!
In-game models are usually represented by Java code, unless a mod uses json model files; for example, this is part of the vanilla bat model (there is also code that controls the rotations of the body and limbs):
Note that Java model files can be found by searching the files for strings like "ModelRenderer", "ModelBase", or just "model" (the first two names are what MCP calls the entity model base classes in 1.6.4, which may be different in your version, but "model" should always work). This also assumes it has been deobfuscated, as otherwise you'll have things like "class extends abc", though "class" should still be a proper name for a model class if the modder writes anything like good code since only vanilla class and method names are obfuscated when a mod is compiled (in rare cases modders may obfuscate their own code), ideally including the name of the entity the model is for, as shown on the first line in the example).
However, there don't seem to be converters that convert from Java code to other formats, only the other way around, and it is hard to understand what is going on in the code shown (best I can tell is that the three float values after "addBox" are relative positions in some unit of measurement and the three ints are the size in pixels, as they do match the texture itself. The values in ModelRenderer(x, y) seem to be pixel offsets in the texture sheet, where the head is at 0,0 and ears are at 24, 0).
Okay thanks, I'll try this. Just to make sure, I can find the strings for "Model" in MCP? Is there a way to like search all the files without going through all of them, or do I actually have to manually go through each and see? As of before when I was searching for the model file, I couldn't find anything. But yeah, that's my question. If I can't find anything, maybe I could send you the mod and you could see if I missed anything?
You can use Window's built-in search to search through files, though I use "Windows Grep", which offers more search options; IDEs may also have built-in search tools (I actually don't use one, even as TMCW is approaching 500 source files, which as shown here are all with the vanilla sources; I just use the date modified to easily separate them as I've used the same MCP installation for 7 years):
Man, thanks so much, you've been a great help. I don't know if this works as of yet because I haven't tried it, but still, thanks. I'll tell if it doesn't work or even if it does.
Ok, so to get back to it, I did indeed find something. The problem? It seems to be very outdated code. Like, I could upload it to Blockbench as a Java file, but no model appeared because it's all just groups, no actual blocks. I don't know if this is a problem that can be fixed or anything, but I just wanted to update on what happened. Do you think trying to edit it with Tabula 1.7.10 would work? (Since it's a model made for 1.7.10)
I've never used any modeling programs but it would make sense that you need one for the version you are using; I know that significant changes were made to rendering in 1.8, affecting at least block and item models, though from looking online I found vanilla entity model files for 1.12 that are virtually identical to the ones in 1.6.4 (they could be copy-pasted to the other version with no issues) so it seems they haven't changed the format up to at least 1.12, and code posted on the Forge forums suggests it is still the same in newer versions (for all I know entity models have always been the same since Alpha or even Classic) so if I had to guess the modeling program isn't reading in the file correctly (I assume that it only wants the constructor that defines all the model parts, if it can even read .java model files).
So as said above, I use Eclipse and the Minecraft Coder Pack. My first question is, I don't know how to upload the mob's file to the Minecraft Coder Pack in Eclipse, but then, the more important question is, where can I find the model for the entity in the source code? All I know is that the files are either a Java file or ".class", I definitely don't know how to read ".class" files. All help would be great.
Just some background, I am not just trying to rip the models and make them into my own mod and post them to the internet. I fully intend to change them up, use different texture mappings and then put it in my mod. I don't normally justify this, it's just that I'm terrible at modelling and I can't find the patience to do so myself. (In Specific, I'm trying to get all the tailed beast models from Mathioks Naruto Mod, and yes, I will credit him, I don't want this to feel like I'm stealing.) Thanks for all answers in advance!
Micaiah Hemphill
Assuming you want the model files from a mod you need to decompile it; I have no experience* with decompiling what I assume is a Forge mod but you could try adding it to the Minecraft jar located in "mcp\jars\version" and while there will be a lot of errors when it tries to recompile it due to missing Forge libraries it should at least give the decompiled and deobfuscated source. The files themselves are most likely named something like "ModelEntityName" (some mods may obfuscate their own code but most do not, only references to vanilla classes or methods).
*I have successfully decompiled Optifine by decompiling a Minecraft jar with Optifine manually installed; in this case it was functional within MCP after I removed the installer classes, though any Forge mod will not work, but should still produce usable source code (it decompiled the Optifine installer files but they failed to recompile due to missing dependencies).
TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.
TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.
Why do I still play in 1.6.4?
Yeah, I got the mod into the MCP folder but it still doesn't really have any models in it. It has the Java files, for example "Kurama.java", but it doesn't work. I took it and tried to edit it in Blockbench, but it was completely empty, as in, it opened but there was no model to edit... So, is there any way to dig into the deeper files and find the models that were used in the mod? Or, even to convert that Java file back into the model's file. Thanks!
Micaiah Hemphill
In-game models are usually represented by Java code, unless a mod uses json model files; for example, this is part of the vanilla bat model (there is also code that controls the rotations of the body and limbs):
Note that Java model files can be found by searching the files for strings like "ModelRenderer", "ModelBase", or just "model" (the first two names are what MCP calls the entity model base classes in 1.6.4, which may be different in your version, but "model" should always work). This also assumes it has been deobfuscated, as otherwise you'll have things like "class extends abc", though "class" should still be a proper name for a model class if the modder writes anything like good code since only vanilla class and method names are obfuscated when a mod is compiled (in rare cases modders may obfuscate their own code), ideally including the name of the entity the model is for, as shown on the first line in the example).
However, there don't seem to be converters that convert from Java code to other formats, only the other way around, and it is hard to understand what is going on in the code shown (best I can tell is that the three float values after "addBox" are relative positions in some unit of measurement and the three ints are the size in pixels, as they do match the texture itself. The values in ModelRenderer(x, y) seem to be pixel offsets in the texture sheet, where the head is at 0,0 and ears are at 24, 0).
TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.
TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.
Why do I still play in 1.6.4?
Okay thanks, I'll try this. Just to make sure, I can find the strings for "Model" in MCP? Is there a way to like search all the files without going through all of them, or do I actually have to manually go through each and see? As of before when I was searching for the model file, I couldn't find anything. But yeah, that's my question. If I can't find anything, maybe I could send you the mod and you could see if I missed anything?
Micaiah Hemphill
You can use Window's built-in search to search through files, though I use "Windows Grep", which offers more search options; IDEs may also have built-in search tools (I actually don't use one, even as TMCW is approaching 500 source files, which as shown here are all with the vanilla sources; I just use the date modified to easily separate them as I've used the same MCP installation for 7 years):
TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.
TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.
Why do I still play in 1.6.4?
Man, thanks so much, you've been a great help. I don't know if this works as of yet because I haven't tried it, but still, thanks. I'll tell if it doesn't work or even if it does.
Micaiah Hemphill
Ok, so to get back to it, I did indeed find something. The problem? It seems to be very outdated code. Like, I could upload it to Blockbench as a Java file, but no model appeared because it's all just groups, no actual blocks. I don't know if this is a problem that can be fixed or anything, but I just wanted to update on what happened. Do you think trying to edit it with Tabula 1.7.10 would work? (Since it's a model made for 1.7.10)
Micaiah Hemphill
I've never used any modeling programs but it would make sense that you need one for the version you are using; I know that significant changes were made to rendering in 1.8, affecting at least block and item models, though from looking online I found vanilla entity model files for 1.12 that are virtually identical to the ones in 1.6.4 (they could be copy-pasted to the other version with no issues) so it seems they haven't changed the format up to at least 1.12, and code posted on the Forge forums suggests it is still the same in newer versions (for all I know entity models have always been the same since Alpha or even Classic) so if I had to guess the modeling program isn't reading in the file correctly (I assume that it only wants the constructor that defines all the model parts, if it can even read .java model files).
TheMasterCaver's First World - possibly the most caved-out world in Minecraft history - includes world download.
TheMasterCaver's World - my own version of Minecraft largely based on my views of how the game should have evolved since 1.6.4.
Why do I still play in 1.6.4?