Class NewMinecartBehavior
java.lang.Object
net.minecraft.world.entity.vehicle.MinecartBehavior
net.minecraft.world.entity.vehicle.NewMinecartBehavior
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record(package private) static final record(package private) static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate floatdoubleprivate intstatic final doublestatic final doublestatic final intFields inherited from class net.minecraft.world.entity.vehicle.MinecartBehavior
minecart -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadjustToRails(BlockPos pos, BlockState state, boolean snapToStart) private Vec3calculateBoostTrackSpeed(Vec3 speed, BlockPos pos, BlockState state) private Vec3calculateHaltTrackSpeed(Vec3 speed, BlockState state) private Vec3calculatePlayerInputSpeed(Vec3 speed) private Vec3calculateSlopeSpeed(Vec3 speed, RailShape railShape) private Vec3calculateTrackSpeed(ServerLevel level, Vec3 speed, NewMinecartBehavior.TrackIteration trackIteration, BlockPos pos, BlockState state, RailShape railShape) booleangetCartLerpMovements(float partialTick) getCartLerpPosition(float partialTick) floatgetCartLerpXRot(float partialTick) floatgetCartLerpYRot(float partialTick) getCurrentLerpStep(float partialTick) doublegetMaxSpeed(ServerLevel p_376456_) doubleprivate booleanisDecending(Vec3 speed, RailShape railShape) private voidvoidmoveAlongTrack(ServerLevel p_376236_) booleanpickupEntities(AABB box) booleanbooleanpushEntities(AABB box) private booleanrestAtVShape(RailShape shape1, RailShape shape2) voidprivate voidsetRotation(float yRot, float xRot) doublestepAlongTrack(BlockPos p_362592_, RailShape p_361660_, double p_361219_) voidtick()Methods inherited from class net.minecraft.world.entity.vehicle.MinecartBehavior
getDeltaMovement, getInterpolation, getKnownMovement, getMotionDirection, getX, getXRot, getY, getYRot, getZ, lerpMotion, level, position, setDeltaMovement, setDeltaMovement, setPos, setPos, setXRot, setYRot
-
Field Details
-
POS_ROT_LERP_TICKS
public static final int POS_ROT_LERP_TICKS- See Also:
-
ON_RAIL_Y_OFFSET
public static final double ON_RAIL_Y_OFFSET- See Also:
-
OPPOSING_SLOPES_REST_AT_SPEED_THRESHOLD
public static final double OPPOSING_SLOPES_REST_AT_SPEED_THRESHOLD- See Also:
-
cacheIndexAlpha
-
cachedLerpDelay
private int cachedLerpDelay -
cachedPartialTick
private float cachedPartialTick -
lerpDelay
private int lerpDelay -
lerpSteps
-
currentLerpSteps
-
currentLerpStepsTotalWeight
public double currentLerpStepsTotalWeight -
oldLerp
-
-
Constructor Details
-
NewMinecartBehavior
-
-
Method Details
-
tick
public void tick()- Specified by:
tickin classMinecartBehavior
-
lerpClientPositionAndRotation
private void lerpClientPositionAndRotation() -
setOldLerpValues
public void setOldLerpValues() -
cartHasPosRotLerp
public boolean cartHasPosRotLerp() -
getCartLerpXRot
public float getCartLerpXRot(float partialTick) -
getCartLerpYRot
public float getCartLerpYRot(float partialTick) -
getCartLerpPosition
-
getCartLerpMovements
-
getCurrentLerpStep
-
adjustToRails
-
setRotation
private void setRotation(float yRot, float xRot) -
moveAlongTrack
- Specified by:
moveAlongTrackin classMinecartBehavior
-
calculateTrackSpeed
private Vec3 calculateTrackSpeed(ServerLevel level, Vec3 speed, NewMinecartBehavior.TrackIteration trackIteration, BlockPos pos, BlockState state, RailShape railShape) -
calculateSlopeSpeed
-
calculatePlayerInputSpeed
-
calculateHaltTrackSpeed
-
calculateBoostTrackSpeed
-
stepAlongTrack
- Specified by:
stepAlongTrackin classMinecartBehavior
-
restAtVShape
-
getMaxSpeed
- Specified by:
getMaxSpeedin classMinecartBehavior
-
isDecending
-
getSlowdownFactor
public double getSlowdownFactor()- Specified by:
getSlowdownFactorin classMinecartBehavior
-
pushAndPickupEntities
public boolean pushAndPickupEntities()- Specified by:
pushAndPickupEntitiesin classMinecartBehavior
-
pickupEntities
-
pushEntities
-