Java Code Examples for net.minecraft.world.World.removeEntity()

The following are Jave code examples for showing how to use removeEntity() of the net.minecraft.world.World class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: Proyecto-DASI   File: BlockDrawingHelper.java   Source Code and License Vote up 5 votes
public void clearEntities(World w, double x1, double y1, double z1, double x2, double y2, double z2)
{
    List<Entity> entities = w.getEntitiesWithinAABBExcludingEntity(null,  new AxisAlignedBB(x1, y1, z1, x2, y2, z2));
    for (Entity ent : entities)
        if (!(ent instanceof EntityPlayer))
            w.removeEntity(ent);
}
 
Example 2
Project: Proyecto-DASI   File: BlockDrawingHelper.java   Source Code and License Vote up 5 votes
public void clearEntities(World w, double x1, double y1, double z1, double x2, double y2, double z2)
{
    List<Entity> entities = w.getEntitiesWithinAABBExcludingEntity(null,  new AxisAlignedBB(x1, y1, z1, x2, y2, z2));
    for (Entity ent : entities)
        if (!(ent instanceof EntityPlayer))
            w.removeEntity(ent);
}
 
Example 3
Project: NemesisSystem   File: Reaper.java   Source Code and License Vote up 5 votes
private void despawnNemesis(World world, INemesisRegistry registry, NemesisEntry nemesis) {
	// TODO increase NemesisEntry level every time they spawn but are not killed
	Entity entity = world.getEntityByID(nemesis.getSpawned());
	if (entity != null) {
		entity.setDead();
		world.removeEntity(entity);
	}
	nemesis.setSpawned(null);
	registry.update(nemesis);
}