Package net.minecraft.entity.vehicle
Class AbstractMinecartEntity
java.lang.Object
net.minecraft.entity.Entity
net.minecraft.entity.vehicle.AbstractMinecartEntity
- All Implemented Interfaces:
CommandOutput,Nameable
- Direct Known Subclasses:
CommandBlockMinecartEntity,FurnaceMinecartEntity,MinecartEntity,SpawnerMinecartEntity,StorageMinecartEntity,TntMinecartEntity
public abstract class AbstractMinecartEntity extends Entity
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractMinecartEntity.Type -
Field Summary
Fields Modifier and Type Field Description private intclientInterpolationStepsprivate doubleclientPitchprivate doubleclientXprivate doubleclientXVelocityprivate doubleclientYprivate doubleclientYawprivate doubleclientYVelocityprivate doubleclientZprivate doubleclientZVelocityprivate static TrackedData<Integer>CUSTOM_BLOCK_IDprivate static TrackedData<Integer>CUSTOM_BLOCK_OFFSETprivate static TrackedData<Boolean>CUSTOM_BLOCK_PRESENTprivate static TrackedData<Integer>DAMAGE_WOBBLE_SIDEprivate static TrackedData<Float>DAMAGE_WOBBLE_STRENGTHprivate static TrackedData<Integer>DAMAGE_WOBBLE_TICKSprivate static ImmutableMap<EntityPose,ImmutableList<Integer>>field_24464private booleanfield_7660private static Map<RailShape,com.mojang.datafixers.util.Pair<Vec3i,Vec3i>>field_7664Fields inherited from class net.minecraft.entity.Entity
age, chunkX, chunkY, chunkZ, dataTracker, distanceTraveled, fallDistance, field_25599, firstUpdate, FLAGS, fluidHeight, glowing, horizontalCollision, horizontalSpeed, ignoreCameraFrustum, inanimate, inLava, inNetherPortal, lastNetherPortalDirection, lastNetherPortalDirectionVector, lastNetherPortalPosition, lastRenderX, lastRenderY, lastRenderZ, LOGGER, movementMultiplier, netherPortalCooldown, netherPortalTime, noClip, onGround, pitch, POSE, prevHorizontalSpeed, prevPitch, prevX, prevY, prevYaw, prevZ, pushSpeedReduction, random, removed, ridingCooldown, stepHeight, submergedInWater, teleporting, timeUntilRegen, touchingWater, trackedX, trackedY, trackedZ, updateNeeded, uuid, uuidString, velocityDirty, velocityModified, verticalCollision, world, yaw -
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractMinecartEntity(EntityType<?> type, World world)protectedAbstractMinecartEntity(EntityType<?> type, World world, double x, double y, double z) -
Method Summary
Modifier and Type Method Description voidanimateDamage()protected voidapplySlowdown()protected booleancanClimb()booleancollides()static AbstractMinecartEntitycreate(World world, double x, double y, double z, AbstractMinecartEntity.Type type)Packet<?>createSpawnPacket()booleandamage(DamageSource source, float amount)voiddropItems(DamageSource damageSource)intgetBlockOffset()BlockStategetContainedBlock()intgetDamageWobbleSide()floatgetDamageWobbleStrength()intgetDamageWobbleTicks()intgetDefaultBlockOffset()BlockStategetDefaultContainedBlock()BoxgetHardCollisionBox(Entity collidingEntity)protected doublegetMaxOffRailSpeed()abstract AbstractMinecartEntity.TypegetMinecartType()doublegetMountedHeightOffset()DirectiongetMovementDirection()protected floatgetVelocityMultiplier()BoxgetVisibilityBoundingBox()booleanhasCustomBlock()protected voidinitDataTracker()booleanisPushable()private static com.mojang.datafixers.util.Pair<Vec3i,Vec3i>method_22864(RailShape railShape)Vec3dmethod_7505(double double2, double double3, double double4, double double5)Vec3dmethod_7508(double double2, double double3, double double4)protected voidmoveOffRail()protected voidmoveOnRail(BlockPos pos, BlockState state)voidonActivatorRail(int x, int y, int z, boolean powered)voidpushAwayFrom(Entity entity)protected voidreadCustomDataFromTag(CompoundTag tag)voidsetCustomBlock(BlockState blockState)voidsetCustomBlockOffset(int int2)voidsetCustomBlockPresent(boolean bool)voidsetDamageWobbleSide(int wobbleSide)voidsetDamageWobbleStrength(float float2)voidsetDamageWobbleTicks(int wobbleTicks)voidsetVelocityClient(double x, double y, double z)voidtick()Vec3dupdatePassengerForDismount(LivingEntity passenger)voidupdateTrackedPositionAndAngles(double x, double y, double z, float yaw, float pitch, int interpolationSteps, boolean interpolate)private booleanwillHitBlockAt(BlockPos pos)protected voidwriteCustomDataToTag(CompoundTag tag)Methods inherited from class net.minecraft.entity.Entity
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, changeDimension, 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, getCollisionBox, 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, getLastNetherPortalDirection, getLastNetherPortalDirectionVector, 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, getType, getUuid, getUuidAsString, getVehicle, getVelocity, getVelocityAffectingPos, getWidth, getX, getY, getYaw, getZ, handleAttack, handleFallDamage, handleStatus, hasCustomName, hashCode, hasNoGravity, hasPassenger, hasPassengerDeep, hasPassengers, hasPassengerType, hasPermissionLevel, hasPlayerRider, hasVehicle, hasWings, interact, interactAt, isAlive, isAttackable, 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_29240, method_29241, method_29495, method_29919, method_30076, move, moveToBoundingBoxCenter, offsetX, offsetZ, onBlockCollision, onBubbleColumnCollision, onBubbleColumnSurfaceCollision, onKilledOther, onPassengerLookAround, onPlayerCollision, onStartedTrackingBy, onStoppedTrackingBy, onStruckByLightning, onSwimmingStart, onTrackedDataSet, playFlySound, playSound, playStepSound, playSwimSound, populateCrashReport, positAfterTeleport, pushOutOfBlocks, rayTrace, refreshPosition, refreshPositionAndAngles, refreshPositionAndAngles, remove, removeAllPassengers, removePassenger, removeScoreboardTag, requestTeleport, resetPosition, saveSelfToTag, saveToTag, scheduleVelocityUpdate, sendSystemMessage, setAir, setBoundingBox, setCustomName, setCustomNameVisible, setEntityId, setFireTicks, setFlag, setGlowing, setHeadYaw, setInLava, 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, updateVelocity, updateWaterState, wouldPoseNotCollide
-
Field Details
-
DAMAGE_WOBBLE_TICKS
-
DAMAGE_WOBBLE_SIDE
-
DAMAGE_WOBBLE_STRENGTH
-
CUSTOM_BLOCK_ID
-
CUSTOM_BLOCK_OFFSET
-
CUSTOM_BLOCK_PRESENT
-
field_24464
-
field_7664
-
field_7660
private boolean field_7660 -
clientInterpolationSteps
private int clientInterpolationSteps -
clientX
private double clientX -
clientY
private double clientY -
clientZ
private double clientZ -
clientYaw
private double clientYaw -
clientPitch
private double clientPitch -
clientXVelocity
@Environment(CLIENT) private double clientXVelocity -
clientYVelocity
@Environment(CLIENT) private double clientYVelocity -
clientZVelocity
@Environment(CLIENT) private double clientZVelocity
-
-
Constructor Details
-
Method Details
-
create
public static AbstractMinecartEntity create(World world, double x, double y, double z, AbstractMinecartEntity.Type type) -
canClimb
protected boolean canClimb() -
initDataTracker
protected void initDataTracker()- Specified by:
initDataTrackerin classEntity
-
getHardCollisionBox
- Overrides:
getHardCollisionBoxin classEntity
-
isPushable
public boolean isPushable()- Overrides:
isPushablein classEntity
-
getMountedHeightOffset
public double getMountedHeightOffset()- Overrides:
getMountedHeightOffsetin classEntity
-
updatePassengerForDismount
- Overrides:
updatePassengerForDismountin classEntity
-
damage
-
getVelocityMultiplier
protected float getVelocityMultiplier()- Overrides:
getVelocityMultiplierin classEntity
-
dropItems
-
animateDamage
@Environment(CLIENT) public void animateDamage()- Overrides:
animateDamagein classEntity
-
collides
public boolean collides() -
method_22864
-
getMovementDirection
- Overrides:
getMovementDirectionin classEntity
-
tick
public void tick() -
getMaxOffRailSpeed
protected double getMaxOffRailSpeed() -
onActivatorRail
public void onActivatorRail(int x, int y, int z, boolean powered) -
moveOffRail
protected void moveOffRail() -
moveOnRail
-
willHitBlockAt
-
applySlowdown
protected void applySlowdown() -
method_7505
-
method_7508
-
getVisibilityBoundingBox
- Overrides:
getVisibilityBoundingBoxin classEntity
-
readCustomDataFromTag
- Specified by:
readCustomDataFromTagin classEntity
-
writeCustomDataToTag
- Specified by:
writeCustomDataToTagin classEntity
-
pushAwayFrom
- Overrides:
pushAwayFromin classEntity
-
updateTrackedPositionAndAngles
@Environment(CLIENT) public void updateTrackedPositionAndAngles(double x, double y, double z, float yaw, float pitch, int interpolationSteps, boolean interpolate)- Overrides:
updateTrackedPositionAndAnglesin classEntity
-
setVelocityClient
@Environment(CLIENT) public void setVelocityClient(double x, double y, double z)- Overrides:
setVelocityClientin classEntity
-
setDamageWobbleStrength
public void setDamageWobbleStrength(float float2) -
getDamageWobbleStrength
public float getDamageWobbleStrength() -
setDamageWobbleTicks
public void setDamageWobbleTicks(int wobbleTicks) -
getDamageWobbleTicks
public int getDamageWobbleTicks() -
setDamageWobbleSide
public void setDamageWobbleSide(int wobbleSide) -
getDamageWobbleSide
public int getDamageWobbleSide() -
getMinecartType
-
getContainedBlock
-
getDefaultContainedBlock
-
getBlockOffset
public int getBlockOffset() -
getDefaultBlockOffset
public int getDefaultBlockOffset() -
setCustomBlock
-
setCustomBlockOffset
public void setCustomBlockOffset(int int2) -
hasCustomBlock
public boolean hasCustomBlock() -
setCustomBlockPresent
public void setCustomBlockPresent(boolean bool) -
createSpawnPacket
- Specified by:
createSpawnPacketin classEntity
-