mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Minor minor changes
This commit is contained in:
parent
377eb07afc
commit
ec3327efeb
2 changed files with 3 additions and 3 deletions
|
@ -47,7 +47,7 @@ public final class BasicEnumProperty extends Property<String> {
|
||||||
public int indexOf(String value) {
|
public int indexOf(String value) {
|
||||||
int index = this.values.indexOf(value);
|
int index = this.values.indexOf(value);
|
||||||
if (index == -1) {
|
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;
|
return index;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ public final class BlockState {
|
||||||
private final Block block;
|
private final Block block;
|
||||||
private final int javaId;
|
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.
|
* 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.
|
* 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
|
// The above for loop will always stop at the first break because the last property has already been found
|
||||||
diff = 1;
|
diff = 1;
|
||||||
}
|
}
|
||||||
return BlockState.of(this.javaId + ((thatOffset - thisOffset) * diff));
|
return of(this.javaId + ((thatOffset - thisOffset) * diff));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Block block() {
|
public Block block() {
|
||||||
|
|
Loading…
Reference in a new issue