Esempio n. 1
0
 @Override
 public void updateValues(EntityClone clone) {
   lastBuild = clone.getBuildAI().isRunning();
   lastBuildState = clone.getBuildAI().getBuildState();
   lastFullSize = clone.getBuildAI().getSchemFullSize();
   isDirty = false;
 }
Esempio n. 2
0
 @Override
 public void read(DataInputStream in, EntityClone clone) throws IOException {
   if (clone.worldObj.isRemote) {
     clone.getBuildAI().setBuilding(in.readBoolean());
     clone.getBuildAI().setSchemFullSize(in.readInt());
     clone.getBuildAI().setBuildState(in.read());
   } else {
     clone.getBuildAI().setBuilding(in.readBoolean());
     in.readInt();
     in.read();
   }
 }
Esempio n. 3
0
  @Override
  public boolean checkNeedsUpdating(EntityClone clone) {
    EntityAIBuild ai = clone.getBuildAI();

    return isDirty
        || ai.isRunning() != lastBuild
        || ai.getBuildState() != lastBuildState
        || ai.getSchemFullSize() != lastFullSize;
  }
Esempio n. 4
0
 @Override
 public void write(DataOutputStream out, EntityClone clone) throws IOException {
   out.writeBoolean(clone.getBuildAI().isRunning());
   out.writeInt(clone.getBuildAI().getSchemFullSize());
   out.write(clone.getBuildAI().getBuildState());
 }