Oh nice addition of what the float values mean for the set angle rotation, the general naming of just f,f1, etc. for some of the variables in the entity/model seemed to confuse me a little on what they were used for.
Thanks it all compiled correctly however theres another problem. it doesent spawn ingame or even when i try to spawn it using singleplayercommands im sorry for all the issues but i plan on making many more mobs with different qualitys so im want to learn more about them also you should have a tutorial dedicated to special item/mob/block effects like right clicking will burn something like flint and steel its just a suggestion but i would really appreciate it thanks
I did a post right after the main mod file stuff on how to make a block you can click on to have it spawn a new mob.
Also, if you look at the EntityCow, you can see how they interact with the cow while you have an empty bucket to have something happen. You an just as easily check if the player has a torch in hand, and if so, activiate the burning on the mob being hit by it. I will go more into some of that once I get the time. Just testing some animation stuff.
You mean for scaling the texture map. Unfortunately, you can't scale down beyond 1 to 1 pixel, which is what we have to work with. Still trying to track down how to use larger texture maps, it would be the only thing to help.
All right. Just that I made this model, but everyone I showed told me the texture looked a bit low-res even for minecraft:
But if it's not fixable they'll just have to live with it. (BTW made this with your tutorial ^.^)
Hmmm so I made another mob class, and everything loads up fine, I got the legs and arms to move side by side in an alternating motion, the head still needs some work but the texture doesn't show up (which I do believe is an issue caused by making it in paint or something of that sort), and for some reason I can't get the blocks for the belly/backfat, and boils on the face to stay where they should be. They seem to be be moved to the wrong spots. I had to switch the numbers in the addBox function to match that of the data from the Techne program for my model, as saving the model to java didn't transition right.
And a question on the addBox function. addBox(a,b,c,d,e,f,g)
So the variables that are floats (a-c) are the position of that specific box, while variables that are ints (d-f) are the dimension values, and the last one (g) is a float that is also the scale of the model. Wondering how much of this is right assuming I am thinking about it correctly.
Are the float variables (a-c) set up in the format x,y,z?
Edit: The answer to PneumonicFungus, did you make sure to import java.util.Map; in that file?
Thought I should've done that, didn't say in the tutorial so I was just making sure.
Thanks.
Your Welcome, I just noticed after re-looking at the given vids and some of the tutorial code, that I do believe I may know why the boils and bellies on my boomer are all out of whack now. I do believe the rotation points need to be changed on them.
All right. Just that I made this model, but everyone I showed told me the texture looked a bit low-res even for minecraft:
But if it's not fixable they'll just have to live with it. (BTW made this with your tutorial ^.^)
Well, what I did when I made a smaller than normal mob, I made it full size, then I used the GL11 scale thing in the render java. This way if you want the head to be 3x3x3, you can still make it 8x8x8 (like the normal head size), then scale the whole thing down to a smaller size. The problems I have are trying to make it more detailed. To be able to do this I need a texturemap bigger than 64x32. In anycase, I'm glad I could help get you going.
incase anyone wanted to see the flying wing flapping in action. This is a basic test. I haven't even texture mapped the creature yet... Next I'm going to try for swaying tail action.
On another note, does anyone know how to get the entity's direction? is it the yaw? if so, then does anyone know the math to get that as an x,z co-ordinate down a line? I'm trying to get it to move more than just up when a force a flight... I guess I want to move it forward from where it currently is, but the moveForward var doesn't seem to do it...
Map cannot be resolved to a type | mod_Champite.java | /Client/src/net/minecraft/src | line 267
Mob code
public void ChampAddMobs()
{
ModLoader.RegisterEntityID(Champ_AfroPigEntity.class, "Afro Pig", ModLoader.getUniqueEntityId());
ModLoader.AddSpawn(Champ_AfroPigEntity.class, 100, EnumCreatureType.creature);
}
public void AddRenderer(Map map)
{
map.put(Champ_AfroPigEntity.class, new Champ_AfroPigRender(new Champ_AfroPigModel(), 0.5F));
}
Image to see the error exactly:
(btw, this is part 5 in the tutorial, post 6)
I see the problem, but how would I solve it?
Does you main mod file extend Basemod? the extension caries over varibales and classes from it's "parent". Often times, these type of "unknown class/variable" errors are because you are not connecting your code back to something for other references. Sorry for the late reply on this.
Thanks for an awesome tutorial.
So far, im making my model, but i have 1 big problem.
I can't export the texturemap. I've tried several times, and it just wont work. Its a blank image after export.
Ya, this happens (i state as much in the vid, it works 90% of the time). When it doesn't work, what I do is to laod a white 64x32 png file, then I enlarge the window for the texture in techne, do a screen capture, import it into photoshop, then I crop out the boarders, and rescaled it down to 64x32. Ya, complex and seems like a lot of work, but the alternate way is to remake you model... you are not alone...
hmmm.... not a clue. I had an issue where it would crash on me with the new block I created. My old one worked fine. Then I remembered I didn't register my new block properly in my main mod code constructor:
ModLoader.RegisterBlock(JWorld_SpawnSpot);
Maybe this is your issue? If you have made other blocks in the past, and still have them in your mod, try adding the onclick code to one of them, if that works, then you missed something in the block creation, just as I did.
Hmmm so I made another mob class, and everything loads up fine, I got the legs and arms to move side by side in an alternating motion, the head still needs some work but the texture doesn't show up (which I do believe is an issue caused by making it in paint or something of that sort), and for some reason I can't get the blocks for the belly/backfat, and boils on the face to stay where they should be. They seem to be be moved to the wrong spots. I had to switch the numbers in the addBox function to match that of the data from the Techne program for my model, as saving the model to java didn't transition right.
And a question on the addBox function. addBox(a,b,c,d,e,f,g)
So the variables that are floats (a-c) are the position of that specific box, while variables that are ints (d-f) are the dimension values, and the last one (g) is a float that is also the scale of the model. Wondering how much of this is right assuming I am thinking about it correctly.
Are the float variables (a-c) set up in the format x,y,z?
Edit: The answer to PneumonicFungus, did you make sure to import java.util.Map; in that file?
That and possibly forgetting to extend his main mod class from BaseMod which has that import (and possibly more that may cause other issues)
as to the addBox() method, int d,e,f are the width(x),height(y), and depth(z)dimensions repsectively. is g for scale? not sure, but I doubt it, as a scale of 0 means multiplying by 0 which gives 0.
the float a,b and c are to set the rotation point. Yes, I know there is a line for setRotationPoint, but for some reason that actually sets the position. Take this code:
this is a leg for my flying thing. By what I have said the x-width is 3. When I set rotation points, I always center them. that leaves 2 numbers for it's position: -1.5F and -5F. Well in Techne, I built this part, and I can tell you the position of the rotation point (or offset in Techne) is -1.5F, but logically you can see that.
Do a simple test. start techne with a blank slate. Make a box of 6,6,6, and set the offsets to be -3,-3,-3. The set the position to be 10,10,10. Export the java and open it up. You'll see what I mean.
I had to end up using McModeler with the texture offsets from Techne though, as the belly/backfat and the boils on my model would never be in the correct place (when using techne only), but when I redid my model in McModeler and put the generated code from it into my ModelMyMob file, (while also changing setpostition to set rotation point), everything got put into the correct spot this time. I also noticed, that mcp hates custom mob skins and custom sounds, so if you have modloader installed and audiomod installed when making a mob that goes along with mobloader, you may have to test out your mob on the actual game to see if it works or not. I had to put my mob files into the actual minecraft jar file, and everything was working fine, except my mob has a large than needed hit box that keeps it from being able to touch me sometimes.
i cant find 'EntityCow.java'. can you help me, inlanoche?
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.
I did a post right after the main mod file stuff on how to make a block you can click on to have it spawn a new mob.
Also, if you look at the EntityCow, you can see how they interact with the cow while you have an empty bucket to have something happen. You an just as easily check if the player has a torch in hand, and if so, activiate the burning on the mob being hit by it. I will go more into some of that once I get the time. Just testing some animation stuff.
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
All right. Just that I made this model, but everyone I showed told me the texture looked a bit low-res even for minecraft:
But if it's not fixable they'll just have to live with it. (BTW made this with your tutorial ^.^)
Mob code
Image to see the error exactly:
(btw, this is part 5 in the tutorial, post 6)
I see the problem, but how would I solve it?
And a question on the addBox function. addBox(a,b,c,d,e,f,g)
So the variables that are floats (a-c) are the position of that specific box, while variables that are ints (d-f) are the dimension values, and the last one (g) is a float that is also the scale of the model. Wondering how much of this is right assuming I am thinking about it correctly.
Are the float variables (a-c) set up in the format x,y,z?
Edit: The answer to PneumonicFungus, did you make sure to import java.util.Map; in that file?
Thanks.
Your Welcome, I just noticed after re-looking at the given vids and some of the tutorial code, that I do believe I may know why the boils and bellies on my boomer are all out of whack now. I do believe the rotation points need to be changed on them.
Spawner block code:
http://pastebin.com/yuzrJLBA
Mod file mob code:
http://pastebin.com/5pms2ktu
Error:
http://pastebin.com/xHc4416e
Please help?
Well, what I did when I made a smaller than normal mob, I made it full size, then I used the GL11 scale thing in the render java. This way if you want the head to be 3x3x3, you can still make it 8x8x8 (like the normal head size), then scale the whole thing down to a smaller size. The problems I have are trying to make it more detailed. To be able to do this I need a texturemap bigger than 64x32. In anycase, I'm glad I could help get you going.
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
On another note, does anyone know how to get the entity's direction? is it the yaw? if so, then does anyone know the math to get that as an x,z co-ordinate down a line? I'm trying to get it to move more than just up when a force a flight... I guess I want to move it forward from where it currently is, but the moveForward var doesn't seem to do it...
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
Does you main mod file extend Basemod? the extension caries over varibales and classes from it's "parent". Often times, these type of "unknown class/variable" errors are because you are not connecting your code back to something for other references. Sorry for the late reply on this.
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
Ya, this happens (i state as much in the vid, it works 90% of the time). When it doesn't work, what I do is to laod a white 64x32 png file, then I enlarge the window for the texture in techne, do a screen capture, import it into photoshop, then I crop out the boarders, and rescaled it down to 64x32. Ya, complex and seems like a lot of work, but the alternate way is to remake you model... you are not alone...
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
hmmm.... not a clue. I had an issue where it would crash on me with the new block I created. My old one worked fine. Then I remembered I didn't register my new block properly in my main mod code constructor:
Maybe this is your issue? If you have made other blocks in the past, and still have them in your mod, try adding the onclick code to one of them, if that works, then you missed something in the block creation, just as I did.
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
That and possibly forgetting to extend his main mod class from BaseMod which has that import (and possibly more that may cause other issues)
as to the addBox() method, int d,e,f are the width(x),height(y), and depth(z)dimensions repsectively. is g for scale? not sure, but I doubt it, as a scale of 0 means multiplying by 0 which gives 0.
the float a,b and c are to set the rotation point. Yes, I know there is a line for setRotationPoint, but for some reason that actually sets the position. Take this code:
this is a leg for my flying thing. By what I have said the x-width is 3. When I set rotation points, I always center them. that leaves 2 numbers for it's position: -1.5F and -5F. Well in Techne, I built this part, and I can tell you the position of the rotation point (or offset in Techne) is -1.5F, but logically you can see that.
Do a simple test. start techne with a blank slate. Make a box of 6,6,6, and set the offsets to be -3,-3,-3. The set the position to be 10,10,10. Export the java and open it up. You'll see what I mean.
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
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.
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE