From ec3327efebd017f43966299f5b6a528128ea2f50 Mon Sep 17 00:00:00 2001 From: Camotoy <20743703+Camotoy@users.noreply.github.com> Date: Thu, 23 May 2024 11:41:26 -0400 Subject: [PATCH] Minor minor changes --- .../geyser/level/block/property/BasicEnumProperty.java | 2 +- .../java/org/geysermc/geyser/level/block/type/BlockState.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/org/geysermc/geyser/level/block/property/BasicEnumProperty.java b/core/src/main/java/org/geysermc/geyser/level/block/property/BasicEnumProperty.java index f55b85d7b..c34392504 100644 --- a/core/src/main/java/org/geysermc/geyser/level/block/property/BasicEnumProperty.java +++ b/core/src/main/java/org/geysermc/geyser/level/block/property/BasicEnumProperty.java @@ -47,7 +47,7 @@ public final class BasicEnumProperty extends Property { public int indexOf(String value) { int index = this.values.indexOf(value); if (index == -1) { - throw new IllegalStateException("Property " + this + " does not have value " + value); + throw new IllegalArgumentException("Property " + this + " does not have value " + value); } return index; } diff --git a/core/src/main/java/org/geysermc/geyser/level/block/type/BlockState.java b/core/src/main/java/org/geysermc/geyser/level/block/type/BlockState.java index 44271bd80..a312a7d5a 100644 --- a/core/src/main/java/org/geysermc/geyser/level/block/type/BlockState.java +++ b/core/src/main/java/org/geysermc/geyser/level/block/type/BlockState.java @@ -35,7 +35,7 @@ public final class BlockState { private final Block block; private final int javaId; /** - * The values of each property of this block state. These should be treated as keys to {@link Block#propertyKeys()} + * The values of each property of this block state. These should be treated as keys to {@link Block#propertyKeys()}. * Of note - the comparable part probably doesn't do anything because we occasionally use strings in place of enums. * Will be null if there's only one block state for a block. */ @@ -135,7 +135,7 @@ public final class BlockState { // The above for loop will always stop at the first break because the last property has already been found diff = 1; } - return BlockState.of(this.javaId + ((thatOffset - thisOffset) * diff)); + return of(this.javaId + ((thatOffset - thisOffset) * diff)); } public Block block() {