Offset integer ranges in runtime block data serialization

this is useful for stuff like snow layers where the range doesn't start at 0.
This commit is contained in:
Dylan K. Taylor
2022-07-13 19:49:30 +01:00
parent dea0207e4e
commit 8b2d941502
22 changed files with 34 additions and 25 deletions

View File

@ -48,7 +48,7 @@ class Cake extends Transparent implements FoodSource{
}
protected function encodeState(RuntimeDataWriter $w) : void{
$w->writeInt(3, $this->bites);
$w->writeBoundedInt(3, 0, self::MAX_BITES, $this->bites);
}
/**