diff --git a/paper-api/src/main/java/io/papermc/paper/registry/data/DamageTypeRegistryEntry.java b/paper-api/src/main/java/io/papermc/paper/registry/data/DamageTypeRegistryEntry.java index 51c27fa7fe..8564adf8b1 100644 --- a/paper-api/src/main/java/io/papermc/paper/registry/data/DamageTypeRegistryEntry.java +++ b/paper-api/src/main/java/io/papermc/paper/registry/data/DamageTypeRegistryEntry.java @@ -31,7 +31,7 @@ public interface DamageTypeRegistryEntry { * * @return the exhaustion */ - Float exhaustion(); + float exhaustion(); /** * Provides the {@link DamageScaling} for this damage type. @@ -45,16 +45,14 @@ public interface DamageTypeRegistryEntry { * * @return the damage effect */ - @Nullable - DamageEffect damageEffect(); + @Nullable DamageEffect damageEffect(); /** * Provides the {@link DeathMessageType} for this damage type. * * @return the death message type */ - @Nullable - DeathMessageType deathMessageType(); + @Nullable DeathMessageType deathMessageType(); @ApiStatus.Experimental @ApiStatus.NonExtendable @@ -77,7 +75,7 @@ public interface DamageTypeRegistryEntry { * @see DamageType#getExhaustion() */ @Contract(value = "_ -> this", mutates = "this") - Builder exhaustion(Float exhaustion); + Builder exhaustion(float exhaustion); /** * Sets the {@link DamageScaling} for this damage type. diff --git a/paper-server/src/main/java/io/papermc/paper/registry/data/PaperDamageTypeRegistryEntry.java b/paper-server/src/main/java/io/papermc/paper/registry/data/PaperDamageTypeRegistryEntry.java index e5271645ba..e35af60ff6 100644 --- a/paper-server/src/main/java/io/papermc/paper/registry/data/PaperDamageTypeRegistryEntry.java +++ b/paper-server/src/main/java/io/papermc/paper/registry/data/PaperDamageTypeRegistryEntry.java @@ -12,7 +12,7 @@ import static io.papermc.paper.registry.data.util.Checks.asConfigured; public class PaperDamageTypeRegistryEntry implements DamageTypeRegistryEntry { protected @Nullable String messageId; - protected @Nullable Float exhaustion; + protected float exhaustion; protected @Nullable DamageScaling damageScaling; protected @Nullable DamageEffects damageEffects; protected @Nullable DeathMessageType deathMessageType; @@ -39,8 +39,8 @@ public class PaperDamageTypeRegistryEntry implements DamageTypeRegistryEntry { } @Override - public Float exhaustion() { - return asConfigured(exhaustion, "exhaustion"); + public float exhaustion() { + return exhaustion; } @Override @@ -71,7 +71,7 @@ public class PaperDamageTypeRegistryEntry implements DamageTypeRegistryEntry { } @Override - public Builder exhaustion(Float exhaustion) { + public Builder exhaustion(float exhaustion) { this.exhaustion = exhaustion; return this; } @@ -100,20 +100,20 @@ public class PaperDamageTypeRegistryEntry implements DamageTypeRegistryEntry { return new DamageType( asConfigured(this.messageId, "messsageId"), asConfigured(this.damageScaling, "scaling"), - asConfigured(this.exhaustion, "exhaustion"), + this.exhaustion, this.damageEffects, this.deathMessageType); } else if (this.damageEffects != null) { return new DamageType( asConfigured(this.messageId, "messsageId"), asConfigured(this.damageScaling, "scaling"), - asConfigured(this.exhaustion, "exhaustion"), + this.exhaustion, this.damageEffects); } else { return new DamageType( asConfigured(this.messageId, "messsageId"), asConfigured(this.damageScaling, "scaling"), - asConfigured(this.exhaustion, "exhaustion") + this.exhaustion ); } }