public abstract class AbstractMinecartEntity extends Entity implements IForgeEntityMinecart
Modifier and Type | Class and Description |
---|---|
static class |
AbstractMinecartEntity.Type |
addedToChunk, 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, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, removed, rideCooldown, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, submergedHeight, teleportDirection, ticksExisted, timeUntilPortal, velocityChanged, world
COLLISIONS, DEFAULT_AIR_DRAG, DEFAULT_MAX_SPEED_AIR_LATERAL, DEFAULT_MAX_SPEED_AIR_VERTICAL
field_213139_a_
Modifier | Constructor and Description |
---|---|
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_) |
Modifier and Type | Method and Description |
---|---|
protected void |
applyDrag() |
void |
applyEntityCollision(Entity entityIn) |
boolean |
attackEntityFrom(DamageSource source,
float amount) |
boolean |
canBeCollidedWith() |
boolean |
canBePushed() |
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() |
AxisAlignedBB |
getCollisionBox(Entity entityIn) |
float |
getCurrentCartSpeedCapOnRail()
Returns the current speed cap for the cart when traveling on rails.
|
float |
getDamage() |
BlockState |
getDefaultDisplayTile() |
int |
getDefaultDisplayTileOffset() |
BlockState |
getDisplayTile() |
int |
getDisplayTileOffset() |
double |
getDragAir() |
protected double |
getMaximumSpeed() |
float |
getMaxSpeedAirLateral() |
float |
getMaxSpeedAirVertical() |
double |
getMaxSpeedWithRail() |
abstract AbstractMinecartEntity.Type |
getMinecartType() |
double |
getMountedYOffset() |
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() |
int |
getRollingAmplitude() |
int |
getRollingDirection() |
boolean |
hasDisplayTile() |
void |
killMinecart(DamageSource source) |
protected void |
moveAlongTrack(BlockPos pos,
BlockState state) |
protected void |
moveDerailedMinecart() |
void |
moveMinecartOnRail(BlockPos pos)
Moved to allow overrides.
|
void |
onActivatorRailPass(int x,
int y,
int z,
boolean receivingPower) |
void |
performHurtAnimation() |
protected void |
readAdditional(CompoundNBT compound) |
protected void |
registerData() |
void |
setCanUseRail(boolean value)
Set whether the minecart can use rails.
|
void |
setCurrentCartSpeedCapOnRail(float value) |
void |
setDamage(float damage) |
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) |
void |
setRollingAmplitude(int rollingAmplitude) |
void |
setRollingDirection(int rollingDirection) |
void |
setVelocity(double x,
double y,
double z) |
void |
tick() |
protected void |
writeAdditional(CompoundNBT compound) |
addPassenger, addTag, addTrackingPlayer, addVelocity, allowLogging, applyEnchantments, applyOrientationToEntity, applyPlayerInteraction, areEyesInFluid, areEyesInFluid, awardKillScore, baseTick, canBeAttackedWithItem, canBeRidden, canBeRiddenInWater, canExplosionDestroyBlock, canFitPassenger, canPassengerSteer, canRenderOnFire, canSwim, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, changeDimension, copyDataFromOld, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, decrementTimeUntilPortal, detach, determineNextStepDistance, doBlockCollisions, doesEntityNotTriggerPressurePlate, doWaterSplashEffect, entityDropItem, entityDropItem, entityDropItem, entityDropItem, equals, extinguish, fall, fillCrashReport, func_213286_i, func_213296_b, func_213300_bk, func_213312_b, func_213314_bj, func_213320_d, func_213324_a, func_223307_a, func_223308_g, func_223310_a, func_223314_ad, getAbsoluteMotion, getAir, getAllowedMovement, getAlwaysRenderNameTagForRender, getArmorInventoryList, getBoundingBox, getBoundingBox, getBrightness, getBrightnessForRender, getCachedUniqueIdString, getCollisionBorderSize, getCollisionBoundingBox, getCommandSource, getControllingPassenger, getCustomName, getDataManager, getDisplayName, getDistance, getDistanceSq, getDistanceSq, getDistanceSq, getEntityId, getEntityString, getEntityWorld, getEquipmentAndArmor, getExplosionResistance, getEyeHeight, getEyeHeight, getEyeHeight, getEyePosition, getFireImmuneTicks, getFlag, getForward, getHeight, getHeldEquipment, getHighspeedSplashSound, getHorizontalFacing, getHoverEvent, getLastPortalVec, getLook, getLookVec, getLowestRidingEntity, getMaxAir, getMaxFallHeight, getMaxInPortalTime, getMirroredYaw, getMotion, getName, getPassengers, getPermissionLevel, getPersistentData, getPitch, getPitchYaw, getPortalCooldown, getPose, getPosition, getPositionVec, getPositionVector, getPushReaction, getRecursivePassengers, getRenderDistanceWeight, getRidingEntity, getRotatedYaw, getRotationYawHead, getScoreboardName, getServer, getSize, getSoundCategory, getSplashSound, getSubmergedHeight, getSwimSound, getTags, getTeam, getTeleportDirection, getType, getUniqueID, getVectorForRotation, getWidth, getYaw, getYOffset, handleFluidAcceleration, handlePistonMovement, handleSneakMovement, handleStatusUpdate, handleWaterMovement, hasCustomName, hashCode, hasNoGravity, hasPermissionLevel, hitByEntity, ignoreItemEntityData, isAddedToWorld, isAlive, isBeingRidden, isBurning, isCustomNameVisible, 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, isSilent, isSneaking, isSpectatedByPlayer, isSpectator, isSprinting, isSwimming, isWet, lookAt, makeFlySound, markVelocityChanged, move, moveRelative, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, notifyDataManagerChange, onAddedToWorld, onCollideWithPlayer, onEnterBubbleColumn, onEnterBubbleColumnWithAirAbove, onInsideBlock, onKillCommand, onKillEntity, onRemovedFromWorld, onStruckByLightning, outOfWorld, playFlySound, playSound, playStepSound, playSwimSound, preparePlayerToSpawn, processInitialInteract, pushOutOfBlocks, read, recalculateSize, remove, remove, removePassenger, removePassengers, removeTag, removeTrackingPlayer, replaceItemInInventory, resetPositionToBB, revive, rotateTowards, sendMessage, setAir, setBoundingBox, setCustomName, setCustomNameVisible, setEntityId, setFire, setFlag, setGlowing, setHeadRotation, setInLava, setInvisible, setInvulnerable, setItemStackToSlot, setLocationAndAngles, setMotion, setMotion, setMotionMultiplier, setNoGravity, setOnFireFromLava, setPortal, setPose, setPosition, setPositionAndRotation, setPositionAndUpdate, setPositionNonDirty, setRenderDistanceWeight, setRenderYawOffset, setRotation, setRotationYawHead, setSilent, setSneaking, setSprinting, setSwimming, setUniqueId, setWorld, shouldReceiveErrors, shouldReceiveFeedback, shouldRenderSneaking, shouldSetPosAfterLoading, spawnRunningParticles, startRiding, startRiding, stopRiding, teleportKeepLoaded, toString, updateFallState, updatePassenger, updatePortal, updateRidden, updateSwimming, writeUnlessPassenger, writeUnlessRemoved, writeWithoutTypeId
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
canBeRidden, getCartItem, getCollisionHandler, getComparatorLevel, getCurrentRailPosition, getMaxCartSpeedOnRail, getMinecart, getSlopeAdjustment, isPoweredCart, shouldDoRailFunctions
canBeRiddenInWater, canRiderInteract, deserializeNBT, getClassification, getEntity, getPickedResult, serializeNBT, shouldRiderSit
getCapability, getCapability
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_)
public static AbstractMinecartEntity create(World worldIn, double x, double y, double z, AbstractMinecartEntity.Type typeIn)
protected boolean canTriggerWalking()
canTriggerWalking
in class Entity
protected void registerData()
registerData
in class Entity
@Nullable public AxisAlignedBB getCollisionBox(Entity entityIn)
getCollisionBox
in class Entity
public boolean canBePushed()
canBePushed
in class Entity
public double getMountedYOffset()
getMountedYOffset
in class Entity
public boolean attackEntityFrom(DamageSource source, float amount)
attackEntityFrom
in class Entity
public void killMinecart(DamageSource source)
public void performHurtAnimation()
performHurtAnimation
in class Entity
public boolean canBeCollidedWith()
canBeCollidedWith
in class Entity
public Direction getAdjustedHorizontalFacing()
getAdjustedHorizontalFacing
in class Entity
protected 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
in class Entity
protected void readAdditional(CompoundNBT compound)
readAdditional
in class Entity
protected void writeAdditional(CompoundNBT compound)
writeAdditional
in class Entity
public void applyEntityCollision(Entity entityIn)
applyEntityCollision
in class Entity
public void setPositionAndRotationDirect(double x, double y, double z, float yaw, float pitch, int posRotationIncrements, boolean teleport)
setPositionAndRotationDirect
in class Entity
public void setVelocity(double x, double y, double z)
setVelocity
in class Entity
public 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
in class Entity
public boolean canUseRail()
IForgeEntityMinecart
canUseRail
in interface IForgeEntityMinecart
public void setCanUseRail(boolean value)
IForgeEntityMinecart
setCanUseRail
in interface IForgeEntityMinecart
value
- Whether the minecart can currently use rails.public float getCurrentCartSpeedCapOnRail()
IForgeEntityMinecart
getCurrentCartSpeedCapOnRail
in interface IForgeEntityMinecart
public void setCurrentCartSpeedCapOnRail(float value)
setCurrentCartSpeedCapOnRail
in interface IForgeEntityMinecart
public float getMaxSpeedAirLateral()
getMaxSpeedAirLateral
in interface IForgeEntityMinecart
public void setMaxSpeedAirLateral(float value)
setMaxSpeedAirLateral
in interface IForgeEntityMinecart
public float getMaxSpeedAirVertical()
getMaxSpeedAirVertical
in interface IForgeEntityMinecart
public void setMaxSpeedAirVertical(float value)
setMaxSpeedAirVertical
in interface IForgeEntityMinecart
public double getDragAir()
getDragAir
in interface IForgeEntityMinecart
public void setDragAir(double value)
setDragAir
in interface IForgeEntityMinecart
public double getMaxSpeedWithRail()
getMaxSpeedWithRail
in interface IForgeEntityMinecart
public void moveMinecartOnRail(BlockPos pos)
IForgeEntityMinecart
moveMinecartOnRail
in interface IForgeEntityMinecart