Returns if this entity is in water and will end up adding the waters velocity to the entity
()
| 1128 | * Returns if this entity is in water and will end up adding the waters velocity to the entity |
| 1129 | */ |
| 1130 | public boolean handleWaterMovement() |
| 1131 | { |
| 1132 | if (this.worldObj.handleMaterialAcceleration(this.getEntityBoundingBox().expand(0.0D, -0.4000000059604645D, 0.0D).contract(0.001D, 0.001D, 0.001D), Material.water, this)) |
| 1133 | { |
| 1134 | if (!this.inWater && !this.firstUpdate) |
| 1135 | { |
| 1136 | this.resetHeight(); |
| 1137 | } |
| 1138 | |
| 1139 | this.fallDistance = 0.0F; |
| 1140 | this.inWater = true; |
| 1141 | this.fire = 0; |
| 1142 | } |
| 1143 | else |
| 1144 | { |
| 1145 | this.inWater = false; |
| 1146 | } |
| 1147 | |
| 1148 | return this.inWater; |
| 1149 | } |
| 1150 | |
| 1151 | /** |
| 1152 | * sets the players height back to normal after doing things like sleeping and dieing |
no test coverage detected