Class EntityRidingOffsetsPre1_20_2
java.lang.Object
com.viaversion.viafabricplus.features.entity.dimensions.EntityRidingOffsetsPre1_20_2
Minecraft 1.20.2 changed the calculation of the mounted height offset for all entities, this class contains the old
values for all entities. This class is used for 1.20.1 and lower.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doublegetHeightOffset(net.minecraft.world.entity.Entity entity) Returns the height offset for the given entity.static net.minecraft.world.phys.Vec3getMountedHeightOffset(net.minecraft.world.entity.Entity entity, net.minecraft.world.entity.Entity passenger) Returns the mounted height offset for the given entity and passenger.
-
Constructor Details
-
EntityRidingOffsetsPre1_20_2
public EntityRidingOffsetsPre1_20_2()
-
-
Method Details
-
getMountedHeightOffset
public static net.minecraft.world.phys.Vec3 getMountedHeightOffset(net.minecraft.world.entity.Entity entity, net.minecraft.world.entity.Entity passenger) Returns the mounted height offset for the given entity and passenger. This method is used for 1.20.1 and lower.- Parameters:
entity- The entity to get the mounted height offset for.passenger- The passenger of the entity.- Returns:
- The mounted height offset.
-
getHeightOffset
public static double getHeightOffset(net.minecraft.world.entity.Entity entity) Returns the height offset for the given entity. This method is used for 1.20.1 and lower.- Parameters:
entity- The entity to get the height offset for.- Returns:
- The height offset.
-