File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -478,7 +478,7 @@ boolean fillBlocks(TAG_Compound section) {
478478 // palette is null, section must be empty
479479 return false ;
480480 }
481- if (tagBlockStates == null ) {
481+ if (tagBlockPalette . elements . length == 1 || tagBlockStates == null || tagBlockStates . data . length <= 1 ) {
482482 if (tagBlockPalette .elements .length >= 1 ) {
483483 // no state list but a palette indicates the whole section is filled with a single block
484484 TAG_Compound blockTag = (TAG_Compound )tagBlockPalette .elements [0 ];
@@ -489,9 +489,7 @@ boolean fillBlocks(TAG_Compound section) {
489489 }
490490
491491 BlockData block = new BlockData (NamespaceID .fromString (blockName ));
492- for (int i = 0 ; i < 4096 ; i ++) {
493- data [i ] = block ;
494- }
492+ Arrays .fill (data , block );
495493 return true ;
496494 }
497495 return false ;
@@ -555,9 +553,7 @@ boolean fillBiomes(TAG_Compound section) {
555553 if (tagBiomePalette .elements .length >= 1 ) {
556554 String biomeName = ((TAG_String ) tagBiomePalette .elements [0 ]).value ;
557555 NamespaceID biome = NamespaceID .fromString (biomeName );
558- for (int i = 0 ; i < 4096 ; i ++) {
559- biomes [i ] = biome ;
560- }
556+ Arrays .fill (biomes , biome );
561557 return true ;
562558 }
563559 return false ;
You can’t perform that action at this time.
0 commit comments