Exemplo n.º 1
0
 public void removeBlockEntity(int id) {
   for (BlockEntity entity : this.entities) {
     if (entity.getEntityId() == id) {
       if (entity.getController() != null) entity.getController().onDeath();
       EventFactory.callEvent(new EntityDeathEvent(entity));
       this.entities.remove(entity);
     }
   }
 }
Exemplo n.º 2
0
  public void tick() {
    for (Player player : this.players) {
      ((ServerPlayer) player).tick();
    }

    for (BlockEntity entity : this.entities) {
      if (entity.getController() != null) entity.getController().tick();
    }
  }