Commits
md_5 authored 33071ecfffa
110 110 | Validate.isTrue(amount > 0, "Max health must be greater than 0"); |
111 111 | |
112 112 | getHandle().getAttributeInstance(GenericAttributes.maxHealth).setValue(amount); |
113 113 | |
114 114 | if (getHealth() > amount) { |
115 115 | setHealth(amount); |
116 116 | } |
117 117 | } |
118 118 | |
119 119 | public void resetMaxHealth() { |
120 - | setMaxHealth(getHandle().getMaxHealth()); |
120 + | setMaxHealth(getHandle().getAttributeInstance(GenericAttributes.maxHealth).getAttribute().b()); // PAIL: getDefault |
121 121 | } |
122 122 | |
123 123 | public double getEyeHeight() { |
124 124 | return getHandle().getHeadHeight(); |
125 125 | } |
126 126 | |
127 127 | public double getEyeHeight(boolean ignoreSneaking) { |
128 128 | return getEyeHeight(); |
129 129 | } |
130 130 | |