MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / setPosition

Method setPosition

src/main/java/net/minecraft/entity/Entity.java:384–392  ·  view source on GitHub ↗

Sets the x,y,z of the entity from the given parameters. Also seems to set up a bounding box.

(double x, double y, double z)

Source from the content-addressed store, hash-verified

382 * Sets the x,y,z of the entity from the given parameters. Also seems to set up a bounding box.
383 */
384 public void setPosition(double x, double y, double z)
385 {
386 this.posX = x;
387 this.posY = y;
388 this.posZ = z;
389 float f = this.width / 2.0F;
390 float f1 = this.height;
391 this.setEntityBoundingBox(new AxisAlignedBB(x - (double)f, y, z - (double)f, x + (double)f, y + (double)f1, z + (double)f));
392 }
393
394 /**
395 * Adds 15% to the entity's yaw and subtracts 15% from the pitch. Clamps pitch from -90 to 90. Both arguments in

Callers 6

EntityMethod · 0.95
preparePlayerToSpawnMethod · 0.95
setLocationAndAnglesMethod · 0.95
readFromNBTMethod · 0.95

Calls 1

setEntityBoundingBoxMethod · 0.95

Tested by

no test coverage detected