ForgePatch/patches/minecraft/net/minecraft/entity/SharedMonsterAttributes.jav...

12 lines
1.3 KiB
Diff

--- a/net/minecraft/entity/SharedMonsterAttributes.java
+++ b/net/minecraft/entity/SharedMonsterAttributes.java
@@ -15,7 +15,7 @@
public class SharedMonsterAttributes {
private static final Logger field_151476_f = LogManager.getLogger();
- public static final IAttribute field_111267_a = (new RangedAttribute((IAttribute)null, "generic.maxHealth", 20.0D, 0.0D, 1024.0D)).func_111117_a("Max Health").func_111112_a(true);
+ public static final IAttribute field_111267_a = (new RangedAttribute((IAttribute)null, "generic.maxHealth", 20.0D, Float.MIN_VALUE, 1024.0D)).func_111117_a("Max Health").func_111112_a(true); // Forge: set smallest max-health value to fix MC-119183. This gets rounded to float so we use the smallest positive float value.
public static final IAttribute field_111265_b = (new RangedAttribute((IAttribute)null, "generic.followRange", 32.0D, 0.0D, 2048.0D)).func_111117_a("Follow Range");
public static final IAttribute field_111266_c = (new RangedAttribute((IAttribute)null, "generic.knockbackResistance", 0.0D, 0.0D, 1.0D)).func_111117_a("Knockback Resistance");
public static final IAttribute field_111263_d = (new RangedAttribute((IAttribute)null, "generic.movementSpeed", (double)0.7F, 0.0D, 1024.0D)).func_111117_a("Movement Speed").func_111112_a(true);