类 AbstractMinecart
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<Entity>
net.minecraft.world.entity.Entity
net.minecraft.world.entity.vehicle.AbstractMinecart
- 所有已实现的接口:
CommandSource
,EntityAccess
,Nameable
,ICapabilityProvider
,ICapabilityProviderImpl<Entity>
,ICapabilitySerializable<CompoundTag>
,IForgeAbstractMinecart
,IForgeEntity
,INBTSerializable<CompoundTag>
- 直接已知子类:
AbstractMinecartContainer
,Minecart
,MinecartCommandBlock
,MinecartFurnace
,MinecartSpawner
,MinecartTNT
-
嵌套类概要
嵌套类从类继承的嵌套类/接口 net.minecraft.world.entity.Entity
Entity.MoveFunction, Entity.MovementEmission, Entity.RemovalReason
从类继承的嵌套类/接口 net.minecraftforge.common.capabilities.CapabilityProvider
CapabilityProvider.AsField<B extends ICapabilityProviderImpl<B>>
-
字段概要
字段修饰符和类型字段说明private boolean
private boolean
private static IMinecartCollisionHandler
private float
private static final EntityDataAccessor<Boolean>
private static final EntityDataAccessor<Float>
private static final EntityDataAccessor<Integer>
private static final EntityDataAccessor<Integer>
private static final EntityDataAccessor<Integer>
private static final EntityDataAccessor<Integer>
private double
private boolean
private int
private double
private double
private double
private double
private double
private double
private double
private double
private @Nullable Float
private float
private boolean
private static final com.google.common.collect.ImmutableMap<Pose,
com.google.common.collect.ImmutableList<Integer>> protected static final float
从类继承的字段 net.minecraft.world.entity.Entity
BASE_TICKS_REQUIRED_TO_FREEZE, blocksBuilding, BOARDING_COOLDOWN, boardingCooldown, BREATHING_DISTANCE_BELOW_EYES, DATA_POSE, DATA_SHARED_FLAGS_ID, DEFAULT_BB_HEIGHT, DEFAULT_BB_WIDTH, DELTA_AFFECTED_BY_BLOCKS_BELOW_0_2, DELTA_AFFECTED_BY_BLOCKS_BELOW_0_5, DELTA_AFFECTED_BY_BLOCKS_BELOW_1_0, ENTITY_COUNTER, entityData, fallDistance, firstTick, FLAG_FALL_FLYING, FLAG_GLOWING, FLAG_ONFIRE, fluidHeight, flyDist, forgeFluidTypeHeight, FREEZE_HURT_FREQUENCY, hasImpulse, horizontalCollision, hurtMarked, ID_TAG, invulnerableTime, isInPowderSnow, isInsidePortal, mainSupportingBlockPos, MAX_ENTITY_TAG_COUNT, minorHorizontalCollision, moveDist, noCulling, noPhysics, PASSENGERS_TAG, portalEntrancePos, portalTime, random, stringUUID, stuckSpeedMultiplier, tickCount, TOTAL_AIR_SUPPLY, uuid, UUID_TAG, verticalCollision, verticalCollisionBelow, walkDist, walkDistO, wasEyeInWater, wasInPowderSnow, wasOnFire, wasTouchingWater, xo, xOld, xRotO, yo, yOld, yRotO, zo, zOld
从接口继承的字段 net.minecraft.commands.CommandSource
NULL
从接口继承的字段 net.minecraftforge.common.extensions.IForgeAbstractMinecart
DEFAULT_AIR_DRAG, DEFAULT_MAX_SPEED_AIR_LATERAL, DEFAULT_MAX_SPEED_AIR_VERTICAL
-
构造器概要
构造器限定符构造器说明protected
AbstractMinecart
(EntityType<?> pEntityType, Level pLevel) protected
AbstractMinecart
(EntityType<?> pEntityType, Level pLevel, double pX, double pY, double pZ) -
方法概要
修饰符和类型方法说明void
activateMinecart
(int pX, int pY, int pZ, boolean pPowered) protected void
addAdditionalSaveData
(CompoundTag pCompound) void
animateHurt
(float pYaw) protected void
boolean
canCollideWith
(Entity pEntity) boolean
Returns true if this cart can currently use rails.protected void
static AbstractMinecart
createMinecart
(Level pLevel, double pX, double pY, double pZ, AbstractMinecart.Type pType) protected void
void
destroy
(DamageSource pDamageSource) protected float
float
Returns the current speed cap for the cart when traveling on rails.float
int
getDismountLocationForPassenger
(LivingEntity pLivingEntity) int
double
protected abstract Item
int
int
protected double
float
float
double
abstract AbstractMinecart.Type
protected Entity.MovementEmission
double
getPos
(double pX, double pY, double pZ) getPosOffs
(double pX, double pY, double pZ, double pOffset) protected Vec3
getRelativePortalPosition
(Direction.Axis pAxis, BlockUtil.FoundRectangle pPortal) boolean
boolean
hurt
(DamageSource pSource, float pAmount) boolean
boolean
boolean
private boolean
isRedstoneConductor
(BlockPos pPos) void
lerpMotion
(double pX, double pY, double pZ) void
lerpTo
(double pX, double pY, double pZ, float pYaw, float pPitch, int pPosRotationIncrements, boolean pTeleport) protected void
moveAlongTrack
(BlockPos pPos, BlockState pState) void
Moved to allow overrides.void
protected void
readAdditionalSaveData
(CompoundTag pCompound) static void
void
setCanUseRail
(boolean value) Set whether the minecart can use rails.void
setCurrentCartSpeedCapOnRail
(float value) void
setCustomDisplay
(boolean pCustomDisplay) void
setDamage
(float pDamage) void
setDisplayBlockState
(BlockState pDisplayState) void
setDisplayOffset
(int pDisplayOffset) void
setDragAir
(double value) void
setHurtDir
(int pHurtDirection) void
setHurtTime
(int pHurtTime) void
setMaxSpeedAirLateral
(float value) void
setMaxSpeedAirVertical
(float value) void
tick()
从类继承的方法 net.minecraft.world.entity.Entity
absMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addDeltaMovement, addPassenger, addTag, awardKillScore, baseTick, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, canBeHitByProjectile, canChangeDimensions, canEnterPose, canFreeze, canRide, canSpawnSprintParticle, canSprint, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, causeFallDamage, changeDimension, changeDimension, checkBelowWorld, checkDespawn, checkFallDamage, checkInsideBlocks, checkSlowFallDistance, checkSupportingBlock, chunkPosition, clearFire, closerThan, closerThan, collideBoundingBox, copyPosition, couldAcceptPassenger, createCommandSourceStack, createHoverEvent, damageSources, dampensVibrations, discard, dismountsUnderwater, dismountTo, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doEnchantDamageEffects, doWaterSplashEffect, ejectPassengers, equals, extinguishFire, fillCrashReportCategory, findDimensionEntryPoint, fireImmune, fixupDimensions, gameEvent, gameEvent, getAddEntityPacket, getAirSupply, getAllSlots, getArmorSlots, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockStateOn, getBlockStateOnLegacy, getBlockX, getBlockY, getBlockZ, getBoundingBox, getBoundingBoxForPose, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControlledVehicle, getControllingPassenger, getCustomName, getDeltaMovement, getDimensionChangingDelay, getDimensions, getDirection, getDisplayName, getEncodeId, getEntityData, getExitPortal, getEyeHeight, getEyeHeight, getEyeHeight, getEyeHeightAccess, getEyeInFluidType, getEyePosition, getEyePosition, getEyeY, getFeetBlockState, getFireImmuneTicks, getFirstPassenger, getFluidHeight, getFluidJumpThreshold, getFluidTypeHeight, getForward, getHandHoldingItemAngle, getHandSlots, getId, getIndirectPassengers, getLeashOffset, getLeashOffset, getLightLevelDependentMagicValue, getLightProbePosition, getLookAngle, getMaxAirSupply, getMaxFallDistance, getMaxHeightFluidType, getMyRidingOffset, getName, getNameTagOffsetY, getOnPos, getOnPos, getOnPosLegacy, getPassengers, getPassengersAndSelf, getPercentFrozen, getPermissionLevel, getPersistentData, getPickRadius, getPistonPushReaction, getPortalCooldown, getPortalWaitTime, getPose, getPosition, getPositionCodec, getPrimaryStepSoundBlockPos, getRandomX, getRandomY, getRandomZ, getRemainingFireTicks, getRemovalReason, getRootVehicle, getRopeHoldPosition, getRotationVector, getScoreboardName, getSelfAndPassengers, getServer, getSharedFlag, getSlot, getSoundSource, getStringUUID, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getTags, getTeam, getTeamColor, getTicksFrozen, getTicksRequiredToFreeze, getType, getTypeName, getUpVector, getUUID, getVehicle, getViewScale, getViewVector, getViewXRot, getViewYRot, getVisualRotationYInDegrees, getX, getX, getXRot, getY, getY, getYHeadRot, getYRot, getZ, getZ, handleDamageEvent, handleEntityEvent, handleInsidePortal, handleNetherPortal, hasControllingPassenger, hasCustomName, hasExactlyOnePlayerPassenger, hasGlowingTag, hashCode, hasIndirectPassenger, hasPassenger, hasPassenger, hasPermissions, hasPose, ignoreExplosion, interact, interactAt, is, isAddedToWorld, isAlive, isAlliedTo, isAlliedTo, isAlwaysTicking, isAttackable, isColliding, isControlledByLocalInstance, isCrouching, isCurrentlyGlowing, isCustomNameVisible, isDescending, isDiscrete, isEffectiveAi, isEyeInFluid, isFlapping, isFree, isFreezing, isFullyFrozen, isHorizontalCollisionMinor, isIgnoringBlockTriggers, isInFluidType, isInFluidType, isInLava, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableTo, isInWall, isInWater, isInWaterOrBubble, isInWaterOrRain, isInWaterRainOrBubble, isNoGravity, isOnFire, isOnPortalCooldown, isPassenger, isPassengerOfSameVehicle, isPushedByFluid, isRemoved, isShiftKeyDown, isSilent, isSpectator, isSprinting, isSteppingCarefully, isSupportedBy, isSuppressingBounce, isSwimming, isUnderWater, isVehicle, isVisuallyCrawling, isVisuallySwimming, kill, killedEntity, lavaHurt, lerpHeadTo, level, limitPistonMovement, load, lookAt, makeBoundingBox, makeStuckInBlock, markHurt, maxUpStep, maybeBackOffFromEdge, mayInteract, mirror, move, moveRelative, moveTo, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, onAboveBubbleCol, onAddedToWorld, onBelowWorld, onClientRemoval, onFlap, onGround, onInsideBlock, onInsideBubbleColumn, onlyOpCanSetNbt, onPassengerTurned, onRemovedFromWorld, onSyncedDataUpdated, onSyncedDataUpdated, pick, playCombinationStepSounds, playEntityOnFireExtinguishedSound, playerTouch, playMuffledStepSound, playSound, playSound, playStepSound, playSwimSound, position, positionRider, positionRider, processFlappingMovement, processPortalCooldown, push, reapplyPosition, recreateFromPacket, refreshDimensions, remove, removeAfterChangingDimensions, removePassenger, removeTag, removeVehicle, repositionEntityAfterLoad, resetFallDistance, restoreFrom, revive, rideTick, rotate, save, saveAsPassenger, saveWithoutId, sendSystemMessage, setAirSupply, setBoundingBox, setCustomName, setCustomNameVisible, setDeltaMovement, setDeltaMovement, setFluidTypeHeight, setGlowingTag, setId, setInvisible, setInvulnerable, setIsInPowderSnow, setItemSlot, setLevel, setLevelCallback, setMaxUpStep, setNoGravity, setOldPosAndRot, setOnGround, setOnGroundWithKnownMovement, setPortalCooldown, setPortalCooldown, setPos, setPos, setPose, setPosRaw, setRemainingFireTicks, setRemoved, setRot, setSecondsOnFire, setSharedFlag, setSharedFlagOnFire, setShiftKeyDown, setSilent, setSprinting, setSwimming, setTicksFrozen, setUUID, setViewScale, setXRot, setYBodyRot, setYHeadRot, setYRot, shouldBeSaved, shouldBlockExplode, shouldInformAdmins, shouldRender, shouldRenderAtSqrDistance, shouldShowName, showVehicleHealth, skipAttackInteraction, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnSprintParticle, startRiding, startRiding, startSeenByPlayer, stopRiding, stopSeenByPlayer, syncPacketPositionCodec, teleportRelative, teleportTo, teleportTo, teleportToWithTicket, thunderHit, toString, touchingUnloadedChunk, trackingPosition, tryCheckInsideBlocks, turn, unRide, unsetRemoved, updateDynamicGameEventListener, updateFluidHeightAndDoFluidPushing, updateFluidHeightAndDoFluidPushing, updateInWaterStateAndDoFluidPushing, updateSwimming, waterSwimSound
从类继承的方法 net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps
从接口继承的方法 net.minecraft.commands.CommandSource
alwaysAccepts
从接口继承的方法 net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapability
从接口继承的方法 net.minecraftforge.common.extensions.IForgeAbstractMinecart
canBeRidden, getComparatorLevel, getCurrentRailPosition, getMaxCartSpeedOnRail, getSlopeAdjustment, isPoweredCart, shouldDoRailFunctions
从接口继承的方法 net.minecraftforge.common.extensions.IForgeEntity
canBeRiddenUnderFluidType, canFluidExtinguish, canHydrateInFluidType, canRiderInteract, canStartSwimming, canSwimInFluidType, deserializeNBT, getClassification, getFluidFallDistanceModifier, getFluidMotionScale, getParts, getPickedResult, getSoundFromFluidType, getStepHeight, hasCustomOutlineRendering, isEyeInFluidType, isInFluidType, isInFluidType, isInFluidType, isMultipartEntity, isPushedByFluid, serializeNBT, shouldRiderSit
-
字段详细资料
-
DATA_ID_HURT
-
DATA_ID_HURTDIR
-
DATA_ID_DAMAGE
-
DATA_ID_DISPLAY_BLOCK
-
DATA_ID_DISPLAY_OFFSET
-
DATA_ID_CUSTOM_DISPLAY
-
POSE_DISMOUNT_HEIGHTS
-
WATER_SLOWDOWN_FACTOR
protected static final float WATER_SLOWDOWN_FACTOR- 另请参阅:
-
flipped
private boolean flipped -
onRails
private boolean onRails -
EXITS
-
COLLISIONS
-
lSteps
private int lSteps -
lx
private double lx -
ly
private double ly -
lz
private double lz -
lyr
private double lyr -
lxr
private double lxr -
lxd
private double lxd -
lyd
private double lyd -
lzd
private double lzd -
canBePushed
private boolean canBePushed -
canUseRail
private boolean canUseRail -
currentSpeedCapOnRail
private float currentSpeedCapOnRail -
maxSpeedAirLateral
-
maxSpeedAirVertical
private float maxSpeedAirVertical -
dragAir
private double dragAir
-
-
构造器详细资料
-
AbstractMinecart
-
AbstractMinecart
protected AbstractMinecart(EntityType<?> pEntityType, Level pLevel, double pX, double pY, double pZ)
-
-
方法详细资料
-
getCollisionHandler
-
registerCollisionHandler
-
createMinecart
public static AbstractMinecart createMinecart(Level pLevel, double pX, double pY, double pZ, AbstractMinecart.Type pType) -
getMovementEmission
- 覆盖:
getMovementEmission
在类中Entity
-
defineSynchedData
protected void defineSynchedData()- 指定者:
defineSynchedData
在类中Entity
-
canCollideWith
- 覆盖:
canCollideWith
在类中Entity
-
isPushable
public boolean isPushable()- 覆盖:
isPushable
在类中Entity
-
getRelativePortalPosition
- 覆盖:
getRelativePortalPosition
在类中Entity
-
getPassengersRidingOffset
public double getPassengersRidingOffset()- 覆盖:
getPassengersRidingOffset
在类中Entity
-
getDismountLocationForPassenger
-
hurt
-
getBlockSpeedFactor
protected float getBlockSpeedFactor()- 覆盖:
getBlockSpeedFactor
在类中Entity
-
destroy
-
getDropItem
-
animateHurt
public void animateHurt(float pYaw) - 覆盖:
animateHurt
在类中Entity
-
isPickable
public boolean isPickable()- 覆盖:
isPickable
在类中Entity
-
exits
-
getMotionDirection
- 覆盖:
getMotionDirection
在类中Entity
-
tick
public void tick() -
getMaxSpeed
protected double getMaxSpeed() -
activateMinecart
public void activateMinecart(int pX, int pY, int pZ, boolean pPowered) -
comeOffTrack
protected void comeOffTrack() -
moveAlongTrack
-
isOnRails
public boolean isOnRails() -
isRedstoneConductor
-
applyNaturalSlowdown
protected void applyNaturalSlowdown() -
getPosOffs
-
getPos
-
getBoundingBoxForCulling
- 覆盖:
getBoundingBoxForCulling
在类中Entity
-
readAdditionalSaveData
- 指定者:
readAdditionalSaveData
在类中Entity
-
addAdditionalSaveData
- 指定者:
addAdditionalSaveData
在类中Entity
-
push
-
lerpTo
public void lerpTo(double pX, double pY, double pZ, float pYaw, float pPitch, int pPosRotationIncrements, boolean pTeleport) -
lerpMotion
public void lerpMotion(double pX, double pY, double pZ) - 覆盖:
lerpMotion
在类中Entity
-
setDamage
public void setDamage(float pDamage) -
getDamage
public float getDamage() -
setHurtTime
public void setHurtTime(int pHurtTime) -
getHurtTime
public int getHurtTime() -
setHurtDir
public void setHurtDir(int pHurtDirection) -
getHurtDir
public int getHurtDir() -
getMinecartType
-
getDisplayBlockState
-
getDefaultDisplayBlockState
-
getDisplayOffset
public int getDisplayOffset() -
getDefaultDisplayOffset
public int getDefaultDisplayOffset() -
setDisplayBlockState
-
setDisplayOffset
public void setDisplayOffset(int pDisplayOffset) -
hasCustomDisplay
public boolean hasCustomDisplay() -
setCustomDisplay
public void setCustomDisplay(boolean pCustomDisplay) -
canUseRail
public boolean canUseRail()从接口复制的说明:IForgeAbstractMinecart
Returns true if this cart can currently use rails. This function is mainly used to gracefully detach a minecart from a rail.- 指定者:
canUseRail
在接口中IForgeAbstractMinecart
- 返回:
- True if the minecart can use rails.
-
setCanUseRail
public void setCanUseRail(boolean value) 从接口复制的说明:IForgeAbstractMinecart
Set whether the minecart can use rails. This function is mainly used to gracefully detach a minecart from a rail.- 指定者:
setCanUseRail
在接口中IForgeAbstractMinecart
- 参数:
value
- Whether the minecart can currently use rails.
-
getCurrentCartSpeedCapOnRail
public float getCurrentCartSpeedCapOnRail()从接口复制的说明:IForgeAbstractMinecart
Returns the current speed cap for the cart when traveling on rails. This functions differs from getMaxCartSpeedOnRail() in that it controls current movement and cannot be overridden. The value however can never be higher than getMaxCartSpeedOnRail(). -
setCurrentCartSpeedCapOnRail
public void setCurrentCartSpeedCapOnRail(float value) -
getMaxSpeedAirLateral
public float getMaxSpeedAirLateral()- 指定者:
getMaxSpeedAirLateral
在接口中IForgeAbstractMinecart
-
setMaxSpeedAirLateral
public void setMaxSpeedAirLateral(float value) - 指定者:
setMaxSpeedAirLateral
在接口中IForgeAbstractMinecart
-
getMaxSpeedAirVertical
public float getMaxSpeedAirVertical()- 指定者:
getMaxSpeedAirVertical
在接口中IForgeAbstractMinecart
-
setMaxSpeedAirVertical
public void setMaxSpeedAirVertical(float value) - 指定者:
setMaxSpeedAirVertical
在接口中IForgeAbstractMinecart
-
getDragAir
public double getDragAir()- 指定者:
getDragAir
在接口中IForgeAbstractMinecart
-
setDragAir
public void setDragAir(double value) - 指定者:
setDragAir
在接口中IForgeAbstractMinecart
-
getMaxSpeedWithRail
public double getMaxSpeedWithRail()- 指定者:
getMaxSpeedWithRail
在接口中IForgeAbstractMinecart
-
moveMinecartOnRail
从接口复制的说明:IForgeAbstractMinecart
Moved to allow overrides. This code handles minecart movement and speed capping when on a rail.- 指定者:
moveMinecartOnRail
在接口中IForgeAbstractMinecart
-
getPickResult
- 覆盖:
getPickResult
在类中Entity
-