public abstract class AbstractMinecartEntity extends Entity implements IForgeEntityMinecart
| 修飾子とタイプ | クラスと説明 |
|---|---|
static class |
AbstractMinecartEntity.Type |
Entity.IMoveCallbackaddedToChunk, cachedUniqueIdString, chunkCoordX, chunkCoordY, chunkCoordZ, collided, collidedHorizontally, collidedVertically, dataManager, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, eyesInWater, fallDistance, firstUpdate, FLAGS, forceSpawn, glowing, hurtResistantTime, ignoreFrustumCheck, inLava, inPortal, inWater, isAirBorne, lastPortalPos, lastPortalVec, lastTickPosX, lastTickPosY, lastTickPosZ, LOGGER, motionMultiplier, noClip, onGround, portalCounter, POSE, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, removed, rideCooldown, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, submergedHeight, teleportDirection, ticksExisted, timeUntilPortal, velocityChanged, worldCOLLISIONS, DEFAULT_AIR_DRAG, DEFAULT_MAX_SPEED_AIR_LATERAL, DEFAULT_MAX_SPEED_AIR_VERTICALDUMMY| 修飾子 | コンストラクタと説明 |
|---|---|
protected |
AbstractMinecartEntity(EntityType<?> type,
World p_i48538_2_) |
protected |
AbstractMinecartEntity(EntityType<?> type,
World p_i48539_2_,
double p_i48539_3_,
double p_i48539_5_,
double p_i48539_7_) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
protected void |
applyDrag() |
void |
applyEntityCollision(Entity entityIn)
Applies a velocity to the entities, to push them away from eachother.
|
boolean |
attackEntityFrom(DamageSource source,
float amount)
Called when the entity is attacked.
|
boolean |
canBeCollidedWith()
Returns true if other Entities should be prevented from moving through this Entity.
|
boolean |
canBePushed()
Returns true if this entity should push and be pushed by other entities when colliding.
|
protected boolean |
canTriggerWalking() |
boolean |
canUseRail()
Returns true if this cart can currently use rails.
|
static AbstractMinecartEntity |
create(World worldIn,
double x,
double y,
double z,
AbstractMinecartEntity.Type typeIn) |
IPacket<?> |
createSpawnPacket() |
Direction |
getAdjustedHorizontalFacing()
Gets the horizontal facing direction of this Entity, adjusted to take specially-treated entity types into account.
|
AxisAlignedBB |
getCollisionBox(Entity entityIn)
Returns a boundingBox used to collide the entity with other entities and blocks.
|
float |
getCurrentCartSpeedCapOnRail()
Returns the current speed cap for the cart when traveling on rails.
|
float |
getDamage()
Gets the current amount of damage the minecart has taken.
|
BlockState |
getDefaultDisplayTile() |
int |
getDefaultDisplayTileOffset() |
BlockState |
getDisplayTile() |
int |
getDisplayTileOffset() |
double |
getDragAir() |
protected double |
getMaximumSpeed()
Get's the maximum speed for a minecart
|
float |
getMaxSpeedAirLateral() |
float |
getMaxSpeedAirVertical() |
double |
getMaxSpeedWithRail() |
abstract AbstractMinecartEntity.Type |
getMinecartType() |
double |
getMountedYOffset()
Returns the Y offset from the entity's position for any entity riding this one.
|
Vec3d |
getPos(double p_70489_1_,
double p_70489_3_,
double p_70489_5_) |
Vec3d |
getPosOffset(double x,
double y,
double z,
double offset) |
AxisAlignedBB |
getRenderBoundingBox()
Gets the bounding box of this Entity, adjusted to take auxiliary entities into account (e.g. the tile contained by
a minecart, such as a command block).
|
int |
getRollingAmplitude()
Gets the rolling amplitude the cart rolls while being attacked.
|
int |
getRollingDirection()
Gets the rolling direction the cart rolls while being attacked.
|
boolean |
hasDisplayTile() |
void |
killMinecart(DamageSource source) |
protected void |
moveAlongTrack(BlockPos pos,
BlockState state) |
protected void |
moveDerailedMinecart()
Moves a minecart that is not attached to a rail
|
void |
moveMinecartOnRail(BlockPos pos)
Moved to allow overrides.
|
void |
onActivatorRailPass(int x,
int y,
int z,
boolean receivingPower)
Called every tick the minecart is on an activator rail.
|
void |
performHurtAnimation()
Setups the entity to do the hurt animation.
|
protected void |
readAdditional(CompoundNBT compound)
(abstract) Protected helper method to read subclass entity data from NBT.
|
protected void |
registerData() |
void |
setCanUseRail(boolean value)
Set whether the minecart can use rails.
|
void |
setCurrentCartSpeedCapOnRail(float value) |
void |
setDamage(float damage)
Sets the current amount of damage the minecart has taken.
|
void |
setDisplayTile(BlockState displayTile) |
void |
setDisplayTileOffset(int displayTileOffset) |
void |
setDragAir(double value) |
void |
setHasDisplayTile(boolean showBlock) |
void |
setMaxSpeedAirLateral(float value) |
void |
setMaxSpeedAirVertical(float value) |
void |
setPositionAndRotationDirect(double x,
double y,
double z,
float yaw,
float pitch,
int posRotationIncrements,
boolean teleport)
Sets a target for the client to interpolate towards over the next few ticks
|
void |
setRollingAmplitude(int rollingAmplitude)
Sets the rolling amplitude the cart rolls while being attacked.
|
void |
setRollingDirection(int rollingDirection)
Sets the rolling direction the cart rolls while being attacked.
|
void |
setVelocity(double x,
double y,
double z)
Updates the entity motion clientside, called by packets from the server
|
void |
tick()
Called to update the entity's position/logic.
|
protected void |
writeAdditional(CompoundNBT compound) |
addPassenger, addTag, addTrackingPlayer, addVelocity, allowLogging, applyEnchantments, applyOrientationToEntity, applyPlayerInteraction, areEyesInFluid, areEyesInFluid, awardKillScore, baseTick, calculateUpVector, canBeAttackedWithItem, canBeRidden, canBeRiddenInWater, canExplosionDestroyBlock, canFitPassenger, canPassengerSteer, canRenderOnFire, canSwim, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, changeDimension, changeDimension, checkDespawn, collideBoundingBox, collideBoundingBoxHeuristically, copyDataFromOld, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, decrementTimeUntilPortal, detach, determineNextStepDistance, doBlockCollisions, doesEntityNotTriggerPressurePlate, doWaterSplashEffect, entityDropItem, entityDropItem, entityDropItem, entityDropItem, equals, extinguish, fillCrashReport, forceSetPosition, func_225513_by_, func_225514_a_, func_226265_a_, func_226266_a_, func_226276_cg_, getAir, getAllowedMovement, getAlwaysRenderNameTagForRender, getArmorInventoryList, getBoundingBox, getBoundingBox, getBrightness, getCachedUniqueIdString, getCollisionBorderSize, getCollisionBoundingBox, getCommandSource, getControllingPassenger, getCustomName, getDataManager, getDisplayName, getDistance, getDistanceSq, getDistanceSq, getDistanceSq, getEntityId, getEntityString, getEntityWorld, getEquipmentAndArmor, getExplosionResistance, getEyeHeight, getEyeHeight, getEyeHeight, getEyePosition, getFireImmuneTicks, getFireTimer, getFlag, getForward, getHeight, getHeldEquipment, getHighspeedSplashSound, getHorizontalFacing, getHoverEvent, getJumpFactor, getLastPortalVec, getLook, getLookVec, getLowestRidingEntity, getMaxAir, getMaxFallHeight, getMaxInPortalTime, getMirroredYaw, getMotion, getName, getOnPosition, getPassengers, getPermissionLevel, getPersistentData, getPitch, getPitchYaw, getPortalCooldown, getPose, getPosition, getPositionUnderneath, getPositionVec, getPositionVector, getPosX, getPosXRandom, getPosXWidth, getPosY, getPosYEye, getPosYHeight, getPosYRandom, getPosZ, getPosZRandom, getPosZWidth, getPushReaction, getRecursivePassengers, getRenderDistanceWeight, getRidingEntity, getRotatedYaw, getRotationYawHead, getScoreboardName, getServer, getSize, getSoundCategory, getSpeedFactor, getSplashSound, getSubmergedHeight, getSwimSound, getTags, getTeam, getTeamColor, getTeleportDirection, getType, getUniqueID, getUpVector, getVectorForRotation, getWidth, getYaw, getYOffset, handleFluidAcceleration, handlePistonMovement, handleStatusUpdate, handleWaterMovement, hasCustomName, hashCode, hasNoGravity, hasPermissionLevel, hitByEntity, horizontalMag, ignoreItemEntityData, isActualySwimming, isAddedToWorld, isAlive, isBeingRidden, isBurning, isCrouching, isCustomNameVisible, isDescending, isDiscrete, isEntityEqual, isEntityInsideOpaqueBlock, isGlowing, isImmuneToExplosions, isImmuneToFire, isInLava, isInRangeToRender3d, isInRangeToRenderDist, isInvisible, isInvisibleToPlayer, isInvulnerable, isInvulnerableTo, isInWater, isInWaterOrBubbleColumn, isInWaterRainOrBubbleColumn, isLiving, isNonBoss, isOffsetPositionInLiquid, isOnePlayerRiding, isOnSameTeam, isOnScoreboardTeam, isPassenger, isPassenger, isPassenger, isPoseClear, isPushedByWater, isRidingOrBeingRiddenBy, isRidingSameEntity, isShiftKeyDown, isSilent, isSpectatedByPlayer, isSpectator, isSprinting, isSteppingCarefully, isSuppressingBounce, isSwimming, isVisuallySwimming, isWet, lookAt, makeFlySound, markVelocityChanged, move, moveForced, moveRelative, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, notifyDataManagerChange, onAddedToWorld, onCollideWithPlayer, onEnterBubbleColumn, onEnterBubbleColumnWithAirAbove, onInsideBlock, onKillCommand, onKillEntity, onLivingFall, onRemovedFromWorld, onStruckByLightning, outOfWorld, pick, playFlySound, playSound, playStepSound, playSwimSound, preparePlayerToSpawn, processInitialInteract, pushOutOfBlocks, read, recalculateSize, recenterBoundingBox, remove, remove, removePassenger, removePassengers, removeTag, removeTrackingPlayer, replaceItemInInventory, resetPositionToBB, revive, rotateTowards, sendMessage, setAir, setBoundingBox, setCustomName, setCustomNameVisible, setEntityId, setFire, setFireTimer, setFlag, setGlowing, setHeadRotation, setInLava, setInvisible, setInvulnerable, setItemStackToSlot, setLocationAndAngles, setMotion, setMotion, setMotionMultiplier, setNoGravity, setOnFireFromLava, setPacketCoordinates, setPortal, setPose, setPosition, setPositionAndRotation, setPositionAndUpdate, setPositionNonDirty, setRawPosition, setRenderDistanceWeight, setRenderYawOffset, setRotation, setRotationYawHead, setSilent, setSneaking, setSprinting, setSwimming, setUniqueId, setWorld, shouldReceiveErrors, shouldReceiveFeedback, shouldSetPosAfterLoading, spawnRunningParticles, startRiding, startRiding, stopRiding, teleportKeepLoaded, toString, updateFallState, updatePassenger, updatePortal, updateRidden, updateSwimming, writeUnlessPassenger, writeUnlessRemoved, writeWithoutTypeIdareCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCapscanBeRidden, getCartItem, getCollisionHandler, getComparatorLevel, getCurrentRailPosition, getMaxCartSpeedOnRail, getMinecart, getSlopeAdjustment, isPoweredCart, shouldDoRailFunctionscanBeRiddenInWater, canRiderInteract, deserializeNBT, getClassification, getEntity, getPickedResult, serializeNBT, shouldRiderSitgetCapability, getCapabilityprotected AbstractMinecartEntity(EntityType<?> type, World p_i48538_2_)
protected AbstractMinecartEntity(EntityType<?> type, World p_i48539_2_, double p_i48539_3_, double p_i48539_5_, double p_i48539_7_)
public static AbstractMinecartEntity create(World worldIn, double x, double y, double z, AbstractMinecartEntity.Type typeIn)
protected boolean canTriggerWalking()
canTriggerWalking クラス内 Entityprotected void registerData()
registerData クラス内 Entity@Nullable public AxisAlignedBB getCollisionBox(Entity entityIn)
getCollisionBox クラス内 Entitypublic boolean canBePushed()
canBePushed クラス内 Entitypublic double getMountedYOffset()
getMountedYOffset クラス内 Entitypublic boolean attackEntityFrom(DamageSource source, float amount)
attackEntityFrom クラス内 Entitypublic void killMinecart(DamageSource source)
public void performHurtAnimation()
performHurtAnimation クラス内 Entitypublic boolean canBeCollidedWith()
canBeCollidedWith クラス内 Entitypublic Direction getAdjustedHorizontalFacing()
getAdjustedHorizontalFacing クラス内 Entityprotected double getMaximumSpeed()
public void onActivatorRailPass(int x,
int y,
int z,
boolean receivingPower)
protected void moveDerailedMinecart()
protected void moveAlongTrack(BlockPos pos, BlockState state)
protected void applyDrag()
@Nullable public Vec3d getPosOffset(double x, double y, double z, double offset)
@Nullable public Vec3d getPos(double p_70489_1_, double p_70489_3_, double p_70489_5_)
public AxisAlignedBB getRenderBoundingBox()
getRenderBoundingBox クラス内 Entityprotected void readAdditional(CompoundNBT compound)
readAdditional クラス内 Entityprotected void writeAdditional(CompoundNBT compound)
writeAdditional クラス内 Entitypublic void applyEntityCollision(Entity entityIn)
applyEntityCollision クラス内 Entitypublic void setPositionAndRotationDirect(double x,
double y,
double z,
float yaw,
float pitch,
int posRotationIncrements,
boolean teleport)
setPositionAndRotationDirect クラス内 Entitypublic void setVelocity(double x,
double y,
double z)
setVelocity クラス内 Entitypublic void setDamage(float damage)
public float getDamage()
public void setRollingAmplitude(int rollingAmplitude)
public int getRollingAmplitude()
public void setRollingDirection(int rollingDirection)
public int getRollingDirection()
public abstract AbstractMinecartEntity.Type getMinecartType()
public BlockState getDisplayTile()
public BlockState getDefaultDisplayTile()
public int getDisplayTileOffset()
public int getDefaultDisplayTileOffset()
public void setDisplayTile(BlockState displayTile)
public void setDisplayTileOffset(int displayTileOffset)
public boolean hasDisplayTile()
public void setHasDisplayTile(boolean showBlock)
public IPacket<?> createSpawnPacket()
createSpawnPacket クラス内 Entitypublic boolean canUseRail()
IForgeEntityMinecartcanUseRail インタフェース内 IForgeEntityMinecartpublic void setCanUseRail(boolean value)
IForgeEntityMinecartsetCanUseRail インタフェース内 IForgeEntityMinecartvalue - Whether the minecart can currently use rails.public float getCurrentCartSpeedCapOnRail()
IForgeEntityMinecartgetCurrentCartSpeedCapOnRail インタフェース内 IForgeEntityMinecartpublic void setCurrentCartSpeedCapOnRail(float value)
setCurrentCartSpeedCapOnRail インタフェース内 IForgeEntityMinecartpublic float getMaxSpeedAirLateral()
getMaxSpeedAirLateral インタフェース内 IForgeEntityMinecartpublic void setMaxSpeedAirLateral(float value)
setMaxSpeedAirLateral インタフェース内 IForgeEntityMinecartpublic float getMaxSpeedAirVertical()
getMaxSpeedAirVertical インタフェース内 IForgeEntityMinecartpublic void setMaxSpeedAirVertical(float value)
setMaxSpeedAirVertical インタフェース内 IForgeEntityMinecartpublic double getDragAir()
getDragAir インタフェース内 IForgeEntityMinecartpublic void setDragAir(double value)
setDragAir インタフェース内 IForgeEntityMinecartpublic double getMaxSpeedWithRail()
getMaxSpeedWithRail インタフェース内 IForgeEntityMinecartpublic void moveMinecartOnRail(BlockPos pos)
IForgeEntityMinecartmoveMinecartOnRail インタフェース内 IForgeEntityMinecart