Package net.minecraft.entity.vehicle
Class VehicleEntity
java.lang.Object
net.minecraft.entity.Entity
net.minecraft.entity.vehicle.VehicleEntity
- All Implemented Interfaces:
DataTracked,ScoreHolder,Nameable,EntityLike
- Direct Known Subclasses:
AbstractBoatEntity,AbstractMinecartEntity
- Mappings:
Namespace Name named net/minecraft/entity/vehicle/VehicleEntityintermediary net/minecraft/class_8836official crp
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.Entity
Entity.MoveEffect, Entity.PositionUpdater, Entity.RemovalReason -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final TrackedData<Integer> protected static final TrackedData<Float> protected static final TrackedData<Integer> Fields inherited from class net.minecraft.entity.Entity
age, collidedSoftly, dataTracker, DEFAULT_FRICTION, DEFAULT_MIN_FREEZE_DAMAGE_TICKS, DEFAULT_PORTAL_COOLDOWN, distanceTraveled, fallDistance, field_44870, field_44871, field_44872, field_49073, field_49791, firstUpdate, FLAGS, fluidHeight, FREEZING_DAMAGE_INTERVAL, GLIDING_FLAG_INDEX, GLOWING_FLAG_INDEX, groundCollision, horizontalCollision, ID_KEY, inPowderSnow, intersectionChecked, lastRenderX, lastRenderY, lastRenderZ, MAX_COMMAND_TAGS, MAX_RIDING_COOLDOWN, MIN_RISING_BUBBLE_COLUMN_SPEED, movementMultiplier, noClip, ON_FIRE_FLAG_INDEX, PASSENGERS_KEY, portalManager, POSE, prevPitch, prevX, prevY, prevYaw, prevZ, random, ridingCooldown, speed, submergedInWater, supportingBlockPos, timeUntilRegen, touchingWater, uuid, UUID_KEY, uuidString, velocityDirty, velocityModified, verticalCollision, wasInPowderSnowFields inherited from interface net.minecraft.scoreboard.ScoreHolder
WILDCARD, WILDCARD_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ItemasItem()booleanclientDamage(DamageSource source) booleandamage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.intfloatintintReturns the entity's default portal cooldown.protected voidinitDataTracker(DataTracker.Builder builder) Initializes data tracker.booleanisImmuneToExplosion(Explosion explosion) Returns whether the entity is immune from explosion knockback and damage.voidkillAndDropItem(ServerWorld world, Item item) protected voidkillAndDropSelf(ServerWorld world, DamageSource damageSource) voidsetDamageWobbleSide(int damageWobbleSide) voidsetDamageWobbleStrength(float damageWobbleStrength) voidsetDamageWobbleTicks(int damageWobbleTicks) (package private) booleanshouldAlwaysKill(DamageSource source) Methods inherited from class net.minecraft.entity.Entity
addAirTravelEffects, addCommandTag, addFlapEffects, addPassenger, addPortalChunkTicketAt, addVelocity, addVelocity, addVelocityInternal, adjustMovementForCollisions, adjustMovementForPiston, adjustMovementForSneaking, animateDamage, applyGravity, applyMirror, applyRotation, attemptTickInVoid, baseTick, bypassesLandingEffects, bypassesSteppingEffects, calculateBoundingBox, calculateDefaultBoundingBox, calculateDimensions, calculateNextStepSoundDistance, canAddPassenger, canAvoidTraps, canBeHitByProjectile, canBeSpectated, canExplosionDestroyBlock, canFreeze, canHit, canModifyAt, canMoveVoluntarily, canSprintAsVehicle, canStartRiding, canTeleportBetween, canUsePortals, changeLookDirection, checkDespawn, collidesWith, collidesWithStateAtPos, copyFrom, copyPositionAndRotation, couldAcceptPassenger, createSpawnPacket, detach, discard, dismountVehicle, distanceTo, doesNotCollide, doesRenderOnFire, dropItem, dropItem, dropStack, dropStack, emitGameEvent, emitGameEvent, equals, extinguish, extinguishWithSound, fall, getAir, getAttachments, getBlockPos, getBlockStateAtPos, getBlockX, getBlockY, getBlockZ, getBodyX, getBodyY, getBodyYaw, getBodyZ, getBoundingBox, getBrightnessAtEyes, getBurningDuration, getCameraPosVec, getChunkPos, getClientCameraPosVec, getCommandSource, getCommandTags, getControllingPassenger, getControllingVehicle, getCustomName, getDamageSources, getDataTracker, getDefaultName, getDimensions, getDisplayName, getEffectiveExplosionResistance, getEntityWorld, getEyeHeight, getEyePos, getEyeY, getFacing, getFinalGravity, getFireTicks, getFirstPassenger, getFlag, getFluidHeight, getFreezingScale, getFrozenTicks, getGravity, getHandPosOffset, getHeadYaw, getHeight, getHighSpeedSplashSound, getHorizontalFacing, getHoverEvent, getId, getJumpVelocityMultiplier, getLandingBlockState, getLandingPos, getLastRenderPos, getLeashOffset, getLeashOffset, getLeashPos, getLerpedPitch, getLerpedPos, getLerpedYaw, getLerpTargetPitch, getLerpTargetX, getLerpTargetY, getLerpTargetYaw, getLerpTargetZ, getLootTableKey, getMaxAir, getMinFreezeDamageTicks, getMoveEffect, getMovement, getMovementDirection, getName, getNameForScoreboard, getOppositeRotationVector, getOppositeRotationVector, getParticleX, getParticleZ, getPassengerAttachmentPos, getPassengerAttachmentPos, getPassengerDismountOffset, getPassengerList, getPassengerRidingPos, getPassengersDeep, getPickBlockStack, getPistonBehavior, getPitch, getPitch, getPlayerPassengers, getPortalCooldown, getPos, getPose, getPosWithYOffset, getProjectileDeflection, getRandom, getRandomBodyY, getRegistryManager, getRemovalReason, getRenderDistanceMultiplier, getRootVehicle, getRotationClient, getRotationVec, getRotationVecClient, getRotationVector, getRotationVector, getSafeFallDistance, getSavedEntityId, getScoreboardTeam, getServer, getSoundCategory, getSplashSound, getStackReference, getStandingEyeHeight, getStepHeight, getSteppingBlockState, getSteppingPos, getStepSoundPos, getSwimHeight, getSwimSound, getSyncedPos, getTargetingMargin, getTeamColorValue, getTrackedPosition, getType, getUuid, getUuidAsString, getVehicle, getVehicleAttachmentPos, getVelocity, getVelocityAffectingPos, getVelocityMultiplier, getWeaponStack, getWidth, getWorld, getWorldSpawnPos, getX, getY, getYaw, getYaw, getZ, handleAttack, handleFall, handleFallDamage, handleStatus, hasCollidedSoftly, hasControllingPassenger, hasCustomName, hashCode, hasNoGravity, hasPassenger, hasPassenger, hasPassengerDeep, hasPassengers, hasPlayerRider, hasPortalCooldown, hasVehicle, interact, interactAt, isAlive, isAlwaysInvulnerableTo, isAttackable, isCollidable, isConnectedThroughVehicle, isControlledByPlayer, isCrawling, isCustomNameVisible, isDescending, isFireImmune, isFlappingWings, isFrozen, isGlowing, isGlowingLocal, isInFluid, isInLava, isInPose, isInRange, isInRange, isInSameTeam, isInsideWall, isInsideWaterOrBubbleColumn, isInSneakingPose, isInSwimmingPose, isInvisible, isInvisibleTo, isInvulnerable, isLiving, isLocalPlayerOrLogicalSideForUpdatingMovement, isLogicalSideForUpdatingMovement, isOnFire, isOnGround, isOnRail, isPartOf, isPlayer, isPushable, isPushedByFluids, isRegionUnloaded, isRemoved, isSilent, isSneaking, isSneaky, isSpectator, isSprinting, isSubmergedIn, isSubmergedInWater, isSupportedBy, isSwimming, isTeammate, isTeamPlayer, isTouchingWater, isTouchingWaterOrRain, isWet, kill, lerpPosAndRotation, lerpYaw, limitFallDistance, lookAt, move, movementInputToVelocity, occludeVibrationSignals, onBlockCollision, onBubbleColumnCollision, onBubbleColumnSurfaceCollision, onDamaged, onDataTrackerUpdate, onExplodedBy, onKilledOther, onLanding, onPassengerLookAround, onPlayerCollision, onRemove, onRemoved, onSpawnPacket, onStartedTrackingBy, onStoppedTrackingBy, onStruckByLightning, onSwimmingStart, onTrackedDataSet, playCombinationStepSounds, playExtinguishSound, playSecondaryStepSound, playSound, playSoundIfNotSilent, playStepSound, playSwimSound, playSwimSound, populateCrashReport, positionInPortal, pushAwayFrom, pushOutOfBlocks, queueBlockCollisionCheck, raycast, readCustomDataFromNbt, readNbt, recalculateDimensions, refreshPosition, refreshPositionAfterTeleport, refreshPositionAfterTeleport, refreshPositionAndAngles, refreshPositionAndAngles, refreshPositionAndAngles, reinitDimensions, remove, removeAllPassengers, removeCommandTag, removeFromDimension, removePassenger, requestTeleport, requestTeleportAndDismount, requestTeleportOffset, resetLerp, resetPortalCooldown, resetPosition, rotate, saveNbt, saveSelfNbt, scheduleVelocityUpdate, serverDamage, setAir, setAngles, setBodyYaw, setBoundingBox, setChangeListener, setCustomName, setCustomNameVisible, setFireTicks, setFlag, setFrozenTicks, setGlowing, setHeadYaw, setId, setInPowderSnow, setInvisible, setInvulnerable, setMovement, setMovement, setNoGravity, setOnFire, setOnFireFor, setOnFireForTicks, setOnFireFromLava, setOnGround, setPitch, setPortalCooldown, setPos, setPose, setPosition, setPosition, setPosition, setPrevPositionAndAngles, setRemoved, setRenderDistanceMultiplier, setRotation, setSilent, setSneaking, setSprinting, setSwimming, setUuid, setVelocity, setVelocity, setVelocityClient, setWorld, setYaw, shouldControlVehicles, shouldDismountUnderwater, shouldEscapePowderSnow, shouldPlayBurnSoundInLava, shouldRender, shouldRender, shouldRenderName, shouldSave, shouldSetPositionOnLoad, shouldSpawnSprintingParticles, shouldTickBlockCollision, sidedDamage, slowMovement, spawnSprintingParticles, squaredDistanceTo, squaredDistanceTo, squaredDistanceTo, startRiding, startRiding, stopRiding, streamPassengersAndSelf, streamSelfAndPassengers, teleport, teleportTo, tick, tickBlockCollision, tickBlockCollision, tickInVoid, tickPortalCooldown, tickPortalTeleportation, tickRiding, toNbtList, toNbtList, toString, tryUsePortal, unsetRemoved, updateEventHandler, updateKilledAdvancementCriterion, updateMovementInFluid, updatePassengerForDismount, updatePassengerPosition, updatePassengerPosition, updatePosition, updatePositionAndAngles, updatePrevAngles, updatePrevPosition, updateSupportingBlockPos, updateSwimming, updateTrackedHeadRotation, updateTrackedPosition, updateTrackedPositionAndAngles, updateVelocity, updateWaterState, writeCustomDataToNbt, writeNbtMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.scoreboard.ScoreHolder
getStyledDisplayName
-
Field Details
-
DAMAGE_WOBBLE_TICKS
- Mappings:
Namespace Name Mixin selector named DAMAGE_WOBBLE_TICKSLnet/minecraft/entity/vehicle/VehicleEntity;DAMAGE_WOBBLE_TICKS:Lnet/minecraft/entity/data/TrackedData;intermediary field_46655Lnet/minecraft/class_8836;field_46655:Lnet/minecraft/class_2940;official eLcrp;e:Lajy;
-
DAMAGE_WOBBLE_SIDE
- Mappings:
Namespace Name Mixin selector named DAMAGE_WOBBLE_SIDELnet/minecraft/entity/vehicle/VehicleEntity;DAMAGE_WOBBLE_SIDE:Lnet/minecraft/entity/data/TrackedData;intermediary field_46656Lnet/minecraft/class_8836;field_46656:Lnet/minecraft/class_2940;official fLcrp;f:Lajy;
-
DAMAGE_WOBBLE_STRENGTH
- Mappings:
Namespace Name Mixin selector named DAMAGE_WOBBLE_STRENGTHLnet/minecraft/entity/vehicle/VehicleEntity;DAMAGE_WOBBLE_STRENGTH:Lnet/minecraft/entity/data/TrackedData;intermediary field_46657Lnet/minecraft/class_8836;field_46657:Lnet/minecraft/class_2940;official gLcrp;g:Lajy;
-
-
Constructor Details
-
VehicleEntity
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/entity/Entity;<init>(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/World;)Vintermediary <init>Lnet/minecraft/class_1297;<init>(Lnet/minecraft/class_1299;Lnet/minecraft/class_1937;)Vofficial <init>Lbum;<init>(Lbut;Ldgj;)V
-
-
Method Details
-
clientDamage
- Overrides:
clientDamagein classEntity- Mappings:
Namespace Name Mixin selector named clientDamageLnet/minecraft/entity/Entity;clientDamage(Lnet/minecraft/entity/damage/DamageSource;)Zintermediary method_5643Lnet/minecraft/class_1297;method_5643(Lnet/minecraft/class_1282;)Zofficial bLbum;b(Lbtc;)Z
-
damage
Applies a damage to this entity. The exact implementation differs between subclasses.LivingEntityhas health value, and damaging the entity decreases it. This also handles shields, extra damage to helmets for falling blocks, setting the attacker, playing hurt sound, etc.Some entities like
ItemEntityalso have health value, which the overridden method decrements. There also exist several entities, likeEndCrystalEntity, where any damage discards the entity (perhaps with an explosion).If this is overridden, it must check the result of
and return early.invalid reference
#isInvulnerableTo- Specified by:
damagein classEntity- Returns:
- whether the entity was actually damaged
- See Also:
- Mappings:
Namespace Name Mixin selector named damageLnet/minecraft/entity/Entity;damage(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/damage/DamageSource;F)Zintermediary method_64397Lnet/minecraft/class_1297;method_64397(Lnet/minecraft/class_3218;Lnet/minecraft/class_1282;F)Zofficial aLbum;a(Lard;Lbtc;F)Z
-
shouldAlwaysKill
- Mappings:
Namespace Name Mixin selector named shouldAlwaysKillLnet/minecraft/entity/vehicle/VehicleEntity;shouldAlwaysKill(Lnet/minecraft/entity/damage/DamageSource;)Zintermediary method_55056Lnet/minecraft/class_8836;method_55056(Lnet/minecraft/class_1282;)Zofficial aLcrp;a(Lbtc;)Z
-
isImmuneToExplosion
Returns whether the entity is immune from explosion knockback and damage.Invisible
ArmorStandEntityand emerging or diggingWardenEntityare immune from explosions.- Overrides:
isImmuneToExplosionin classEntity- Returns:
- whether the entity is immune from explosion knockback and damage
- Mappings:
Namespace Name Mixin selector named isImmuneToExplosionLnet/minecraft/entity/Entity;isImmuneToExplosion(Lnet/minecraft/world/explosion/Explosion;)Zintermediary method_5659Lnet/minecraft/class_1297;method_5659(Lnet/minecraft/class_1927;)Zofficial aLbum;a(Ldgb;)Z
-
killAndDropItem
- Mappings:
Namespace Name Mixin selector named killAndDropItemLnet/minecraft/entity/vehicle/VehicleEntity;killAndDropItem(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/item/Item;)Vintermediary method_54298Lnet/minecraft/class_8836;method_54298(Lnet/minecraft/class_3218;Lnet/minecraft/class_1792;)Vofficial aLcrp;a(Lard;Lcwm;)V
-
initDataTracker
Initializes data tracker.- Specified by:
initDataTrackerin classEntity- API Note:
- Subclasses should override this and add to the builder any data that needs to be tracked.
- Mappings:
Namespace Name Mixin selector named initDataTrackerLnet/minecraft/entity/Entity;initDataTracker(Lnet/minecraft/entity/data/DataTracker$Builder;)Vintermediary method_5693Lnet/minecraft/class_1297;method_5693(Lnet/minecraft/class_2945$class_9222;)Vofficial aLbum;a(Lakc$a;)V
-
setDamageWobbleTicks
public void setDamageWobbleTicks(int damageWobbleTicks) - Mappings:
Namespace Name Mixin selector named setDamageWobbleTicksLnet/minecraft/entity/vehicle/VehicleEntity;setDamageWobbleTicks(I)Vintermediary method_54299Lnet/minecraft/class_8836;method_54299(I)Vofficial dLcrp;d(I)V
-
setDamageWobbleSide
public void setDamageWobbleSide(int damageWobbleSide) - Mappings:
Namespace Name Mixin selector named setDamageWobbleSideLnet/minecraft/entity/vehicle/VehicleEntity;setDamageWobbleSide(I)Vintermediary method_54300Lnet/minecraft/class_8836;method_54300(I)Vofficial lLcrp;l(I)V
-
setDamageWobbleStrength
public void setDamageWobbleStrength(float damageWobbleStrength) - Mappings:
Namespace Name Mixin selector named setDamageWobbleStrengthLnet/minecraft/entity/vehicle/VehicleEntity;setDamageWobbleStrength(F)Vintermediary method_54297Lnet/minecraft/class_8836;method_54297(F)Vofficial bLcrp;b(F)V
-
getDamageWobbleStrength
public float getDamageWobbleStrength()- Mappings:
Namespace Name Mixin selector named getDamageWobbleStrengthLnet/minecraft/entity/vehicle/VehicleEntity;getDamageWobbleStrength()Fintermediary method_54294Lnet/minecraft/class_8836;method_54294()Fofficial LLcrp;L()F
-
getDamageWobbleTicks
public int getDamageWobbleTicks()- Mappings:
Namespace Name Mixin selector named getDamageWobbleTicksLnet/minecraft/entity/vehicle/VehicleEntity;getDamageWobbleTicks()Iintermediary method_54295Lnet/minecraft/class_8836;method_54295()Iofficial NLcrp;N()I
-
getDamageWobbleSide
public int getDamageWobbleSide()- Mappings:
Namespace Name Mixin selector named getDamageWobbleSideLnet/minecraft/entity/vehicle/VehicleEntity;getDamageWobbleSide()Iintermediary method_54296Lnet/minecraft/class_8836;method_54296()Iofficial OLcrp;O()I
-
killAndDropSelf
- Mappings:
Namespace Name Mixin selector named killAndDropSelfLnet/minecraft/entity/vehicle/VehicleEntity;killAndDropSelf(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/damage/DamageSource;)Vintermediary method_7516Lnet/minecraft/class_8836;method_7516(Lnet/minecraft/class_3218;Lnet/minecraft/class_1282;)Vofficial aLcrp;a(Lard;Lbtc;)V
-
getDefaultPortalCooldown
public int getDefaultPortalCooldown()Returns the entity's default portal cooldown.This is 300 ticks by default, or 10 ticks for players.
- Overrides:
getDefaultPortalCooldownin classEntity- Returns:
- the entity's default portal cooldown
- See Also:
- Mappings:
Namespace Name Mixin selector named getDefaultPortalCooldownLnet/minecraft/entity/Entity;getDefaultPortalCooldown()Iintermediary method_5806Lnet/minecraft/class_1297;method_5806()Iofficial bXLbum;bX()I
-
asItem
- Mappings:
Namespace Name Mixin selector named asItemLnet/minecraft/entity/vehicle/VehicleEntity;asItem()Lnet/minecraft/item/Item;intermediary method_7557Lnet/minecraft/class_8836;method_7557()Lnet/minecraft/class_1792;official uLcrp;u()Lcwm;
-