3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-28 00:50:13 +01:00

Fix ChunkSection nullability annotations

Dieser Commit ist enthalten in:
KennyTV 2021-04-02 18:29:51 +02:00
Ursprung 1251d43709
Commit 29d6b55592
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B

Datei anzeigen

@ -184,7 +184,7 @@ public class ChunkSection {
* *
* @param data The value to set the block light to * @param data The value to set the block light to
*/ */
public void setBlockLight(@Nullable byte[] data) { public void setBlockLight(byte @Nullable [] data) {
if (data.length != LIGHT_LENGTH) throw new IllegalArgumentException("Data length != " + LIGHT_LENGTH); if (data.length != LIGHT_LENGTH) throw new IllegalArgumentException("Data length != " + LIGHT_LENGTH);
if (this.blockLight == null) { if (this.blockLight == null) {
this.blockLight = new NibbleArray(data); this.blockLight = new NibbleArray(data);
@ -198,7 +198,7 @@ public class ChunkSection {
* *
* @param data The value to set the sky light to * @param data The value to set the sky light to
*/ */
public void setSkyLight(@Nullable byte[] data) { public void setSkyLight(byte @Nullable [] data) {
if (data.length != LIGHT_LENGTH) throw new IllegalArgumentException("Data length != " + LIGHT_LENGTH); if (data.length != LIGHT_LENGTH) throw new IllegalArgumentException("Data length != " + LIGHT_LENGTH);
if (this.skyLight == null) { if (this.skyLight == null) {
this.skyLight = new NibbleArray(data); this.skyLight = new NibbleArray(data);
@ -207,7 +207,7 @@ public class ChunkSection {
} }
} }
public @Nullable byte[] getBlockLight() { public byte @Nullable [] getBlockLight() {
return blockLight == null ? null : blockLight.getHandle(); return blockLight == null ? null : blockLight.getHandle();
} }
@ -215,7 +215,7 @@ public class ChunkSection {
return blockLight; return blockLight;
} }
public @Nullable byte[] getSkyLight() { public byte @Nullable [] getSkyLight() {
return skyLight == null ? null : skyLight.getHandle(); return skyLight == null ? null : skyLight.getHandle();
} }