Fixed generator time not saving / 128 compat break
This commit is contained in:
@@ -61,16 +61,25 @@ public class PowerGenerator extends PowerDistributor{
|
||||
return powerProduction * productionEfficiency;
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte version(){
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(Writes write){
|
||||
super.write(write);
|
||||
write.f(productionEfficiency);
|
||||
write.f(generateTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void read(Reads read, byte revision){
|
||||
super.read(read, revision);
|
||||
productionEfficiency = read.f();
|
||||
if(revision >= 1){
|
||||
generateTime = read.f();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user