For my first real mod i want to add a few mobs but i can't find out how to make them attack. I dont want a collision thing i want to be able to make it punch like the player does
You need to be pretty advanced in modding to change the AI of mobs. My only advice would be to wait until 1.2 MCP is out and look at how the iron golem does it. Don't directly copy its code though. Look at each individual part and learn what it does. Copying & pasting never gets you anywhere.
Hi people!I'm creating a mob,but a total of 19 errors are showing up,and I don't know what to do! Here's the error:
I have tried everything,and copied exactly what was in the tutorial(here's the bugged code):
package net.minecraft.src;
import java.util.Map;
public class mod_CustomNPC extends BaseMod
{
public void load()
{
[indent=30px]ModLoader.RegisterEntityID(EntitySteelguy.class, "SteelGuard", ModLoader.getUniqueEntityId()); [/indent]
[indent=30px]ModLoader.AddSpawn(EntitySteelguy.class, 15, 5, 7, EnumCreatureType.creature);[/indent]
}
public void AddRenderer(Map map)
{
[indent=30px]map.put(EntitySteelguy.class, new RenderSteelguy(new ModelSteelguy(), 0.5F));[/indent]
}
public String getVersion()
{
[indent=30px]return "1.1";[/indent]
}
}
That's my fault sorry. It would't let me paste the correctly indented code, so I used the forums indent button. That stuffed it all up. It's fixed now though.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Well,sorry,nevermind.I saw the error.But I must ask another question: How I animate and make the texture appears?My guy is appearing with a stranger white skin with a "g1" on the top of the head,and fon't has animation!Where I put him?
Have you got the same model code as me, and have you referenced the texture correctly in the EntityNamehere class?
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I don't know...I used the model's code I got from the techne model I built,and I don't know where's the mcp folder that I must put the texture.Do you know how to fix it?
Techne doesn't output animation. You have to add that in yourself. I'm not going to do a tutorial on animation but I might be able to help you depending on what type of shape your mob is.
For the texture, it just goes where you would put your item and block textures.
Without Eclipse
mcp/bin/minecraft
With Eclipse
mcp/eclipse/Client/bin
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
My mob is just a bigger biped model with the head a litte foward.Nothing more.I will can use the same animation that a biped model uses?
Yeh, you can use the same animation. Just get the whole setRotationAngles method from ModelBiped and put it in your model class. Don't delete the other setRotationAngles method
And what about creating a tutorial for creating a biome ? That would be great !
At the moment, I am only creating tutorials that edit no base classes. I believe that biomes do have to edit base classes, so once I figure out how to do it without editing base classes(if possible), then I'll make a tutorial.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I can't update them until 1.2 MCP is out. Just like most mods need to wait for it. The tutorials might not even need updating though.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Hey there! When will the ModelNameHere "Understanding the code" Come out? Same for render.
I'd like to make one manually. Since I can't make the mob's :S. Although I can make them manually. How would I make their skins? Is there a way to find out some how? I heard techne (some thing else I can't use) makes the layout skin for you, but if you do it manually it won't?Oh, and one more thing!
Can you add How to make Custom furnaces or.. GUI when clicked on Object? Also can you make a tutorial on how to do most thing's Industrial Craft add's? like the compresser and such?
Not like copy/paste the code from industrial, But teach us how to make similar stuff. (:
ModLoader.AddRecipe(new ItemStack(thisiswhatyouget, 4), new Object[] { " ", " C ", " B ", Character.valueOf ('B'), Item.bread, Character.valueOf ('C'), anotheritemname});
I changed some names cuz of some copyright reasons... that is a recipe that isnt released yet so i wont publish it yet for people who know the Pre-Prehistoric Mod and watching this topic
-IHVD
HeadCoder/Public Affairs
The Pre-Prehistoric Mod
Hey there! When will the ModelNameHere "Understanding the code" Come out? Same for render.
I'd like to make one manually. Since I can't make the mob's :S. Although I can make them manually. How would I make their skins? Is there a way to find out some how? I heard techne (some thing else I can't use) makes the layout skin for you, but if you do it manually it won't?
Oh, and one more thing!
Can you add How to make Custom furnaces or.. GUI when clicked on Object? Also can you make a tutorial on how to do most thing's Industrial Craft add's? like the compresser and such?
Not like copy/paste the code from industrial, But teach us how to make similar stuff. (:
thanks
I'm going to use a simpler model for the Model tutorial, that's why I haven't done it yet. I don't know how to make a texture map from coding a model from scratch. I've never been able to figure it out. There is this program I know called Wine, and it allows you to run windows applications on Mac and Linux. Do you think it would work for Techne? The only reason I dont think it would work is because Techne requires .NET Framework.
Stuff in IndustrialCraft is quite advanced, even more advanced to make a tutorial on it. I did have this on my list at one stage, but I would like to get everything else on the list done first.
I think i know what saturationLevel does. It is basically an amount that prevents you from being hungry for a bit of time.
Yes, that is what it does.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I'm going to use a simpler model for the Model tutorial, that's why I haven't done it yet. I don't know how to make a texture map from coding a model from scratch. I've never been able to figure it out. There is this program I know called Wine, and it allows you to run windows applications on Mac and Linux. Do you think it would work for Techne? The only reason I dont think it would work is because Techne requires .NET Framework.
Stuff in IndustrialCraft is quite advanced, even more advanced to make a tutorial on it. I did have this on my list at one stage, but I would like to get everything else on the list done first.
Nope, Unfortunatly it won't ):.
Not even cross over games.
and Yes your rite, It's because It needs .NET Framework. ):
As for the skins.. if I ever do make one, can you get the texture for me? Using techne?
Oh and, I want three diffrent thing's in my recipe, how?
Like, Remove the ^^^? I need that :S
Oh and, What's wrong with this one, since i tried to take it off, and replace with some thing else :S
Sorry, I didn't see the character.valueOf part for that symbol. Make sure you have got your recipes in the load() method and if your items are created in the same class(which they should be), then try removing the mod_*** bit before them. If they are in different classes, which I believe they are, then merge them all into one mod_ class.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Sorry, I didn't see the character.valueOf part for that symbol. Make sure you have got your recipes in the load() method and if your items are created in the same class(which they should be), then try removing the mod_*** bit before them. If they are in different classes, which I believe they are, then merge them all into one mod_ class.
Alright, so I did that and it didn't work. I mean the crop drop thing wouldnt work ): ..
So I change:
public int idDropped(int i, Random random, int j)
{
if(i == 7)
{
return mod_BTMCrops.Tomato.shiftedIndex;
} else
{
return -1;
}
To:
public int idDropped(int i, Random random, int j)
{
if(i == 7)
{
return mod_Foods.Tomato.shiftedIndex;
} else
{
return -1;
}
I have tried everything,and copied exactly what was in the tutorial(here's the bugged code):
You need to be pretty advanced in modding to change the AI of mobs. My only advice would be to wait until 1.2 MCP is out and look at how the iron golem does it. Don't directly copy its code though. Look at each individual part and learn what it does. Copying & pasting never gets you anywhere.
That's my fault sorry. It would't let me paste the correctly indented code, so I used the forums indent button. That stuffed it all up. It's fixed now though.
I'm going to make a potion tutorial soon. Once I've finished crop and ore gen.
together they are powerful beyond imagination."
together they are powerful beyond imagination."
For the texture, it just goes where you would put your item and block textures.
Without Eclipse
mcp/bin/minecraft
With Eclipse
mcp/eclipse/Client/bin
together they are powerful beyond imagination."
Yeh, you can use the same animation. Just get the whole setRotationAngles method from ModelBiped and put it in your model class. Don't delete the other setRotationAngles method
At the moment, I am only creating tutorials that edit no base classes. I believe that biomes do have to edit base classes, so once I figure out how to do it without editing base classes(if possible), then I'll make a tutorial.
together they are powerful beyond imagination."
together they are powerful beyond imagination."
I'd like to make one manually. Since I can't make the mob's :S. Although I can make them manually. How would I make their skins? Is there a way to find out some how? I heard techne (some thing else I can't use) makes the layout skin for you, but if you do it manually it won't?Oh, and one more thing!
Can you add How to make Custom furnaces or.. GUI when clicked on Object? Also can you make a tutorial on how to do most thing's Industrial Craft add's? like the compresser and such?
Not like copy/paste the code from industrial, But teach us how to make similar stuff. (:
thanks
That is what I am hoping for, or if they do just slightly.
This recipe won't work for some reason?
Please help me :D. thank's!
I guess those character.value's are all Items?
This is my recipe with items:
I changed some names cuz of some copyright reasons... that is a recipe that isnt released yet so i wont publish it yet for people who know the Pre-Prehistoric Mod and watching this topic
-IHVD
HeadCoder/Public Affairs
The Pre-Prehistoric Mod
http://www.minecraftsao.org/
Check it out!
Remove the "^^^" and it should work.
I'm going to use a simpler model for the Model tutorial, that's why I haven't done it yet. I don't know how to make a texture map from coding a model from scratch. I've never been able to figure it out. There is this program I know called Wine, and it allows you to run windows applications on Mac and Linux. Do you think it would work for Techne? The only reason I dont think it would work is because Techne requires .NET Framework.
Stuff in IndustrialCraft is quite advanced, even more advanced to make a tutorial on it. I did have this on my list at one stage, but I would like to get everything else on the list done first.
Yes, that is what it does.
together they are powerful beyond imagination."
Nope, Unfortunatly it won't ):.
Not even cross over games.
and Yes your rite, It's because It needs .NET Framework. ):
As for the skins.. if I ever do make one, can you get the texture for me? Using techne?
Oh and, I want three diffrent thing's in my recipe, how?
Like, Remove the ^^^? I need that :S
Oh and, What's wrong with this one, since i tried to take it off, and replace with some thing else :S
Thanks
together they are powerful beyond imagination."
Alright, so I did that and it didn't work. I mean the crop drop thing wouldnt work ): ..
So I change:
To:
And it didn't work ):<.
Please help me
Thank's! I was doing it wrong, up until you tought me how to fix it