mirror of
https://github.com/garbagemule/MobArena.git
synced 2024-11-22 10:36:00 +01:00
Tidy up code style in MACreature.
It's K&R style braces in all modern portions of the code base, and IntelliJ keeps complaining about final values, so let's just make it happy. The `plural` field should go away at some point, but for now it's fine to just null it out, since the legacy `register()` method is only ever used by the deprecated-for-removal constructors, both of which actually set it to something non-null.
This commit is contained in:
parent
72f4d16e6f
commit
4de0ce258b
@ -25,11 +25,12 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class MACreature
|
||||
{
|
||||
private static Map<String,MACreature> map;
|
||||
public class MACreature {
|
||||
|
||||
private static final Map<String,MACreature> map = new HashMap<>();
|
||||
private static final List<DyeColor> colors = Arrays.asList(DyeColor.values());
|
||||
|
||||
static {
|
||||
map = new HashMap<>();
|
||||
registerEntityTypeValues();
|
||||
registerExtraAliases();
|
||||
registerTypeVariants();
|
||||
@ -37,14 +38,14 @@ public class MACreature
|
||||
registerBrokenTypes();
|
||||
}
|
||||
|
||||
private List<DyeColor> colors = Arrays.asList(DyeColor.values());
|
||||
private String name;
|
||||
private String plural;
|
||||
private EntityType type;
|
||||
private final String name;
|
||||
private final String plural;
|
||||
private final EntityType type;
|
||||
|
||||
public MACreature(EntityType type, String name) {
|
||||
this.type = type;
|
||||
this.name = name;
|
||||
this.plural = null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user