Merge pull request #3703 from rycbar0/master

formula error
This commit is contained in:
leijurv
2022-12-24 00:12:47 -08:00
committed by GitHub

View File

@@ -136,7 +136,7 @@ public final class LitematicaSchematic extends StaticSchematic {
* @return amount of bits used to encode a block.
*/
private static int getBitsPerBlock(int amountOfBlockTypes) {
return (int) Math.floor((Math.log(amountOfBlockTypes)) / Math.log(2)) + 1;
return (int) Math.max(2,Math.ceil(Math.log(amountOfBlockTypes) / Math.log(2)));
}
/**