Skip to content

Commit ec71d9f

Browse files
committed
Make damage data types consistent.
1 parent 9082505 commit ec71d9f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ yarn_mappings=1.20.1+build.10
99
loader_version=0.15.2
1010

1111
# Mod Properties
12-
mod_version=0.5.2
12+
mod_version=0.5.3
1313
maven_group=com.provismet
1414
archives_base_name=combatplus-core
1515

1616
# Dependencies
1717
fabric_version=0.91.0+1.20.1
1818
fabric_asm_version=v2.3
19-
lilylib_version=1.1.0-mc1.20
19+
lilylib_version=1.1.1-mc1.20

src/main/java/com/provismet/CombatPlusCore/interfaces/DualWeapon.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
import com.provismet.CombatPlusCore.enchantments.OffHandEnchantment;
44
import com.provismet.lilylib.util.MoreMath;
55

6-
import net.minecraft.util.math.MathHelper;
7-
86
/**
97
* Interface for melee weapons that can be held in either hand.
108
*
119
* <p> Dual weapons are applicable for {@link OffHandEnchantment} by default.
1210
*/
1311
public interface DualWeapon extends MeleeWeapon {
14-
public default double getOffhandDamage () {
15-
return MathHelper.absMax(0.5, MoreMath.roundDownToMultiple(this.getWeaponDamage() / 3.5, 0.5));
12+
public default float getOffhandDamage () {
13+
float defaultValue = (float)MoreMath.roundDownToMultiple(this.getWeaponDamage() / 3.5f, 0.5);
14+
if (defaultValue > 0.5f) return defaultValue;
15+
return 0.5f;
1616
}
1717
}

0 commit comments

Comments
 (0)