Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

For some odd reason... my mobs MOVE VERY SLOW. I set my this.setAIMoveSpeed() to 1.0F (AND THAT'S FAST). Now when I'm in-game... sometimes, the mobs actually move at a fast pace, but they teleport to their previous location, as if it was the server lagging. Here is my entitymob code:

 

package assets.cutiesmod.entity;

import net.minecraft.entity.EnumCreatureAttribute;
import net.minecraft.entity.ai.EntityAIAttackOnCollide;
import net.minecraft.entity.ai.EntityAIBreakDoor;
import net.minecraft.entity.ai.EntityAIHurtByTarget;
import net.minecraft.entity.ai.EntityAILeapAtTarget;
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.boss.IBossDisplayData;
import net.minecraft.entity.monster.EntityMob;
import net.minecraft.entity.monster.EntitySlime;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.world.World;
import assets.cutiesmod.common.CutiesMod;

public class EntitySquishy extends EntityMob implements IBossDisplayData
{



 public EntitySquishy(World par1World) 
{
	super(par1World);
	this.setAIMoveSpeed(1.0F);

	this.isImmuneToFire = true;  
	this.tasks.addTask(0, new EntityAISwimming(this));
	this.tasks.addTask(1, new EntityAILeapAtTarget(this, 0.4F));
    this.tasks.addTask(0, new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.0D, false));
    this.tasks.addTask(0, new EntityAIAttackOnCollide(this, EntityMaleCutie.class, 1.0D, true));
    this.tasks.addTask(2, new EntityAIMoveTowardsRestriction(this, 1.0D));
    this.tasks.addTask(3, new EntityAIMoveThroughVillage(this, 1.0D, false));
    this.tasks.addTask(4, new EntityAIWander(this, 1.0D));
    this.tasks.addTask(5, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
    this.tasks.addTask(5, new EntityAILookIdle(this));
    this.targetTasks.addTask(2, new EntityAIHurtByTarget(this, true));
    this.targetTasks.addTask(0, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true));
    this.targetTasks.addTask(0, new EntityAINearestAttackableTarget(this, EntityMaleCutie.class, 0, false));	




}




public int getMaxHealth()
{
	return 500;
}

public int getMaxDamage()
{
	return 16;
}


protected void dropFewItems(boolean par1, int par2)
    {
        int j = this.rand.nextInt(2 + par2);
        int k;

        for (k = 0; k < j; ++k)
        {
            this.dropItem(CutiesMod.ItemCutieSoul.itemID, 4);
        }

        j = this.rand.nextInt(2 + par2);

        for (k = 0; k < j; ++k)
        {
            this.dropItem(Item.slimeBall.itemID, 10);
        }
    }


public EnumCreatureAttribute getCreatureAttribute()
{
	return EnumCreatureAttribute.UNDEAD;
}




protected String getLivingSound()
    {
        return "mob.enderdragon.growl";
    }

    /**
     * Returns the sound this mob makes when it is hurt.
     */
    protected String getHurtSound()
    {
        return "mob.enderdragon.hit";
    }

    /**
     * Returns the sound this mob makes on death.
     */
    protected String getDeathSound()
    {
        return "mob.wither.death";
    }


}

 

All of my mobs do this... BUT I DON'T KNOW WHY!

 

Override like this for example.

@Override
protected void func_110147_ax()
    {
            super.func_110147_ax();
            this.func_110148_a(SharedMonsterAttributes.field_111263_d).func_111128_a(your_speed_value_here);
    }

  • Author

I already added that to my Entity File(Under the Tasks method), but it's still moving VERY sllow

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.