Exemplo n.º 1
0
  public BlockEntity getBlockEntityFromId(int id) {
    for (BlockEntity entity : this.entities) {
      if (entity.getEntityId() == id) return entity;
    }

    return null;
  }
Exemplo n.º 2
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.º 3
0
 public void removeBlockEntity(BlockEntity entity) {
   this.removeBlockEntity(entity.getEntityId());
 }