Fix needless complication of section position methods in CharBlocks children

This commit is contained in:
dordsor21 2021-09-13 18:33:42 +01:00
parent ce7a97368f
commit daa418a287
No known key found for this signature in database
GPG Key ID: 1E53E88969FFCF0B
4 changed files with 15 additions and 20 deletions

View File

@ -157,6 +157,21 @@ public abstract class CharBlocks implements IBlocks {
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
public BlockState getBlock(int x, int y, int z) {
return BlockTypesCache.states[get(x, y, z)];

View File

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

View File

@ -321,21 +321,6 @@ public class CharSetBlocks extends CharBlocks implements IChunkSet {
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
private void updateSectionIndexRange(int layer) {
if (layer >= minSectionPosition && layer <= maxSectionPosition) {