mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2026-10-22 07:22:29 +00:00
Add missing @Nullability annotations to arg lists
The *contents* of the array is nullable, but the array itself isn't.
This commit is contained in:
+3
-3
@@ -37,9 +37,9 @@ import org.jspecify.annotations.Nullable;
|
||||
|
||||
public class TurtlePlaceCommand implements TurtleCommand {
|
||||
private final InteractDirection direction;
|
||||
private final Object[] extraArguments;
|
||||
private final @Nullable Object[] extraArguments;
|
||||
|
||||
public TurtlePlaceCommand(InteractDirection direction, Object[] arguments) {
|
||||
public TurtlePlaceCommand(InteractDirection direction, @Nullable Object[] arguments) {
|
||||
this.direction = direction;
|
||||
extraArguments = arguments;
|
||||
}
|
||||
@@ -177,7 +177,7 @@ public class TurtlePlaceCommand implements TurtleCommand {
|
||||
var placed = doDeployOnBlock(stack, turtlePlayer, hit, adjacent).consumesAction();
|
||||
|
||||
// Set text on signs
|
||||
if (placed && item instanceof SignItem && extraArguments != null && extraArguments.length >= 1 && extraArguments[0] instanceof String message) {
|
||||
if (placed && item instanceof SignItem && extraArguments.length >= 1 && extraArguments[0] instanceof String message) {
|
||||
var world = turtle.getLevel();
|
||||
var tile = world.getBlockEntity(position);
|
||||
if (tile == null || tile == existingTile) {
|
||||
|
||||
@@ -73,7 +73,7 @@ public interface IArguments {
|
||||
* @throws LuaException If an error occurred while fetching an argument.
|
||||
* @see #get(int) To get a single argument.
|
||||
*/
|
||||
default Object[] getAll() throws LuaException {
|
||||
default @Nullable Object[] getAll() throws LuaException {
|
||||
var result = new Object[count()];
|
||||
for (var i = 0; i < result.length; i++) result[i] = get(i);
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user