public abstract class AbstractMinecartEntity extends Entity implements IForgeEntityMinecart
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractMinecartEntity.Type |
Entity.IMoveCallback| Modifier and Type | Field and Description |
|---|---|
private boolean |
canBePushed |
private boolean |
canUseRail |
private float |
currentSpeedOnRail |
private static DataParameter<java.lang.Float> |
DAMAGE |
private static DataParameter<java.lang.Integer> |
DISPLAY_TILE |
private static DataParameter<java.lang.Integer> |
DISPLAY_TILE_OFFSET |
private double |
dragAir |
private boolean |
isInReverse |
private static java.util.Map<RailShape,com.mojang.datafixers.util.Pair<Vec3i,Vec3i>> |
MATRIX |
private float |
maxSpeedAirLateral |
private float |
maxSpeedAirVertical |
private double |
minecartPitch |
private double |
minecartX |
private double |
minecartY |
private double |
minecartYaw |
private double |
minecartZ |
private static DataParameter<java.lang.Integer> |
ROLLING_AMPLITUDE |
private static DataParameter<java.lang.Integer> |
ROLLING_DIRECTION |
private static DataParameter<java.lang.Boolean> |
SHOW_BLOCK |
private int |
turnProgress |
private double |
velocityX |
private double |
velocityY |
private double |
velocityZ |
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, 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| Modifier | Constructor and Description |
|---|---|
protected |
AbstractMinecartEntity(EntityType<?> type,
World worldIn) |
protected |
AbstractMinecartEntity(EntityType<?> type,
World worldIn,
double posX,
double posY,
double posZ) |
| 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() |
private boolean |
func_213900_a(BlockPos p_213900_1_) |
private static com.mojang.datafixers.util.Pair<Vec3i,Vec3i> |
func_226573_a_(RailShape p_226573_0_) |
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, 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, 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, getProfessionName, getPushReaction, getRecursivePassengers, getRenderDistanceWeight, getRidingEntity, getRotatedYaw, getRotationYawHead, getScoreboardName, getSelfAndPassengers, 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, isSilent, isSneaking, isSpectatedByPlayer, isSpectator, isSprinting, isSteppingCarefully, isSuppressingBounce, isSwimming, isVisuallySwimming, isWet, lookAt, makeFlySound, markVelocityChanged, maybeBackOffFromEdge, move, moveForced, moveRelative, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, notifyDataManagerChange, onAddedToWorld, onCollideWithPlayer, onEnterBubbleColumn, onEnterBubbleColumnWithAirAbove, onInsideBlock, onKillCommand, onKillEntity, onLivingFall, onRemovedFromWorld, onStruckByLightning, outOfWorld, pick, playFlySound, playSound, playStepSound, playSwimSound, positionRider, preparePlayerToSpawn, processInitialInteract, pushOutOfBlocks, read, recalculateSize, recenterBoundingBox, remove, remove, removePassenger, removePassengers, removeTag, removeTrackingPlayer, replaceItemInInventory, repositionDirectPassengers, 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, serializeCapsclone, finalize, getClass, notify, notifyAll, wait, wait, waitcanBeRidden, getCartItem, getCollisionHandler, getComparatorLevel, getCurrentRailPosition, getMaxCartSpeedOnRail, getMinecart, getSlopeAdjustment, isPoweredCart, shouldDoRailFunctionscanBeRiddenInWater, canRiderInteract, deserializeNBT, getClassification, getEntity, getPickedResult, serializeNBT, shouldRiderSitgetCapability, getCapabilityprivate static final DataParameter<java.lang.Integer> ROLLING_AMPLITUDE
private static final DataParameter<java.lang.Integer> ROLLING_DIRECTION
private static final DataParameter<java.lang.Float> DAMAGE
private static final DataParameter<java.lang.Integer> DISPLAY_TILE
private static final DataParameter<java.lang.Integer> DISPLAY_TILE_OFFSET
private static final DataParameter<java.lang.Boolean> SHOW_BLOCK
private boolean isInReverse
private static final java.util.Map<RailShape,com.mojang.datafixers.util.Pair<Vec3i,Vec3i>> MATRIX
private int turnProgress
private double minecartX
private double minecartY
private double minecartZ
private double minecartYaw
private double minecartPitch
private double velocityX
private double velocityY
private double velocityZ
private boolean canBePushed
private boolean canUseRail
private float currentSpeedOnRail
private float maxSpeedAirLateral
private float maxSpeedAirVertical
private double dragAir
protected AbstractMinecartEntity(EntityType<?> type, World worldIn)
protected AbstractMinecartEntity(EntityType<?> type, World worldIn, double posX, double posY, double posZ)
public static AbstractMinecartEntity create(World worldIn, double x, double y, double z, AbstractMinecartEntity.Type typeIn)
protected boolean canTriggerWalking()
canTriggerWalking in class Entityprotected void registerData()
registerData in class Entity@Nullable public AxisAlignedBB getCollisionBox(Entity entityIn)
getCollisionBox in class Entitypublic boolean canBePushed()
canBePushed in class Entitypublic double getMountedYOffset()
getMountedYOffset in class Entitypublic boolean attackEntityFrom(DamageSource source, float amount)
attackEntityFrom in class Entitypublic void killMinecart(DamageSource source)
public void performHurtAnimation()
performHurtAnimation in class Entitypublic boolean canBeCollidedWith()
canBeCollidedWith in class Entityprivate static com.mojang.datafixers.util.Pair<Vec3i,Vec3i> func_226573_a_(RailShape p_226573_0_)
public Direction getAdjustedHorizontalFacing()
getAdjustedHorizontalFacing in class Entityprotected double getMaximumSpeed()
public void onActivatorRailPass(int x,
int y,
int z,
boolean receivingPower)
protected void moveDerailedMinecart()
protected void moveAlongTrack(BlockPos pos, BlockState state)
private boolean func_213900_a(BlockPos p_213900_1_)
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 Entityprotected void readAdditional(CompoundNBT compound)
readAdditional in class Entityprotected void writeAdditional(CompoundNBT compound)
writeAdditional in class Entitypublic void applyEntityCollision(Entity entityIn)
applyEntityCollision in class Entitypublic void setPositionAndRotationDirect(double x,
double y,
double z,
float yaw,
float pitch,
int posRotationIncrements,
boolean teleport)
setPositionAndRotationDirect in class Entitypublic void setVelocity(double x,
double y,
double z)
setVelocity in class 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 in class Entitypublic boolean canUseRail()
IForgeEntityMinecartcanUseRail in interface IForgeEntityMinecartpublic void setCanUseRail(boolean value)
IForgeEntityMinecartsetCanUseRail in interface IForgeEntityMinecartvalue - Whether the minecart can currently use rails.public float getCurrentCartSpeedCapOnRail()
IForgeEntityMinecartgetCurrentCartSpeedCapOnRail in interface IForgeEntityMinecartpublic void setCurrentCartSpeedCapOnRail(float value)
setCurrentCartSpeedCapOnRail in interface IForgeEntityMinecartpublic float getMaxSpeedAirLateral()
getMaxSpeedAirLateral in interface IForgeEntityMinecartpublic void setMaxSpeedAirLateral(float value)
setMaxSpeedAirLateral in interface IForgeEntityMinecartpublic float getMaxSpeedAirVertical()
getMaxSpeedAirVertical in interface IForgeEntityMinecartpublic void setMaxSpeedAirVertical(float value)
setMaxSpeedAirVertical in interface IForgeEntityMinecartpublic double getDragAir()
getDragAir in interface IForgeEntityMinecartpublic void setDragAir(double value)
setDragAir in interface IForgeEntityMinecartpublic double getMaxSpeedWithRail()
getMaxSpeedWithRail in interface IForgeEntityMinecartpublic void moveMinecartOnRail(BlockPos pos)
IForgeEntityMinecartmoveMinecartOnRail in interface IForgeEntityMinecart