3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-09-17 01:23:43 +02:00

Fix missing setFlatBlock

Dieser Commit ist enthalten in:
creeper123123321 2018-03-24 16:39:48 -03:00
Ursprung 5801cd1e0f
Commit 7eab459195
2 geänderte Dateien mit 14 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -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) {

Datei anzeigen

@ -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) {