net.minecraft.entity.passive.EntityRabbit Java Examples

The following examples show how to use net.minecraft.entity.passive.EntityRabbit. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EntityTofuChinger.java    From TofuCraftReload with MIT License 6 votes vote down vote up
@Override
protected void initEntityAI()
{
    this.tasks.addTask(0, new EntityAISwimming(this));
    this.tasks.addTask(1, new EntityTofuChinger.AIMeleeAttack());
    this.tasks.addTask(5, new EntityAIWanderAvoidWater(this, 1.0D));
    this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
    this.tasks.addTask(6, new EntityAILookIdle(this));
    this.tasks.addTask(7, new EntityAIWatchClosest(this, EntityLiving.class, 8.0F));

    this.targetTasks.addTask(0, new EntityAIHurtByTarget(this,true));
    this.targetTasks.addTask(1, new EntityAINearestAttackableTarget<>(this, EntityTofuSlime.class,false));
    this.targetTasks.addTask(1, new EntityAINearestAttackableTarget<>(this,EntityPlayer.class,true));
    this.targetTasks.addTask(1, new EntityAINearestAttackableTarget<>(this,EntityTofunian.class,true));
    this.targetTasks.addTask(2, new EntityAINearestAttackableTarget<>(this, EntityRabbit.class,true));
}
 
Example #2
Source File: BiomeGlacier.java    From CommunityMod with GNU Lesser General Public License v2.1 6 votes vote down vote up
public BiomeGlacier(boolean isSpikes) {
    super(getProperties(isSpikes));
    this.isSpikes = isSpikes;
    this.topBlock = Blocks.SNOW.getDefaultState();
    this.fillerBlock = Blocks.ICE.getDefaultState();
    decorator.treesPerChunk = 1;
    decorator.extraTreeChance = 4;
    this.spawnableCreatureList.clear();
    this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityRabbit.class, 10, 2, 3));
    this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityPolarBear.class, 1, 1, 2));

    this.spawnableMonsterList.removeIf(spawnentry -> spawnentry.entityClass == EntitySkeleton.class);

    this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntitySkeleton.class, 20, 4, 4));
    this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityStray.class, 80, 4, 4));
}
 
Example #3
Source File: BiomeGlacier.java    From Traverse-Legacy-1-12-2 with MIT License 6 votes vote down vote up
public BiomeGlacier(boolean isSpikes) {
    super(getProperties(isSpikes));
    this.isSpikes = isSpikes;
    this.topBlock = Blocks.SNOW.getDefaultState();
    this.fillerBlock = Blocks.ICE.getDefaultState();
    decorator.treesPerChunk = 1;
    decorator.extraTreeChance = 4;
    this.spawnableCreatureList.clear();
    this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityRabbit.class, 10, 2, 3));
    this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityPolarBear.class, 1, 1, 2));

    this.spawnableMonsterList.removeIf(spawnentry -> spawnentry.entityClass == EntitySkeleton.class);

    this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntitySkeleton.class, 20, 4, 4));
    this.spawnableMonsterList.add(new Biome.SpawnListEntry(EntityStray.class, 80, 4, 4));
}
 
Example #4
Source File: CraftRabbit.java    From Kettle with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void setRabbitType(Type type) {
    EntityRabbit entity = getHandle();
    if (getRabbitType() == Type.THE_KILLER_BUNNY) {
        // Reset goals and target finders.
        World world = ((CraftWorld) this.getWorld()).getHandle();
        entity.tasks = new EntityAITasks(world != null && world.profiler != null ? world.profiler : null);
        entity.targetTasks = new EntityAITasks(world != null && world.profiler != null ? world.profiler : null);
        entity.initializePathFinderGoals();
    }

    entity.setRabbitType(CraftMagicMapping.toMagic(type));
}
 
Example #5
Source File: CraftRabbit.java    From Kettle with GNU General Public License v3.0 4 votes vote down vote up
public CraftRabbit(CraftServer server, EntityRabbit entity) {
    super(server, entity);
}
 
Example #6
Source File: CraftRabbit.java    From Kettle with GNU General Public License v3.0 4 votes vote down vote up
@Override
public EntityRabbit getHandle() {
    return (EntityRabbit) entity;
}