Posted September 1, 201411 yr Hi I made a custom mob but I am having a issue with the mobs movement speed I have it set to the same as a zombie but the zombies seem to move a lot faster than my custom mob. any one have any idea how to fix this? Entity Code package net.tamaverse.main; 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.EntityAIMoveThroughVillage; import net.minecraft.entity.ai.EntityAIMoveTowardsRestriction; 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.passive.EntityVillager; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; import net.minecraftforge.common.ForgeModContainer; public class EntityHuman extends EntityMob { public EntityHuman(World world) { super(world); this.getNavigator().setBreakDoors(false); this.tasks.addTask(0, new EntityAISwimming(this)); this.tasks.addTask(5, new EntityAIMoveTowardsRestriction(this, 1.0D)); this.tasks.addTask(7, new EntityAIWander(this, 1.0D)); this.tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); this.tasks.addTask(8, new EntityAILookIdle(this)); this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true)); this.setSize(0.6F, 1.8F); } @Override public void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(40.0D); this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(3.0D); this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(20.0D); this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.20000000298023224D); } }
September 1, 201411 yr Your code looks fine. Are you sure it's moving slower? Check out my mod, Realms of Chaos, here. If I helped you, be sure to press the "Thank You" button!
September 1, 201411 yr Author yeah I go in gamemode 0 and when I aggro my custom mob and the zombie I can see the zombie moving faster even the zombies arms / leg animation is faster.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.