Skip to content

Commit

Permalink
Fix indent
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexProgrammerDE committed Oct 11, 2024
1 parent 9bfe023 commit 6e80adc
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions server/src/main/java/com/soulfiremc/server/data/AttributeType.java
Original file line number Diff line number Diff line change
@@ -25,9 +25,9 @@
@With(value = AccessLevel.PRIVATE)
public record AttributeType(int id, Key key, double min, double max, double defaultValue,
boolean clientSyncable) implements RegistryValue<AttributeType> {
public static final Registry<AttributeType> REGISTRY = new Registry<>(RegistryKeys.ATTRIBUTE);
public static final Registry<AttributeType> REGISTRY = new Registry<>(RegistryKeys.ATTRIBUTE);

//@formatter:off
//@formatter:off
public static final AttributeType ARMOR = register("minecraft:generic.armor");
public static final AttributeType ARMOR_TOUGHNESS = register("minecraft:generic.armor_toughness");
public static final AttributeType ATTACK_DAMAGE = register("minecraft:generic.attack_damage");
@@ -61,26 +61,26 @@ public record AttributeType(int id, Key key, double min, double max, double defa
public static final AttributeType WATER_MOVEMENT_EFFICIENCY = register("minecraft:generic.water_movement_efficiency");
//@formatter:on

public static AttributeType register(String key) {
var instance =
GsonDataHelper.fromJson("minecraft/attributes.json", key, AttributeType.class);
public static AttributeType register(String key) {
var instance =
GsonDataHelper.fromJson("minecraft/attributes.json", key, AttributeType.class);

return REGISTRY.register(instance);
}
return REGISTRY.register(instance);
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof AttributeType other)) {
return false;
}
return id == other.id;
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}

@Override
public int hashCode() {
return id;
if (!(o instanceof AttributeType other)) {
return false;
}
return id == other.id;
}

@Override
public int hashCode() {
return id;
}
}

0 comments on commit 6e80adc

Please sign in to comment.