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
* 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
*/
public @NonNull ChunkCoordinatorBuilder unloadAfter(final boolean unloadAfter) {

View File

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