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

Implement BlockEntity sectionX/Z methods

Dieser Commit ist enthalten in:
Nassim Jahnke 2021-09-16 14:19:45 +02:00
Ursprung c565f2c9c7
Commit 9ffa737a4d
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
3 geänderte Dateien mit 8 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -27,12 +27,12 @@ import org.checkerframework.checker.nullness.qual.Nullable;
public interface BlockEntity { public interface BlockEntity {
default byte relX() { default byte sectionX() {
return -1; //TODO return (byte) ((packedXZ() >> 4) & 15);
} }
default byte relZ() { default byte sectionZ() {
return -1; //TODO return (byte) (packedXZ() & 15);
} }
byte packedXZ(); byte packedXZ();

Datei anzeigen

@ -50,4 +50,8 @@ public final class BlockEntityIds {
} }
return newId; return newId;
} }
public static int[] getIds() {
return IDS;
}
} }

Datei anzeigen

@ -144,7 +144,6 @@ public final class WorldPackets {
} }
// Fill biome palette // Fill biome palette
//TODO Use single value palette if given the possibility
final DataPaletteImpl biomePalette = new DataPaletteImpl(); final DataPaletteImpl biomePalette = new DataPaletteImpl();
section.addPalette(PaletteType.BIOMES, biomePalette); section.addPalette(PaletteType.BIOMES, biomePalette);
for (int biomeIndex = i * BIOMES_PER_CHUNK; biomeIndex < (i * BIOMES_PER_CHUNK) + BIOMES_PER_CHUNK; biomeIndex++) { for (int biomeIndex = i * BIOMES_PER_CHUNK; biomeIndex < (i * BIOMES_PER_CHUNK) + BIOMES_PER_CHUNK; biomeIndex++) {