Not something all that big, but it can lead to animated textures if you wanted, or changing clothes, etc. Just don't go overboard with too many textures. Here's how it looks:
Just add this to your entity java file (with your own texture names!):
are you using Eclipse? it should be with all the other entity files (and all the java files for that matter). This is not a beginner's tutorial, this is for the intermediate to advanced modder. If you don't know how to set up modloader and eclipse, there are plenty of tutorials on that. Look at them first. For me, my java files are in MCP\src\minecraft\net\minecraft\src.
New is not bad. We all start there. Just make sure you've gone through the setups for modloader and eclipse, and understand where all the files should be or should go. With my last post, I have found that you don't need to keep your mob png files in the mob folder, which I though was the case before. Really what happened was that I forgot to put the png file in size the minecraft.jar file. The thing to remember is that when things seem to be not working, step back and forget all the steps you did and start over. Don't assume you did any step right, make sure.
I also had the same issue with my spawner block, and I started it over and found what I forgot. Lastly, comments. Put comments in your code for the new stuff you do. It will help you remember later down the road, and it helps inforce what you are actually doing.
Inlanoche, are you forgetting something? I copied your GUI tutorial and code to the letter (exept changing a few names) and it keeps telling me it can't find the basic functions. ( cannot find: Minecraft,ArrayList) did you use import to bring files that DO know what this is into the equation or something?
EDIT: copied the imports from the gui code you posted and it fixed most of the issues exept mod_modnamehere still doesn't know what ArrayList is.
Inlanoche, are you forgetting something? I copied your GUI tutorial and code to the letter (exept changing a few names) and it keeps telling me it can't find the basic functions. ( cannot find: Minecraft,ArrayList) did you use import to bring files that DO know what this is into the equation or something?
EDIT: copied the imports from the gui code you posted and it fixed most of the issues exept mod_modnamehere still doesn't know what ArrayList is.
Hmmm... I might have added some other imports while messing with other stuff. here is the list of imports in my mod_JWorld.java file:
import java.util.Iterator;
import java.util.Map;
import java.util.Random;
You need to post what the errors are. But just of the hat, in your Model file, you do not define hand1 and hand2. Look at my anibus code. at the bottom (after //fields) I define the new parts, as they are not define by the base ModelQuadruped class.
The textures for the mob can be in a folder outside of the actual mob folder, really you could just have one folder in the jar file that holds all your textures and the like, If you are using mcp, make sure you put all texture files mob or item in the bin/minecraft/ section of the mcp folder, as otherwise the textures won't be used.
Hmmm... I might have added some other imports while messing with other stuff. here is the list of imports in my mod_JWorld.java file:
import java.util.Iterator;
import java.util.Map;
import java.util.Random;
I figured out using "import java.util.ArrayList;" but would "import java.util.*;" be a more generic import? As in instead of just using specific functions or classes it uses all of them in the file?
Usually the import java.util.*; should import all from the util class, but...
I never got this from flash either, but they always seem to only import the exact classes. I guess it saves on compiling or processing? Is it really that much? I'm not the best optimizer, but then again, I've not built huge code before...
Good Work on these Tutorials. But I think you forgot to explain how to input the names used in the flying monkeys.. You mention in render vars that you store the names in the Entity.
Good Work on these Tutorials. But I think you forgot to explain how to input the names used in the flying monkeys.. You mention in render vars that you store the names in the Entity.
Self palm....
ya, I did. Putting the code with that thread now.
[edit]
Actually, the code is in the Entity Java thread. It's one of the methods that is explained.
package net.minecraft.src;
//Exported java file
//Keep in mind that you still need to fill in some blanks
// - ZeuX
...
//fields
public ModelRendererTurbo szyja1;
public ModelRendererTurbo Garb;
public ModelRendererTurbo Szyja2;
public ModelRendererTurbo Ucho;
public ModelRendererTurbo ucho2;
public ModelRendererTurbo ogon;
}
All except the body, head, leg1, leg2... is red underlined (error)
How i can repair this? Help
Where did you get the class ModelRendererTurbo? The class is called ModelRenderer. If you are sub classing it, then you are on your own.
Next tutorial will be on making an interactive HUD (overlay). Again, understand that I am making tutorials based on my current needs. I am willing to share with all of you though. In this case I am attempting to add a new stat bar (hunger). I have a few ways I am trying to make this work, but I will place the most modular way.
Next tutorial will be on making an interactive HUD (overlay). Again, understand that I am making tutorials based on my current needs. I am willing to share with all of you though. In this case I am attempting to add a new stat bar (hunger). I have a few ways I am trying to make this work, but I will place the most modular way.
<will edit this post with the code when done>
When Your Done With That, Can You Teach Us How To Make A SpawnRates.Properties File?
When Your Done With That, Can You Teach Us How To Make A SpawnRates.Properties File?
I have something else that will be featured next. Haven't even looked at SpawnRates yet. Come to think of it, I will need spawn rates in my mod, so that will be added to the list.
i'm changed value for example "5.664666" to "5" and i try remove
ogon = new ModelRenderer(19, 20, 64, 32);
AND
ogon.setPosition(0, 0, 0);
Becouse for example body don't have this. Then this doesn't work too.
Please help :smile.gif:
Ya, missed that too. Some of the values need to be int, but sometimes they are exported as floats.
What exactly doesn't work? What is the error that you are getting? Or does it not look like what you want it to look like?
If, for example, the body seems to be rotated differently than what you wanted, it's becuase the line:
super.setRotationAngles(f, f1, f2, f3, f4, f5);
If you look at the ModelQuadruped, this method sets the rotation on the default parts. If you change the rotation for any of the parts, then you need to set it after this call. See my tutorial, this is explained.
Sorry, one last thing, you do need new ModelRenderer(int x, int y) for all new model pieces, as well as for the existing ones that have different texture mapping co-ordinates. that is what the x, y is defining. Only 2 arguments though, not 4. Please look closer at my examples on the first page of this thread.
sorry, in the thread about the Render vars and methods. here's a quote:
renderLivingLabel : This can be called to place the name over your mob. Of course you will have to create your own name var. What I did was to create a list in my entity java file, then have it select one in the constructor. It can be placed right below the first call to super.doRenderLiving(entity, d, d1, d2, f, f1); like so:
Just add this to your entity java file (with your own texture names!):
You can also use this to change the texture when you click on the mob, or activate it (as I do in the vid to change him blue)
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
yep, im friggin new i mean im a tree puncher!
New is not bad. We all start there. Just make sure you've gone through the setups for modloader and eclipse, and understand where all the files should be or should go. With my last post, I have found that you don't need to keep your mob png files in the mob folder, which I though was the case before. Really what happened was that I forgot to put the png file in size the minecraft.jar file. The thing to remember is that when things seem to be not working, step back and forget all the steps you did and start over. Don't assume you did any step right, make sure.
I also had the same issue with my spawner block, and I started it over and found what I forgot. Lastly, comments. Put comments in your code for the new stuff you do. It will help you remember later down the road, and it helps inforce what you are actually doing.
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
^ this might be the problem. Don't use ' or spaces in the file name. Try renaming it + functions that call it to mod_PokecathsMobs.
EDIT: copied the imports from the gui code you posted and it fixed most of the issues exept mod_modnamehere still doesn't know what ArrayList is.
Hmmm... I might have added some other imports while messing with other stuff. here is the list of imports in my mod_JWorld.java file:
import java.util.Iterator;
import java.util.Map;
import java.util.Random;
import java.awt.List;
import java.lang.reflect.Constructor;
import java.util.*;
might be that last one... :smile.gif:
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
You need to post what the errors are. But just of the hat, in your Model file, you do not define hand1 and hand2. Look at my anibus code. at the bottom (after //fields) I define the new parts, as they are not define by the base ModelQuadruped class.
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
I figured out using "import java.util.ArrayList;" but would "import java.util.*;" be a more generic import? As in instead of just using specific functions or classes it uses all of them in the file?
I never got this from flash either, but they always seem to only import the exact classes. I guess it saves on compiling or processing? Is it really that much? I'm not the best optimizer, but then again, I've not built huge code before...
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
Self palm....
ya, I did. Putting the code with that thread now.
[edit]
Actually, the code is in the Entity Java thread. It's one of the methods that is explained.
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
This should be talked about in every block tutorial. It's the only way you can access your new block:
mod_JWorld.JBlock.blockID;
Where did you get the class ModelRendererTurbo? The class is called ModelRenderer. If you are sub classing it, then you are on your own.
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
<will edit this post with the code when done>
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
When Your Done With That, Can You Teach Us How To Make A SpawnRates.Properties File?
I have something else that will be featured next. Haven't even looked at SpawnRates yet. Come to think of it, I will need spawn rates in my mod, so that will be added to the list.
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
Ya, missed that too. Some of the values need to be int, but sometimes they are exported as floats.
What exactly doesn't work? What is the error that you are getting? Or does it not look like what you want it to look like?
If, for example, the body seems to be rotated differently than what you wanted, it's becuase the line:
super.setRotationAngles(f, f1, f2, f3, f4, f5);
If you look at the ModelQuadruped, this method sets the rotation on the default parts. If you change the rotation for any of the parts, then you need to set it after this call. See my tutorial, this is explained.
Sorry, one last thing, you do need new ModelRenderer(int x, int y) for all new model pieces, as well as for the existing ones that have different texture mapping co-ordinates. that is what the x, y is defining. Only 2 arguments though, not 4. Please look closer at my examples on the first page of this thread.
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
Where I don't see it.
double self face palm with a half twist dismount.
sorry, in the thread about the Render vars and methods. here's a quote:
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE