Fixed ordinal check being made before incrementing

In the RotateBlockEvent class, a bug was fixed where the ordinal check was previously being done before the ordinal was incremented.
This commit is contained in:
Teriuihi 2024-06-30 20:37:24 +02:00
parent 6209b71db4
commit a5f59c2399

View File

@ -94,10 +94,8 @@ public class RotateBlockEvent implements Listener {
BigDripleaf.Tilt[] values = BigDripleaf.Tilt.values();
int ordinal = bigDripleaf.getTilt().ordinal();
if (ordinal == values.length) {
if (++ordinal == values.length) {
ordinal = 0;
} else {
ordinal++;
}
bigDripleaf.setTilt(values[ordinal]);