Fix needless complication of section position methods in CharBlocks children

Dieser Commit ist enthalten in:
dordsor21 2021-09-13 18:33:42 +01:00
Ursprung ce7a97368f
Commit daa418a287
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 1E53E88969FFCF0B
4 geänderte Dateien mit 15 neuen und 20 gelöschten Zeilen

Datei anzeigen

@ -157,6 +157,21 @@ public abstract class CharBlocks implements IBlocks {
return sections[layer].isFull() ? blocks[layer] : null; return sections[layer].isFull() ? blocks[layer] : null;
} }
@Override
public int getSectionCount() {
return sectionCount;
}
@Override
public int getMaxSectionPosition() {
return maxSectionPosition;
}
@Override
public int getMinSectionPosition() {
return minSectionPosition;
}
@Override @Override
public BlockState getBlock(int x, int y, int z) { public BlockState getBlock(int x, int y, int z) {
return BlockTypesCache.states[get(x, y, z)]; return BlockTypesCache.states[get(x, y, z)];

Datei anzeigen

@ -55,9 +55,4 @@ public abstract class CharGetBlocks extends CharBlocks implements IChunkGet {
return null; return null;
} }
@Override
public int getSectionCount() {
return sectionCount;
}
} }

Datei anzeigen

@ -321,21 +321,6 @@ public class CharSetBlocks extends CharBlocks implements IChunkSet {
return super.load(layer); return super.load(layer);
} }
@Override
public int getSectionCount() {
return sectionCount;
}
@Override
public int getMaxSectionPosition() {
return maxSectionPosition;
}
@Override
public int getMinSectionPosition() {
return minSectionPosition;
}
// Checks and updates the various section arrays against the new layer index // Checks and updates the various section arrays against the new layer index
private void updateSectionIndexRange(int layer) { private void updateSectionIndexRange(int layer) {
if (layer >= minSectionPosition && layer <= maxSectionPosition) { if (layer >= minSectionPosition && layer <= maxSectionPosition) {