Help, i've made a mob similiar to a cow but its bigger in size and has no horns/ has a new texture that i made. However when i find it ingame its animations are weird and .. the mob itself looks weird. Well actually it moves like a cow but some part of it doesn't move etc.
All i did was to remove the horns and increase the GIScale in Techne from 1,0 respectively to 1,2 - 1,0 - 1,3 so that its a bigger version of a cow.
Regular cow:
My edit:
Here are the codes of it:
Note: The mob is called "Sigir"(something in my native language).
Also i didn't put my mod code because it is done correctly and the mob can be seen ingame but like i said its... weird. :smile.gif:
ModelSigir
package net.minecraft.src;
//Exported java file
//Keep in mind that you still need to fill in some blanks
// - ZeuX
public class ModelSigir extends ModelQuadruped
{
public ModelSigir ()
{
super(15, 1F);
head = new ModelRenderer(0, 0);
head.addBox(-4F, -4F, -6F, 8, 8, 6, 0F);
head.setRotationPoint(0F, 4F, -8F);
head.rotateAngleX = 0F;
head.rotateAngleY = 0F;
head.rotateAngleZ = 0F;
head.mirror = false;
body = new ModelRenderer(18, 4);
body.addBox(-6F, -10F, -7F, 12, 18, 10, 0F);
body.setRotationPoint(0F, 5F, 2F);
body.rotateAngleX = 1.570796F;
body.rotateAngleY = 0F;
body.rotateAngleZ = 0F;
body.mirror = false;
leg1 = new ModelRenderer(0, 16);
leg1.addBox(-3F, 0F, -2F, 4, 12, 4, 0F);
leg1.setRotationPoint(-3F, 12F, 7F);
leg1.rotateAngleX = 0F;
leg1.rotateAngleY = 0F;
leg1.rotateAngleZ = 0F;
leg1.mirror = false;
leg2 = new ModelRenderer(0, 16);
leg2.addBox(-1F, 0F, -2F, 4, 12, 4, 0F);
leg2.setRotationPoint(3F, 12F, 7F);
leg2.rotateAngleX = 0F;
leg2.rotateAngleY = 0F;
leg2.rotateAngleZ = 0F;
leg2.mirror = false;
leg3 = new ModelRenderer(0, 16);
leg3.addBox(-3F, 0F, -3F, 4, 12, 4, 0F);
leg3.setRotationPoint(-3F, 12F, -5F);
leg3.rotateAngleX = 0F;
leg3.rotateAngleY = 0F;
leg3.rotateAngleZ = 0F;
leg3.mirror = false;
leg4 = new ModelRenderer(0, 16);
leg4.addBox(-1F, 0F, -3F, 4, 12, 4, 0F);
leg4.setRotationPoint(3F, 12F, -5F);
leg4.rotateAngleX = 0F;
leg4.rotateAngleY = 0F;
leg4.rotateAngleZ = 0F;
leg4.mirror = false;
udders = new ModelRenderer(52, 0);
udders.addBox(-2F, -3F, 0F, 4, 6, 2, 0F);
udders.setRotationPoint(0F, 14F, 6F);
udders.rotateAngleX = 1.570796F;
udders.rotateAngleY = 0F;
udders.rotateAngleZ = 0F;
udders.mirror = false;
}
public void render(float f, float f1, float f2, float f3, float f4, float f5)
{
super.render(f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5);
head.render(f5);
body.render(f5);
leg1.render(f5);
leg2.render(f5);
leg3.render(f5);
leg4.render(f5);
udders.render(f5);
}
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5)
{
super.setRotationAngles(f, f1, f2, f3, f4, f5);
}
//fields
public ModelRenderer head;
public ModelRenderer body;
public ModelRenderer leg1;
public ModelRenderer leg2;
public ModelRenderer leg3;
public ModelRenderer leg4;
public ModelRenderer udders;
}
package net.minecraft.src;
public class EntitySigir extends EntityAnimal
{
public EntitySigir(World world)
{
super(world);
texture = "/Kafes/sigir.png";
setSize(0.9F,1.3F);
moveSpeed = 0.75F;
//yOffset *= 6F;
health = 25;
}
public void writeEntityToNBT(NBTTagCompound nbttagcompound)
{
super.writeEntityToNBT(nbttagcompound);
}
public void readEntityFromNBT(NBTTagCompound nbttagcompound)
{
super.readEntityFromNBT(nbttagcompound);
}
protected String getLivingSound()
{
return "mob.cow";
}
protected String getHurtSound()
{
return "mob.cow";
}
protected String getDeathSound()
{
return "mob.cow";
}
protected float getSoundVolume()
{
return 0.4F;
}
protected int getDropItemId()
{
return 0;
}
public boolean interact(EntityPlayer entityplayer)
{
//sonra sag tik ile kullanmak için...
//Modustasi
return false;
}
}
Thank you in advance! Its a great tutorial by the way.
Edit: Btw i want to make it so that when i kill this mob it will have a chance to drop leather like cows but also in addition it will have a chance to drop an item that i made , how could i do so?
Edit2: When the model extends ModelBase it works but it doesn't have animations like cows... i don't know what to do.
Oh man, have I been away from this topic. I've been fiddling about some minor coding and such. Anywhom, I am curious to know if anyone has successfully added sounds to their mobs via the Audiomod? This is the last thing holding me back from making billions of mobs, haha... well, that and testing other stuff...
ok now i will look at some other tutorials for mods to learn more and then try again :-)
Thanks for not being offended by my sometimes harsh words. All are welcome, just have some knowledge under you belt, and I'll be happy to help with what I have learned.
Help, i've made a mob similiar to a cow but its bigger in size and has no horns/ has a new texture that i made. However when i find it ingame its animations are weird and .. the mob itself looks weird. Well actually it moves like a cow but some part of it doesn't move etc.
All i did was to remove the horns and increase the GIScale in Techne from 1,0 respectively to 1,2 - 1,0 - 1,3 so that its a bigger version of a cow.
Regular cow:
My edit:
Here are the codes of it:
Note: The mob is called "Sigir"(something in my native language).
Also i didn't put my mod code because it is done correctly and the mob can be seen ingame but like i said its... weird. :smile.gif:
ModelSigir
package net.minecraft.src;
//Exported java file
//Keep in mind that you still need to fill in some blanks
// - ZeuX
public class ModelSigir extends ModelQuadruped
{
public ModelSigir ()
{
super(15, 1F);
head = new ModelRenderer(0, 0);
head.addBox(-4F, -4F, -6F, 8, 8, 6, 0F);
head.setRotationPoint(0F, 4F, -8F);
head.rotateAngleX = 0F;
head.rotateAngleY = 0F;
head.rotateAngleZ = 0F;
head.mirror = false;
body = new ModelRenderer(18, 4);
body.addBox(-6F, -10F, -7F, 12, 18, 10, 0F);
body.setRotationPoint(0F, 5F, 2F);
body.rotateAngleX = 1.570796F;
body.rotateAngleY = 0F;
body.rotateAngleZ = 0F;
body.mirror = false;
leg1 = new ModelRenderer(0, 16);
leg1.addBox(-3F, 0F, -2F, 4, 12, 4, 0F);
leg1.setRotationPoint(-3F, 12F, 7F);
leg1.rotateAngleX = 0F;
leg1.rotateAngleY = 0F;
leg1.rotateAngleZ = 0F;
leg1.mirror = false;
leg2 = new ModelRenderer(0, 16);
leg2.addBox(-1F, 0F, -2F, 4, 12, 4, 0F);
leg2.setRotationPoint(3F, 12F, 7F);
leg2.rotateAngleX = 0F;
leg2.rotateAngleY = 0F;
leg2.rotateAngleZ = 0F;
leg2.mirror = false;
leg3 = new ModelRenderer(0, 16);
leg3.addBox(-3F, 0F, -3F, 4, 12, 4, 0F);
leg3.setRotationPoint(-3F, 12F, -5F);
leg3.rotateAngleX = 0F;
leg3.rotateAngleY = 0F;
leg3.rotateAngleZ = 0F;
leg3.mirror = false;
leg4 = new ModelRenderer(0, 16);
leg4.addBox(-1F, 0F, -3F, 4, 12, 4, 0F);
leg4.setRotationPoint(3F, 12F, -5F);
leg4.rotateAngleX = 0F;
leg4.rotateAngleY = 0F;
leg4.rotateAngleZ = 0F;
leg4.mirror = false;
udders = new ModelRenderer(52, 0);
udders.addBox(-2F, -3F, 0F, 4, 6, 2, 0F);
udders.setRotationPoint(0F, 14F, 6F);
udders.rotateAngleX = 1.570796F;
udders.rotateAngleY = 0F;
udders.rotateAngleZ = 0F;
udders.mirror = false;
}
public void render(float f, float f1, float f2, float f3, float f4, float f5)
{
super.render(f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5);
head.render(f5);
body.render(f5);
leg1.render(f5);
leg2.render(f5);
leg3.render(f5);
leg4.render(f5);
udders.render(f5);
}
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5)
{
super.setRotationAngles(f, f1, f2, f3, f4, f5);
}
//fields
public ModelRenderer head;
public ModelRenderer body;
public ModelRenderer leg1;
public ModelRenderer leg2;
public ModelRenderer leg3;
public ModelRenderer leg4;
public ModelRenderer udders;
}
package net.minecraft.src;
public class EntitySigir extends EntityAnimal
{
public EntitySigir(World world)
{
super(world);
texture = "/Kafes/sigir.png";
setSize(0.9F,1.3F);
moveSpeed = 0.75F;
//yOffset *= 6F;
health = 25;
}
public void writeEntityToNBT(NBTTagCompound nbttagcompound)
{
super.writeEntityToNBT(nbttagcompound);
}
public void readEntityFromNBT(NBTTagCompound nbttagcompound)
{
super.readEntityFromNBT(nbttagcompound);
}
protected String getLivingSound()
{
return "mob.cow";
}
protected String getHurtSound()
{
return "mob.cow";
}
protected String getDeathSound()
{
return "mob.cow";
}
protected float getSoundVolume()
{
return 0.4F;
}
protected int getDropItemId()
{
return 0;
}
public boolean interact(EntityPlayer entityplayer)
{
//sonra sag tik ile kullanmak için...
//Modustasi
return false;
}
}
Thank you in advance! Its a great tutorial by the way.
Edit: Btw i want to make it so that when i kill this mob it will have a chance to drop leather like cows but also in addition it will have a chance to drop an item that i made , how could i do so?
Edit2: When the model extends ModelBase it works but it doesn't have animations like cows... i don't know what to do.
Take a look at the rotation points in Techne, something seems off. leg1 and 2 should be similar, same with 3 and 4 (with a neg shift on the x). Look at it in techne by rotating the legs. You'll probably see the issue.
With the dropping different items, you can make generate a random number between 1 and 100. If it is 1 to 75, make it return leather, if it's between 76 and 100, make it return your item.
Oh man, have I been away from this topic. I've been fiddling about some minor coding and such. Anywhom, I am curious to know if anyone has successfully added sounds to their mobs via the Audiomod? This is the last thing holding me back from making billions of mobs, haha... well, that and testing other stuff...
I haven't tried it yet. I'm sure there is a tutorial on getting it set up out there... I'm sure I glanced at it when I first started with minecraft, though I don't really remember. Ya, need some new audio as well...
I haven't tried it yet. I'm sure there is a tutorial on getting it set up out there... I'm sure I glanced at it when I first started with minecraft, though I don't really remember. Ya, need some new audio as well...
Does anyone know what the setSize float values in the Entity class mean? I want to know if I can use them to prevent my FlapZard from putting its head through trees. :tongue.gif:
Also, what is the line I need to check what block is underneath the mob? I don't want to give too much away and I don't want anyone to write a lot of code for me so I won't tell you why I need it.
Does anyone know what the setSize float values in the Entity class mean? I want to know if I can use them to prevent my FlapZard from putting its head through trees. :tongue.gif:
Also, what is the line I need to check what block is underneath the mob? I don't want to give too much away and I don't want anyone to write a lot of code for me so I won't tell you why I need it.
The first is given if you read the tutorials. It's also stated several times through this thread.
As to the second option, you could just do a check for the object -1y from your position. If it is a block, then do a check for it's type (I don't know enough about java to know this, but I've done it in flash, which is similar).
You do know that the block can tell when an entity steps on it right(for sound among other things)? maybe you might want to approach this from the other side of things.
Where they not clear, out dated or just plain didn't work? I'm focused on one my super class still, need to finish it up, then another project, then I'll check on this.
great tutorials!!! but how would i make it so that when i right click a item it spawns my mob? i tried you blocks code went into the game right clicked the item and crash!! thanks
Thanks for the answer. By the way in eclipse i can't use the debug client option(because it can't find the images required for the mod) is that normal?
Edit: Anyways i can't fix this mob, its like theres 2 mobs inside it. 1 stands still while 1 is animated but has his face off or something. I guess i'll just retexture the original cow or something :sad.gif:
Can it be that i've done something wrong in render, entity or the mod file because i've been trying a lot of things in techne and model file but can't fix this. Theres still 2 cows in each other.
Thanks for the answer. By the way in eclipse i can't use the debug client option(because it can't find the images required for the mod) is that normal?
Edit: Anyways i can't fix this mob, its like theres 2 mobs inside it. 1 stands still while 1 is animated but has his face off or something. I guess i'll just retexture the original cow or something :sad.gif:
Can it be that i've done something wrong in render, entity or the mod file because i've been trying a lot of things in techne and model file but can't fix this. Theres still 2 cows in each other.
Could be that you are rendering it twice. I can see what you mean from the pics now. Could be that you are (in the model file) calling super.Render but still calling to render the same default parts (head, legs, body).
great tutorials!!! but how would i make it so that when i right click a item it spawns my mob? i tried you blocks code went into the game right clicked the item and crash!! thanks
You might be missing something in your block code. What is the error when it crashes?
Im surprised to not see a bunch of new mob mods, tutorial is normal difficulty with a little help (Im a NEW MODDER) :tongue.gif:
Using eclispe...havent replied to anything yesterday...its been fixing a few errors for me when im stuck (Nothing on your part Inlanoche, i messed up some stuff that i didnt realize xD)
Rollback Post to RevisionRollBack
Famous Nyan seed has caves now along with 3 other special maps for MCPE! Check here for downloads: http://tinyurl.com/c75ax6y
Where they not clear, out dated or just plain didn't work? I'm focused on one my super class still, need to finish it up, then another project, then I'll check on this.
Just plain doesn't work. I've set the sound files in the right folders, checked the coding and it all redirects to the sound, but when played in-game... those sounds are not played
All i did was to remove the horns and increase the GIScale in Techne from 1,0 respectively to 1,2 - 1,0 - 1,3 so that its a bigger version of a cow.
Regular cow:
My edit:
Here are the codes of it:
Note: The mob is called "Sigir"(something in my native language).
Also i didn't put my mod code because it is done correctly and the mob can be seen ingame but like i said its... weird. :smile.gif:
ModelSigir
RenderSigir
EntitySigir
Thank you in advance! Its a great tutorial by the way.
Edit: Btw i want to make it so that when i kill this mob it will have a chance to drop leather like cows but also in addition it will have a chance to drop an item that i made , how could i do so?
Edit2: When the model extends ModelBase it works but it doesn't have animations like cows... i don't know what to do.
Come on, bro, I got CREEPER BLOOD! (winning!)
You see how that works? How about actually helping out?
Thanks for not being offended by my sometimes harsh words. All are welcome, just have some knowledge under you belt, and I'll be happy to help with what I have learned.
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
Take a look at the rotation points in Techne, something seems off. leg1 and 2 should be similar, same with 3 and 4 (with a neg shift on the x). Look at it in techne by rotating the legs. You'll probably see the issue.
With the dropping different items, you can make generate a random number between 1 and 100. If it is 1 to 75, make it return leather, if it's between 76 and 100, make it return your item.
The ModelBase has no animations set in it.
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
I haven't tried it yet. I'm sure there is a tutorial on getting it set up out there... I'm sure I glanced at it when I first started with minecraft, though I don't really remember. Ya, need some new audio as well...
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
Yeah, I've already been through all of them
Also, what is the line I need to check what block is underneath the mob? I don't want to give too much away and I don't want anyone to write a lot of code for me so I won't tell you why I need it.
Come on, bro, I got CREEPER BLOOD! (winning!)
Neither of those two options sounds absurd. And I WAS helping; I just don't know how so I gave you a useful tip.
Come on, bro, I got CREEPER BLOOD! (winning!)
The first is given if you read the tutorials. It's also stated several times through this thread.
As to the second option, you could just do a check for the object -1y from your position. If it is a block, then do a check for it's type (I don't know enough about java to know this, but I've done it in flash, which is similar).
You do know that the block can tell when an entity steps on it right(for sound among other things)? maybe you might want to approach this from the other side of things.
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
Where they not clear, out dated or just plain didn't work? I'm focused on one my super class still, need to finish it up, then another project, then I'll check on this.
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
Edit: Anyways i can't fix this mob, its like theres 2 mobs inside it. 1 stands still while 1 is animated but has his face off or something. I guess i'll just retexture the original cow or something :sad.gif:
Can it be that i've done something wrong in render, entity or the mod file because i've been trying a lot of things in techne and model file but can't fix this. Theres still 2 cows in each other.
Could be that you are rendering it twice. I can see what you mean from the pics now. Could be that you are (in the model file) calling super.Render but still calling to render the same default parts (head, legs, body).
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
You might be missing something in your block code. What is the error when it crashes?
OLD 1.7: http://www.minecraftforum.net/topic/529327-modloader173-adding-custom-mobs-and-more/ ---inLanoche says : USE ECLIPSE
Using eclispe...havent replied to anything yesterday...its been fixing a few errors for me when im stuck (Nothing on your part Inlanoche, i messed up some stuff that i didnt realize xD)
its a item i am right clicking(not sure if block stuff also works for this)
Just plain doesn't work. I've set the sound files in the right folders, checked the coding and it all redirects to the sound, but when played in-game... those sounds are not played
in the beginning and later on i have
could that be the problem?
I mean, when i make the model code extend ModelBase instead of ModelQuadruped the model seems to be fine and not double.