Пример #1
0
 /**
  * Deliveres the registered Turbines.
  *
  * @return
  */
 public List<TileDamPart> getTurbines() {
   List<TileDamPart> turbines = new ArrayList<TileDamPart>();
   for (TileDamPart part : this.registeredDamParts) {
     if (part.isTurbine()) {
       turbines.add(part);
     }
   }
   return turbines;
 }
Пример #2
0
 @Override
 public void writeToNBT(NBTTagCompound compound) {
   compound.setInteger("orientation", this.orientation.ordinal());
   compound.setInteger("parts_size", this.registeredDamParts.size());
   // TODO registeredDamParts
   super.writeToNBT(compound);
 }
Пример #3
0
 /**
  * Register a part to a Dam and delivieres if it was successfull
  *
  * @return
  */
 public boolean registerPart(TileDamPart part) {
   if (part.isValve()) {
     // We want only one Valve for each Dam, Noob!
     return false;
   }
   return this.registeredDamParts.add(part);
 }
Пример #4
0
  @Override
  public void readFromNBT(NBTTagCompound compound) {
    orientation = ForgeDirection.getOrientation(compound.getInteger("orientation"));

    // TODO registeredDamParts
    int amount = compound.getInteger("parts_size");
    for (int i = 0; i < amount; i++) {}

    super.readFromNBT(compound);
  }
Пример #5
0
 @Override
 public void updateEntity() {
   super.updateEntity();
 }