Assigned creature type for hostile mobs
This is to fix a sponge issue that is making the aether unplayable
This commit is contained in:
parent
7b69e0470f
commit
ce7ae6029d
4 changed files with 28 additions and 0 deletions
|
@ -2,6 +2,7 @@ package com.legacy.aether.server.entities.hostile;
|
|||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityAgeable;
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.SoundEvents;
|
||||
|
@ -52,6 +53,12 @@ public class EntityAechorPlant extends EntityAetherAnimal
|
|||
this.tasks.addTask(0, new AechorPlantAIShootPlayer(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCreatureType(EnumCreatureType type, boolean forSpawnCount)
|
||||
{
|
||||
return type == EnumCreatureType.MONSTER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLivingUpdate()
|
||||
{
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.legacy.aether.server.entities.hostile;
|
||||
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.ai.EntityAINearestAttackableTarget;
|
||||
|
@ -73,6 +74,12 @@ public class EntityCockatrice extends EntityMob
|
|||
return this.worldObj.getBlockState(pos).getBlock() == BlocksAether.aether_grass ? 10.0F : 0.0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCreatureType(EnumCreatureType type, boolean forSpawnCount)
|
||||
{
|
||||
return type == EnumCreatureType.MONSTER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate()
|
||||
{
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.legacy.aether.server.entities.hostile;
|
||||
|
||||
import net.minecraft.entity.EntityFlying;
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.ai.EntityAIWatchClosest;
|
||||
import net.minecraft.entity.monster.IMob;
|
||||
|
@ -61,6 +62,12 @@ public class EntityZephyr extends EntityFlying implements IMob
|
|||
return this.worldObj.getLight(pos) > 8 && this.worldObj.checkNoEntityCollision(this.getEntityBoundingBox().expand(0D, 10D, 0D)) && this.worldObj.getCollisionBoxes(this, this.getEntityBoundingBox()).isEmpty() && !this.worldObj.containsAnyLiquid(this.getEntityBoundingBox());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCreatureType(EnumCreatureType type, boolean forSpawnCount)
|
||||
{
|
||||
return type == EnumCreatureType.AMBIENT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityUpdate()
|
||||
{
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.legacy.aether.server.entities.passive;
|
||||
|
||||
import net.minecraft.entity.EntityFlying;
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
import net.minecraft.entity.ai.EntityAILookIdle;
|
||||
import net.minecraft.entity.monster.IMob;
|
||||
|
@ -63,6 +64,12 @@ public class EntityAerwhale extends EntityFlying implements IMob
|
|||
return this.worldObj.getLight(pos) > 8 && this.worldObj.checkNoEntityCollision(this.getEntityBoundingBox().expand(0D, 30D, 0D)) && this.worldObj.getCollisionBoxes(this, this.getEntityBoundingBox()).isEmpty() && !this.worldObj.containsAnyLiquid(this.getEntityBoundingBox());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCreatureType(EnumCreatureType type, boolean forSpawnCount)
|
||||
{
|
||||
return type == EnumCreatureType.AMBIENT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue