mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-31 21:48:08 +01:00
Made autogenerated fields final
This commit is contained in:
parent
7db7dab4b9
commit
c8d0b783d8
@ -340,21 +340,21 @@ public enum EntityType {
|
||||
private static final EntityType[] VALUES = values();
|
||||
|
||||
@NotNull
|
||||
private String namespaceID;
|
||||
private final String namespaceID;
|
||||
|
||||
private double width;
|
||||
private final double width;
|
||||
|
||||
private double height;
|
||||
private final double height;
|
||||
|
||||
@NotNull
|
||||
private BiFunction<Entity, Metadata, EntityMeta> metaConstructor;
|
||||
private final BiFunction<Entity, Metadata, EntityMeta> metaConstructor;
|
||||
|
||||
@NotNull
|
||||
private EntitySpawnType spawnType;
|
||||
private final EntitySpawnType spawnType;
|
||||
|
||||
EntityType(@NotNull final String namespaceID, final double width, final double height,
|
||||
@NotNull final BiFunction<Entity, Metadata, EntityMeta> metaConstructor,
|
||||
@NotNull final EntitySpawnType spawnType) {
|
||||
EntityType(@NotNull String namespaceID, double width, double height,
|
||||
@NotNull BiFunction<Entity, Metadata, EntityMeta> metaConstructor,
|
||||
@NotNull EntitySpawnType spawnType) {
|
||||
this.namespaceID = namespaceID;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
|
@ -95,7 +95,7 @@ public class EnumGenerator implements CodeGenerator {
|
||||
// properties
|
||||
for (ParameterSpec property : parameters) {
|
||||
enumClass.addField(FieldSpec.builder(property.type, property.name)
|
||||
.addModifiers(Modifier.PRIVATE)
|
||||
.addModifiers(Modifier.PRIVATE, Modifier.FINAL)
|
||||
.addAnnotations(property.annotations)
|
||||
.build());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user