A few entity methods (#2082)

Signed-off-by: liach <liach@users.noreply.github.com>

Co-authored-by: liach <liach@users.noreply.github.com>
This commit is contained in:
liach 2021-02-27 04:57:00 -06:00 committed by GitHub
parent ec3597979c
commit 3e16e8ee13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 1 deletions

View File

@ -240,6 +240,19 @@ CLASS net/minecraft/class_1297 net/minecraft/entity/Entity
COMMENT For players, will not trigger any networking changes. Use {@link #stopRiding()} instead.
COMMENT
COMMENT @see #stopRiding()
METHOD method_29241 getSwimHeight ()D
COMMENT Returns the minimum submerged height of this entity in fluid so that it
COMMENT would be affected by fluid physics.
COMMENT
COMMENT @apiNote This is also used by living entities for checking whether to
COMMENT start swimming.
COMMENT
COMMENT @implSpec This implementation returns {@code 0.4} if its
COMMENT {@linkplain #getStandingEyeHeight standing eye height} is larger than
COMMENT {@code 0.4}; otherwise it returns {@code 0.0} for shorter entities.
COMMENT
COMMENT @implNote The swim height of 0 allows short entities like baby animals
COMMENT to start swimming to avoid suffocation.
METHOD method_29495 refreshPositionAfterTeleport (Lnet/minecraft/class_243;)V
ARG 1 pos
METHOD method_30076 removeFromDimension ()V
@ -342,6 +355,14 @@ CLASS net/minecraft/class_1297 net/minecraft/entity/Entity
COMMENT
COMMENT <p>This is only called when the entity {@linkplain #getMoveEffect() has
COMMENT any move effect}, from {@link #move(MovementType, Vec3d)}
METHOD method_33575 getCameraBlockPos ()Lnet/minecraft/class_2338;
METHOD method_33724 isRegionUnloaded ()Z
COMMENT Returns whether any part of this entity's bounding box is in an unloaded
COMMENT region of the world the entity is in.
COMMENT
COMMENT @implSpec This implementation expands this entity's bounding box by 1 in
COMMENT each axis and checks whether the expanded box's smallest enclosing
COMMENT axis-aligned integer box is fully loaded in the world.
METHOD method_5621 getMountedHeightOffset ()D
METHOD method_5622 onBlockCollision (Lnet/minecraft/class_2680;)V
ARG 1 state

View File

@ -1,4 +1,4 @@
CLASS net/minecraft/class_4125 net/minecraft/entity/ai/brain/task/StayAboveWaterTask
FIELD field_18387 chance F
METHOD <init> (F)V
ARG 1 minWaterHeight
ARG 1 chance