Skip to content

Commit

Permalink
Fix DebugLevelSource being off-by-one on grid height (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
embeddedt authored Nov 1, 2023
1 parent 3594d1f commit 0067946
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
+ public static void initValidStates() {
+ ALL_BLOCKS = StreamSupport.stream(BuiltInRegistries.BLOCK.spliterator(), false).flatMap(block -> block.getStateDefinition().getPossibleStates().stream()).collect(Collectors.toList());
+ GRID_WIDTH = Mth.ceil(Mth.sqrt(ALL_BLOCKS.size()));
+ GRID_HEIGHT = Mth.ceil((float) (ALL_BLOCKS.size() / GRID_WIDTH));
+ GRID_HEIGHT = Mth.ceil((float)ALL_BLOCKS.size() / (float)GRID_WIDTH);
+ }
+
@Override
Expand Down

0 comments on commit 0067946

Please sign in to comment.