diff --git a/patches/net/minecraft/world/level/levelgen/DebugLevelSource.java.patch b/patches/net/minecraft/world/level/levelgen/DebugLevelSource.java.patch index d5625c5650..73827fcef2 100644 --- a/patches/net/minecraft/world/level/levelgen/DebugLevelSource.java.patch +++ b/patches/net/minecraft/world/level/levelgen/DebugLevelSource.java.patch @@ -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