public abstract class AbstractMinecartEntity extends Entity
Modifier and Type | Class and Description |
---|---|
static class |
AbstractMinecartEntity.Type |
Entity.PositionUpdater
Modifier and Type | Field and Description |
---|---|
private static Map<RailShape,com.mojang.datafixers.util.Pair<Vec3i,Vec3i>> |
ADJACENT_RAIL_POSITIONS_BY_SHAPE |
private int |
clientInterpolationSteps |
private double |
clientPitch |
private double |
clientX |
private double |
clientXVelocity |
private double |
clientY |
private double |
clientYaw |
private double |
clientYVelocity |
private double |
clientZ |
private double |
clientZVelocity |
private static TrackedData<Integer> |
CUSTOM_BLOCK_ID |
private static TrackedData<Integer> |
CUSTOM_BLOCK_OFFSET |
private static TrackedData<Boolean> |
CUSTOM_BLOCK_PRESENT |
private static TrackedData<Integer> |
DAMAGE_WOBBLE_SIDE |
private static TrackedData<Float> |
DAMAGE_WOBBLE_STRENGTH |
private static TrackedData<Integer> |
DAMAGE_WOBBLE_TICKS |
private static ImmutableMap<EntityPose,ImmutableList<Integer>> |
DISMOUNT_FREE_Y_SPACES_NEEDED |
private boolean |
yawFlipped |
age, chunkX, chunkY, chunkZ, dataTracker, distanceTraveled, fallDistance, field_25599, firstUpdate, FLAGS, fluidHeight, glowing, horizontalCollision, horizontalSpeed, ignoreCameraFrustum, inanimate, inNetherPortal, lastNetherPortalPosition, lastRenderX, lastRenderY, lastRenderZ, LOGGER, movementMultiplier, netherPortalTime, noClip, onGround, pitch, POSE, prevHorizontalSpeed, prevPitch, prevX, prevY, prevYaw, prevZ, pushSpeedReduction, random, removed, ridingCooldown, stepHeight, submergedInWater, teleporting, timeUntilRegen, touchingWater, updateNeeded, uuid, uuidString, velocityDirty, velocityModified, verticalCollision, world, yaw
DUMMY
Modifier | Constructor and Description |
---|---|
protected |
AbstractMinecartEntity(EntityType<?> type,
World world) |
protected |
AbstractMinecartEntity(EntityType<?> type,
World world,
double x,
double y,
double z) |
Modifier and Type | Method and Description |
---|---|
void |
animateDamage() |
protected void |
applySlowdown() |
protected boolean |
canClimb() |
boolean |
collides() |
boolean |
collidesWith(Entity other) |
static AbstractMinecartEntity |
create(World world,
double x,
double y,
double z,
AbstractMinecartEntity.Type type) |
Packet<?> |
createSpawnPacket() |
boolean |
damage(DamageSource source,
float amount) |
void |
dropItems(DamageSource damageSource) |
private static com.mojang.datafixers.util.Pair<Vec3i,Vec3i> |
getAdjacentRailPositionsByShape(RailShape shape) |
int |
getBlockOffset() |
BlockState |
getContainedBlock() |
int |
getDamageWobbleSide() |
float |
getDamageWobbleStrength() |
int |
getDamageWobbleTicks() |
int |
getDefaultBlockOffset() |
BlockState |
getDefaultContainedBlock() |
protected double |
getMaxOffRailSpeed() |
abstract AbstractMinecartEntity.Type |
getMinecartType() |
double |
getMountedHeightOffset() |
Direction |
getMovementDirection() |
protected float |
getVelocityMultiplier() |
Box |
getVisibilityBoundingBox() |
boolean |
hasCustomBlock() |
protected void |
initDataTracker() |
boolean |
isPushable() |
protected Vec3d |
method_30633(Direction.Axis axis,
class_5459.class_5460 class_5460) |
protected void |
moveOffRail() |
protected void |
moveOnRail(BlockPos pos,
BlockState state) |
void |
onActivatorRail(int x,
int y,
int z,
boolean powered) |
void |
pushAwayFrom(Entity entity) |
protected void |
readCustomDataFromTag(CompoundTag tag) |
void |
setCustomBlock(BlockState state) |
void |
setCustomBlockOffset(int offset) |
void |
setCustomBlockPresent(boolean present) |
void |
setDamageWobbleSide(int wobbleSide) |
void |
setDamageWobbleStrength(float float2) |
void |
setDamageWobbleTicks(int wobbleTicks) |
void |
setVelocityClient(double x,
double y,
double z) |
Vec3d |
snapPositionToRail(double x,
double y,
double z) |
Vec3d |
snapPositionToRailWithOffset(double x,
double y,
double z,
double offset)
This method is used to determine the minecart's render orientation, by computing a position along the rail slightly before and slightly after the minecart's actual position.
|
void |
tick() |
Vec3d |
updatePassengerForDismount(LivingEntity passenger) |
void |
updateTrackedPositionAndAngles(double x,
double y,
double z,
float yaw,
float pitch,
int interpolationSteps,
boolean interpolate) |
private boolean |
willHitBlockAt(BlockPos pos) |
protected void |
writeCustomDataToTag(CompoundTag tag) |
addPassenger, addScoreboardTag, addVelocity, adjustMovementForCollisions, adjustMovementForCollisions, adjustMovementForPiston, adjustMovementForSneaking, adjustSingleAxisMovementForCollisions, afterSpawn, applyMirror, applyRotation, baseTick, bypassesLandingEffects, bypassesSteppingEffects, calculateBoundsForPose, calculateDimensions, calculateNextStepSoundDistance, canAddPassenger, canAvoidTraps, canBeRiddenInWater, canBeSpectated, canExplosionDestroyBlock, canFly, canStartRiding, canUsePortals, changeLookDirection, checkBlockCollision, checkDespawn, copyFrom, copyPositionAndRotation, dealDamage, destroy, detach, distanceTo, doesNotCollide, doesRenderOnFire, dropItem, dropItem, dropStack, dropStack, entityDataRequiresOperator, equals, equip, equipStack, extinguish, fall, fromTag, getAir, getArmorItems, getBlockPos, getBodyY, getBoundingBox, getBrightnessAtEyes, getBurningDuration, getCameraPosVec, getCommandSource, getCustomName, getDataTracker, getDefaultName, getDefaultNetherPortalCooldown, getDimensions, getDisplayName, getEffectiveExplosionResistance, getEntityId, getEntityName, getEntityWorld, getEyeHeight, getEyeHeight, getEyeY, getFireTicks, getFlag, getFluidHeight, getHeadYaw, getHeight, getHeightOffset, getHighSpeedSplashSound, getHorizontalFacing, getHoverEvent, getItemsEquipped, getItemsHand, getJumpVelocityMultiplier, getLandingBlockState, getLandingPos, getMaxAir, getMaxNetherPortalTime, getName, getOppositeRotationVector, getOppositeRotationVector, getParticleX, getParticleZ, getPassengerDismountOffset, getPassengerList, getPassengersDeep, getPermissionLevel, getPistonBehavior, getPitch, getPos, getPose, getPrimaryPassenger, getRandomBodyY, getRenderDistanceMultiplier, getRootVehicle, getRotationClient, getRotationVec, getRotationVecClient, getRotationVector, getRotationVector, getSafeFallDistance, getSavedEntityId, getScoreboardTags, getScoreboardTeam, getServer, getSoundCategory, getSplashSound, getStandingEyeHeight, getSwimSound, getTargetingMargin, getTeamColorValue, getTeleportTarget, getTrackedPosition, getType, getUuid, getUuidAsString, getVehicle, getVelocity, getVelocityAffectingPos, getWidth, getX, getY, getYaw, getZ, handleAttack, handleFallDamage, handleStatus, hasCustomName, hashCode, hasNetherPortalCooldown, hasNoGravity, hasPassenger, hasPassengerDeep, hasPassengers, hasPassengerType, hasPermissionLevel, hasPlayerRider, hasVehicle, hasWings, interact, interactAt, isAlive, isAttackable, isChunkPosUpdateRequested, isCollidable, isConnectedThroughVehicle, isCustomNameVisible, isDescending, isFireImmune, isGlowing, isImmuneToExplosion, isInLava, isInRange, isInsideWall, isInsideWaterOrBubbleColumn, isInSneakingPose, isInSwimmingPose, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isLiving, isLogicalSideForUpdatingMovement, isOnFire, isOnGround, isPartOf, isSilent, isSneaking, isSneaky, isSpectator, isSprinting, isSubmergedIn, isSubmergedInWater, isSwimming, isTeammate, isTeamPlayer, isTouchingWater, isTouchingWaterOrRain, isWet, kill, lookAt, method_29239, method_29241, method_29919, method_30076, method_30330, method_30632, method_30634, method_30950, method_30951, method_31166, move, moveToBoundingBoxCenter, moveToWorld, offsetX, offsetZ, onBlockCollision, onBubbleColumnCollision, onBubbleColumnSurfaceCollision, onKilledOther, onPassengerLookAround, onPlayerCollision, onStartedTrackingBy, onStoppedTrackingBy, onStruckByLightning, onSwimmingStart, onTrackedDataSet, playFlySound, playSound, playStepSound, playSwimSound, populateCrashReport, pushOutOfBlocks, raycast, refreshPosition, refreshPositionAfterTeleport, refreshPositionAfterTeleport, refreshPositionAndAngles, refreshPositionAndAngles, remove, removeAllPassengers, removePassenger, removeScoreboardTag, requestTeleport, resetNetherPortalCooldown, resetPosition, saveSelfToTag, saveToTag, scheduleVelocityUpdate, sendSystemMessage, setAir, setBoundingBox, setCustomName, setCustomNameVisible, setEntityId, setFireTicks, setFlag, setGlowing, setHeadYaw, setInNetherPortal, setInvisible, setInvulnerable, setNoGravity, setOnFireFor, setOnFireFromLava, setOnGround, setPos, setPose, setRenderDistanceMultiplier, setRotation, setSilent, setSneaking, setSprinting, setSwimming, setUuid, setVelocity, setVelocity, setWorld, setYaw, shouldBroadcastConsoleToOps, shouldLeaveSwimmingPose, shouldReceiveFeedback, shouldRender, shouldRender, shouldRenderName, shouldSetPositionOnLoad, shouldSpawnSprintingParticles, shouldTrackOutput, slowMovement, spawnSprintingParticles, squaredDistanceTo, squaredDistanceTo, squaredDistanceTo, squaredHorizontalLength, startRiding, startRiding, stopRiding, streamPassengersRecursively, teleport, teleportRequested, tickNetherPortal, tickNetherPortalCooldown, tickRiding, toListTag, toListTag, toString, toTag, updateKilledAdvancementCriterion, updateMovementInFluid, updatePassengerPosition, updatePosition, updatePositionAndAngles, updateSwimming, updateTrackedHeadRotation, updateTrackedPosition, updateTrackedPosition, updateVelocity, updateWaterState, wouldPoseNotCollide
private static final TrackedData<Integer> DAMAGE_WOBBLE_TICKS
private static final TrackedData<Integer> DAMAGE_WOBBLE_SIDE
private static final TrackedData<Float> DAMAGE_WOBBLE_STRENGTH
private static final TrackedData<Integer> CUSTOM_BLOCK_ID
private static final TrackedData<Integer> CUSTOM_BLOCK_OFFSET
private static final TrackedData<Boolean> CUSTOM_BLOCK_PRESENT
private static final ImmutableMap<EntityPose,ImmutableList<Integer>> DISMOUNT_FREE_Y_SPACES_NEEDED
private static final Map<RailShape,com.mojang.datafixers.util.Pair<Vec3i,Vec3i>> ADJACENT_RAIL_POSITIONS_BY_SHAPE
private boolean yawFlipped
private int clientInterpolationSteps
private double clientX
private double clientY
private double clientZ
private double clientYaw
private double clientPitch
@Environment(value=CLIENT) private double clientXVelocity
@Environment(value=CLIENT) private double clientYVelocity
@Environment(value=CLIENT) private double clientZVelocity
protected AbstractMinecartEntity(EntityType<?> type, World world)
protected AbstractMinecartEntity(EntityType<?> type, World world, double x, double y, double z)
public static AbstractMinecartEntity create(World world, double x, double y, double z, AbstractMinecartEntity.Type type)
protected void initDataTracker()
initDataTracker
in class Entity
public boolean collidesWith(Entity other)
collidesWith
in class Entity
public boolean isPushable()
isPushable
in class Entity
protected Vec3d method_30633(Direction.Axis axis, class_5459.class_5460 class_5460)
method_30633
in class Entity
public double getMountedHeightOffset()
getMountedHeightOffset
in class Entity
public Vec3d updatePassengerForDismount(LivingEntity passenger)
updatePassengerForDismount
in class Entity
public boolean damage(DamageSource source, float amount)
protected float getVelocityMultiplier()
getVelocityMultiplier
in class Entity
public void dropItems(DamageSource damageSource)
@Environment(value=CLIENT) public void animateDamage()
animateDamage
in class Entity
private static com.mojang.datafixers.util.Pair<Vec3i,Vec3i> getAdjacentRailPositionsByShape(RailShape shape)
public Direction getMovementDirection()
getMovementDirection
in class Entity
protected double getMaxOffRailSpeed()
public void onActivatorRail(int x, int y, int z, boolean powered)
protected void moveOffRail()
protected void moveOnRail(BlockPos pos, BlockState state)
private boolean willHitBlockAt(BlockPos pos)
protected void applySlowdown()
@Environment(value=CLIENT) @Nullable public Vec3d snapPositionToRailWithOffset(double x, double y, double z, double offset)
@Environment(value=CLIENT) public Box getVisibilityBoundingBox()
getVisibilityBoundingBox
in class Entity
protected void readCustomDataFromTag(CompoundTag tag)
readCustomDataFromTag
in class Entity
protected void writeCustomDataToTag(CompoundTag tag)
writeCustomDataToTag
in class Entity
public void pushAwayFrom(Entity entity)
pushAwayFrom
in class Entity
@Environment(value=CLIENT) public void updateTrackedPositionAndAngles(double x, double y, double z, float yaw, float pitch, int interpolationSteps, boolean interpolate)
updateTrackedPositionAndAngles
in class Entity
@Environment(value=CLIENT) public void setVelocityClient(double x, double y, double z)
setVelocityClient
in class Entity
public void setDamageWobbleStrength(float float2)
public float getDamageWobbleStrength()
public void setDamageWobbleTicks(int wobbleTicks)
public int getDamageWobbleTicks()
public void setDamageWobbleSide(int wobbleSide)
public int getDamageWobbleSide()
public abstract AbstractMinecartEntity.Type getMinecartType()
public BlockState getContainedBlock()
public BlockState getDefaultContainedBlock()
public int getBlockOffset()
public int getDefaultBlockOffset()
public void setCustomBlock(BlockState state)
public void setCustomBlockOffset(int offset)
public boolean hasCustomBlock()
public void setCustomBlockPresent(boolean present)
public Packet<?> createSpawnPacket()
createSpawnPacket
in class Entity