Allow Null Texture for Block Mappings/API (#4094)

* Allow null textures for blocks.json use

* Missing semicolon
This commit is contained in:
Kas-tle 2023-08-31 10:09:14 -07:00 committed by GitHub
parent 1b05f9f15e
commit bf81fc1139
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 19 deletions

View file

@ -25,7 +25,6 @@
package org.geysermc.geyser.api.block.custom.component;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.geysermc.geyser.api.GeyserApi;
@ -38,7 +37,7 @@ public interface MaterialInstance {
*
* @return The texture of the block.
*/
@NonNull String texture();
@Nullable String texture();
/**
* Gets the render method of the block
@ -52,14 +51,14 @@ public interface MaterialInstance {
*
* @return If the block should be dimmed on certain faces.
*/
@Nullable boolean faceDimming();
boolean faceDimming();
/**
* Gets if the block should have ambient occlusion
*
* @return If the block should have ambient occlusion.
*/
@Nullable boolean ambientOcclusion();
boolean ambientOcclusion();
/**
* Creates a builder for MaterialInstance.
@ -71,13 +70,13 @@ public interface MaterialInstance {
}
interface Builder {
Builder texture(@NonNull String texture);
Builder texture(@Nullable String texture);
Builder renderMethod(@Nullable String renderMethod);
Builder faceDimming(@Nullable boolean faceDimming);
Builder faceDimming(boolean faceDimming);
Builder ambientOcclusion(@Nullable boolean ambientOcclusion);
Builder ambientOcclusion(boolean ambientOcclusion);
MaterialInstance build();
}