Compare commits

..

1 Commits

Author SHA1 Message Date
740da5bccc Fix 'ChunkCoordinatorBuilder#unloadAfter()' javadocs 2023-10-01 23:09:13 +02:00
2 changed files with 22 additions and 9 deletions

View File

@ -183,7 +183,7 @@ public class ChunkCoordinatorBuilder {
* Set whether the chunks should be allow to unload after being accessed. This should only be used where the chunks are read from * Set whether the chunks should be allow to unload after being accessed. This should only be used where the chunks are read from
* and then written to from a separate queue where they're consequently unloaded. * and then written to from a separate queue where they're consequently unloaded.
* *
* @param unloadAfter if to unload chuns afterwards * @param unloadAfter if to unload chunks afterwards
* @return this ChunkCoordinatorBuilder instance * @return this ChunkCoordinatorBuilder instance
*/ */
public @NonNull ChunkCoordinatorBuilder unloadAfter(final boolean unloadAfter) { public @NonNull ChunkCoordinatorBuilder unloadAfter(final boolean unloadAfter) {

View File

@ -42,14 +42,27 @@ public class EntityUtil {
} }
private static int capNumeral(final @NonNull String flagName) { private static int capNumeral(final @NonNull String flagName) {
int i = switch (flagName) { int i;
case "mob-cap" -> CAP_MOB; switch (flagName) {
case "hostile-cap" -> CAP_MONSTER; case "mob-cap":
case "animal-cap" -> CAP_ANIMAL; i = CAP_MOB;
case "vehicle-cap" -> CAP_VEHICLE; break;
case "misc-cap" -> CAP_MISC; case "hostile-cap":
default -> CAP_ENTITY; i = CAP_MONSTER;
}; break;
case "animal-cap":
i = CAP_ANIMAL;
break;
case "vehicle-cap":
i = CAP_VEHICLE;
break;
case "misc-cap":
i = CAP_MISC;
break;
case "entity-cap":
default:
i = CAP_ENTITY;
}
return i; return i;
} }