mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2025-01-22 23:41:27 +01:00
Fix missing setFlatBlock
This commit is contained in:
parent
5801cd1e0f
commit
7eab459195
@ -47,7 +47,13 @@ public class ChunkSection1_9_1_2 implements ChunkSection {
|
||||
|
||||
@Override
|
||||
public void setFlatBlock(int x, int y, int z, int type) {
|
||||
throw new UnsupportedOperationException();
|
||||
int index = palette.indexOf(type);
|
||||
if (index == -1) {
|
||||
index = palette.size();
|
||||
palette.add(type);
|
||||
}
|
||||
|
||||
blocks[index(x, y, z)] = index;
|
||||
}
|
||||
|
||||
public int getBlockId(int x, int y, int z) {
|
||||
|
@ -48,7 +48,13 @@ public class ChunkSection1_9to1_8 implements ChunkSection {
|
||||
|
||||
@Override
|
||||
public void setFlatBlock(int x, int y, int z, int type) {
|
||||
throw new UnsupportedOperationException();
|
||||
int index = palette.indexOf(type);
|
||||
if (index == -1) {
|
||||
index = palette.size();
|
||||
palette.add(type);
|
||||
}
|
||||
|
||||
blocks[index(x, y, z)] = index;
|
||||
}
|
||||
|
||||
public int getBlockId(int x, int y, int z) {
|
||||
|
Loading…
Reference in New Issue
Block a user