mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-30 21:17:53 +01:00
Add UnknownNullability to block getter using condition
Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
parent
ae08ac2987
commit
c38f46d3b8
@ -3,14 +3,14 @@ package net.minestom.server.instance.block;
|
|||||||
import net.minestom.server.coordinate.Point;
|
import net.minestom.server.coordinate.Point;
|
||||||
import org.jetbrains.annotations.ApiStatus;
|
import org.jetbrains.annotations.ApiStatus;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.UnknownNullability;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
public interface BlockGetter {
|
public interface BlockGetter {
|
||||||
@Nullable Block getBlock(int x, int y, int z, @NotNull Condition condition);
|
@UnknownNullability Block getBlock(int x, int y, int z, @NotNull Condition condition);
|
||||||
|
|
||||||
default @Nullable Block getBlock(@NotNull Point point, @NotNull Condition condition) {
|
default @UnknownNullability Block getBlock(@NotNull Point point, @NotNull Condition condition) {
|
||||||
return getBlock(point.blockX(), point.blockY(), point.blockZ(), condition);
|
return getBlock(point.blockX(), point.blockY(), point.blockZ(), condition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user