File tree 1 file changed +3
-7
lines changed
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) {
478
478
// palette is null, section must be empty
479
479
return false ;
480
480
}
481
- if (tagBlockStates == null ) {
481
+ if (tagBlockPalette . elements . length == 1 || tagBlockStates == null || tagBlockStates . data . length <= 1 ) {
482
482
if (tagBlockPalette .elements .length >= 1 ) {
483
483
// no state list but a palette indicates the whole section is filled with a single block
484
484
TAG_Compound blockTag = (TAG_Compound )tagBlockPalette .elements [0 ];
@@ -489,9 +489,7 @@ boolean fillBlocks(TAG_Compound section) {
489
489
}
490
490
491
491
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 );
495
493
return true ;
496
494
}
497
495
return false ;
@@ -555,9 +553,7 @@ boolean fillBiomes(TAG_Compound section) {
555
553
if (tagBiomePalette .elements .length >= 1 ) {
556
554
String biomeName = ((TAG_String ) tagBiomePalette .elements [0 ]).value ;
557
555
NamespaceID biome = NamespaceID .fromString (biomeName );
558
- for (int i = 0 ; i < 4096 ; i ++) {
559
- biomes [i ] = biome ;
560
- }
556
+ Arrays .fill (biomes , biome );
561
557
return true ;
562
558
}
563
559
return false ;
You can’t perform that action at this time.
0 commit comments