No extra Data Field

This commit is contained in:
Frank 2022-07-31 20:17:35 +02:00
parent b7b357ac86
commit 165ac1ca27
2 changed files with 32 additions and 12 deletions

View file

@ -36,9 +36,11 @@ public final class BoatTypeOverride {
this.name = name;
this.planks = planks;
int nr = Objects.hash(name);
if (nr >= 0 && nr <= 1000) nr += 1000;
while (byId(nr) != null) {
nr++;
BCLib.LOGGER.warning("Boat Type Ordinal " + nr + " is already used, searching for another one");
nr++;
if (nr >= 0 && nr <= 1000) nr += 1000;
}
this.ordinal = nr;
if (BCLib.isClient()) {