Search in sources :

Example 1 with StriderEntity

use of net.minecraft.entity.passive.StriderEntity in project Hostile-Mobs-and-Girls by Mechalopa.

the class MeltyMonsterEntity method registerGoals.

@Override
protected void registerGoals() {
    this.goalSelector.addGoal(2, new AvoidEntityGoal<>(this, StriderEntity.class, 10.0F, 1.0D, 1.5D));
    this.goalSelector.addGoal(3, new MeltyMonsterEntity.MoveToLavaGoal(this, 1.5D));
    this.goalSelector.addGoal(5, new RangedAttackGoal(this, 1.0D, 30, 40, 8.0F));
    this.goalSelector.addGoal(6, new WaterAvoidingRandomWalkingGoal(this, 1.0D));
    this.goalSelector.addGoal(7, new LookAtGoal(this, PlayerEntity.class, 8.0F));
    this.goalSelector.addGoal(7, new LookRandomlyGoal(this));
    this.targetSelector.addGoal(1, new HurtByTargetGoal(this));
    this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, PlayerEntity.class, 10, true, false, (p) -> {
        return !(p.getVehicle() instanceof StriderEntity);
    }));
}
Also used : StriderEntity(net.minecraft.entity.passive.StriderEntity) EntityType(net.minecraft.entity.EntityType) Random(java.util.Random) Direction(net.minecraft.util.Direction) SpawnReason(net.minecraft.entity.SpawnReason) StriderEntity(net.minecraft.entity.passive.StriderEntity) PathType(net.minecraft.pathfinding.PathType) BlockState(net.minecraft.block.BlockState) HurtByTargetGoal(net.minecraft.entity.ai.goal.HurtByTargetGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity) LivingEntity(net.minecraft.entity.LivingEntity) Pose(net.minecraft.entity.Pose) MoveToBlockGoal(net.minecraft.entity.ai.goal.MoveToBlockGoal) ForgeEventFactory(net.minecraftforge.event.ForgeEventFactory) GroundPathNavigator(net.minecraft.pathfinding.GroundPathNavigator) AbstractFireBlock(net.minecraft.block.AbstractFireBlock) WaterAvoidingRandomWalkingGoal(net.minecraft.entity.ai.goal.WaterAvoidingRandomWalkingGoal) EntitySize(net.minecraft.entity.EntitySize) IWorldReader(net.minecraft.world.IWorldReader) PathNodeType(net.minecraft.pathfinding.PathNodeType) LookAtGoal(net.minecraft.entity.ai.goal.LookAtGoal) SmallFireballEntity(net.minecraft.entity.projectile.SmallFireballEntity) RangedAttackGoal(net.minecraft.entity.ai.goal.RangedAttackGoal) Attributes(net.minecraft.entity.ai.attributes.Attributes) IPacket(net.minecraft.network.IPacket) AvoidEntityGoal(net.minecraft.entity.ai.goal.AvoidEntityGoal) NetworkHooks(net.minecraftforge.fml.network.NetworkHooks) NearestAttackableTargetGoal(net.minecraft.entity.ai.goal.NearestAttackableTargetGoal) ISelectionContext(net.minecraft.util.math.shapes.ISelectionContext) IServerWorld(net.minecraft.world.IServerWorld) Nonnull(javax.annotation.Nonnull) PathNavigator(net.minecraft.pathfinding.PathNavigator) WalkNodeProcessor(net.minecraft.pathfinding.WalkNodeProcessor) FluidTags(net.minecraft.tags.FluidTags) World(net.minecraft.world.World) PathFinder(net.minecraft.pathfinding.PathFinder) BlockPos(net.minecraft.util.math.BlockPos) FlowingFluidBlock(net.minecraft.block.FlowingFluidBlock) DamageSource(net.minecraft.util.DamageSource) Blocks(net.minecraft.block.Blocks) SoundEvents(net.minecraft.util.SoundEvents) AttributeModifierMap(net.minecraft.entity.ai.attributes.AttributeModifierMap) ParticleTypes(net.minecraft.particles.ParticleTypes) MathHelper(net.minecraft.util.math.MathHelper) ModConfigs(hmag.ModConfigs) Fluid(net.minecraft.fluid.Fluid) LookRandomlyGoal(net.minecraft.entity.ai.goal.LookRandomlyGoal) IRangedAttackMob(net.minecraft.entity.IRangedAttackMob) MonsterEntity(net.minecraft.entity.monster.MonsterEntity) SoundEvent(net.minecraft.util.SoundEvent) LookAtGoal(net.minecraft.entity.ai.goal.LookAtGoal) LookRandomlyGoal(net.minecraft.entity.ai.goal.LookRandomlyGoal) WaterAvoidingRandomWalkingGoal(net.minecraft.entity.ai.goal.WaterAvoidingRandomWalkingGoal) HurtByTargetGoal(net.minecraft.entity.ai.goal.HurtByTargetGoal) RangedAttackGoal(net.minecraft.entity.ai.goal.RangedAttackGoal) PlayerEntity(net.minecraft.entity.player.PlayerEntity)

Aggregations

ModConfigs (hmag.ModConfigs)1 Random (java.util.Random)1 Nonnull (javax.annotation.Nonnull)1 AbstractFireBlock (net.minecraft.block.AbstractFireBlock)1 BlockState (net.minecraft.block.BlockState)1 Blocks (net.minecraft.block.Blocks)1 FlowingFluidBlock (net.minecraft.block.FlowingFluidBlock)1 EntitySize (net.minecraft.entity.EntitySize)1 EntityType (net.minecraft.entity.EntityType)1 IRangedAttackMob (net.minecraft.entity.IRangedAttackMob)1 LivingEntity (net.minecraft.entity.LivingEntity)1 Pose (net.minecraft.entity.Pose)1 SpawnReason (net.minecraft.entity.SpawnReason)1 AttributeModifierMap (net.minecraft.entity.ai.attributes.AttributeModifierMap)1 Attributes (net.minecraft.entity.ai.attributes.Attributes)1 AvoidEntityGoal (net.minecraft.entity.ai.goal.AvoidEntityGoal)1 HurtByTargetGoal (net.minecraft.entity.ai.goal.HurtByTargetGoal)1 LookAtGoal (net.minecraft.entity.ai.goal.LookAtGoal)1 LookRandomlyGoal (net.minecraft.entity.ai.goal.LookRandomlyGoal)1 MoveToBlockGoal (net.minecraft.entity.ai.goal.MoveToBlockGoal)1