Sets the width and height of the entity. Args: width, height
(float width, float height)
| 354 | * Sets the width and height of the entity. Args: width, height |
| 355 | */ |
| 356 | protected void setSize(float width, float height) |
| 357 | { |
| 358 | if (width != this.width || height != this.height) |
| 359 | { |
| 360 | float f = this.width; |
| 361 | this.width = width; |
| 362 | this.height = height; |
| 363 | this.setEntityBoundingBox(new AxisAlignedBB(this.getEntityBoundingBox().minX, this.getEntityBoundingBox().minY, this.getEntityBoundingBox().minZ, this.getEntityBoundingBox().minX + (double)this.width, this.getEntityBoundingBox().minY + (double)this.height, this.getEntityBoundingBox().minZ + (double)this.width)); |
| 364 | |
| 365 | if (this.width > f && !this.firstUpdate && !this.worldObj.isRemote) |
| 366 | { |
| 367 | this.moveEntity(f - this.width, 0.0D, f - this.width); |
| 368 | } |
| 369 | } |
| 370 | } |
| 371 | |
| 372 | /** |
| 373 | * Sets the rotation of the entity. Args: yaw, pitch (both in degrees) |
no test coverage detected