Ok so i looked up a tutorial on how to add a mob, i added a mob and it works correctly. The only thing is that i want to know how to use the AI the tutorial i looked at wasnt very clear on what to do. I just want very clear directions on how to make it work. Pleeeeeease!!!
Adding existing AI packages, or writing your own AI packages?
Adding existing pacckages; Agadar is exactly right. If you can't be bothered to look through the source code and make an effort, you don't actually deserve help.
If, on the other hand, you are trying to make a new AI package, then I can understand how you can get stuck, as the AI process can be a little convoluted especially to someone who isn't used to coding in Forge or Java (or in general). If it's the latter, I wouldn't mind writing up some brief rundown of how the AI packages themselves work.
Rollback Post to RevisionRollBack
I believe in the Invisible Pink Unicorn, bless her Invisible Pinkness.
Here is the code for the entity
package steeltoefish.tutorialmod.common.entity;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
import net.minecraft.entity.ai.EntityAIHurtByTarget;
import net.minecraft.entity.ai.EntityAILookIdle;
import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
import net.minecraft.entity.ai.EntityAISwimming;
import net.minecraft.entity.ai.EntityAIWander;
import net.minecraft.entity.ai.EntityAIWatchClosest;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
public class Steve extends EntityMob{
public Steve(World par1World) {
super(par1World);
}
@Override
protected void applyEntityAttributes()
{
super.applyEntityAttributes();
this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(20.0D);
this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(10.0D);
this.getEntityAttribute(SharedMonsterAttributes.knockbackResistance).setBaseValue(0.2D);
this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.5D);
this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(2.0D);
}
public boolean isAIEnabled()
{
return true;
}
}
Also can anyone tell me how to make it spawn naturally?
My mods: Archmagus, BetterBoneMeal, BetterVanilla, Brewing-API, NaturalArmors, and PluckableChickens!
The AI for vanilla mobs are relatively simple. Just look through some of the code. Their AI tasks are defined in their constructors.
My mods: Archmagus, BetterBoneMeal, BetterVanilla, Brewing-API, NaturalArmors, and PluckableChickens!
Adding existing pacckages; Agadar is exactly right. If you can't be bothered to look through the source code and make an effort, you don't actually deserve help.
If, on the other hand, you are trying to make a new AI package, then I can understand how you can get stuck, as the AI process can be a little convoluted especially to someone who isn't used to coding in Forge or Java (or in general). If it's the latter, I wouldn't mind writing up some brief rundown of how the AI packages themselves work.
I believe in the Invisible Pink Unicorn, bless her Invisible Pinkness.
http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/modification-development/2105077-spawning-custom-mobs-naturally-forge
Try that