public abstract class EntityMinecart extends Entity implements IWorldNameable
Modifier and Type | Class and Description |
---|---|
static class |
EntityMinecart.Type |
Modifier and Type | Field and Description |
---|---|
protected boolean |
canBePushed |
protected boolean |
canUseRail |
static double |
defaultDragAir |
static float |
defaultMaxSpeedAirLateral |
static float |
defaultMaxSpeedAirVertical |
protected double |
dragAir |
protected float |
maxSpeedAirLateral |
protected float |
maxSpeedAirVertical |
addedToChunk, cachedUniqueIdString, capturedDrops, captureDrops, chunkCoordX, chunkCoordY, chunkCoordZ, dataManager, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, fallDistance, fireResistance, firstUpdate, forceSpawn, glowing, height, hurtResistantTime, ignoreFrustumCheck, inPortal, inWater, isAirBorne, isCollided, isCollidedHorizontally, isCollidedVertically, isDead, isImmuneToFire, isInWeb, lastPortalPos, lastPortalVec, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, noClip, onGround, portalCounter, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, rideCooldown, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, teleportDirection, ticksExisted, timeUntilPortal, velocityChanged, width, worldObj
Constructor and Description |
---|
EntityMinecart(World worldIn) |
EntityMinecart(World worldIn,
double x,
double y,
double z) |
Modifier and Type | Method and Description |
---|---|
protected void |
applyDrag() |
void |
applyEntityCollision(Entity entityIn) |
boolean |
attackEntityFrom(DamageSource source,
float amount) |
boolean |
canBeCollidedWith() |
boolean |
canBePushed() |
boolean |
canBeRidden()
Returns true if this cart can be ridden by an Entity.
|
protected boolean |
canTriggerWalking() |
boolean |
canUseRail()
Returns true if this cart can currently use rails.
|
static EntityMinecart |
create(World worldIn,
double x,
double y,
double z,
EntityMinecart.Type typeIn) |
protected void |
entityInit() |
EnumFacing |
getAdjustedHorizontalFacing() |
ItemStack |
getCartItem()
This function returns an ItemStack that represents this cart.
|
AxisAlignedBB |
getCollisionBoundingBox() |
AxisAlignedBB |
getCollisionBox(Entity entityIn) |
static IMinecartCollisionHandler |
getCollisionHandler()
Gets the current global Minecart Collision handler if none
is registered, returns null
|
float |
getCurrentCartSpeedCapOnRail()
Returns the current speed cap for the cart when traveling on rails.
|
float |
getDamage() |
IBlockState |
getDefaultDisplayTile() |
int |
getDefaultDisplayTileOffset() |
IBlockState |
getDisplayTile() |
int |
getDisplayTileOffset() |
double |
getDragAir() |
float |
getMaxCartSpeedOnRail()
Returns the carts max speed when traveling on rails.
|
protected double |
getMaximumSpeed() |
protected double |
getMaxSpeed() |
float |
getMaxSpeedAirLateral() |
float |
getMaxSpeedAirVertical() |
double |
getMountedYOffset() |
Vec3d |
getPos(double p_70489_1_,
double p_70489_3_,
double p_70489_5_) |
Vec3d |
getPosOffset(double p_70495_1_,
double p_70495_3_,
double p_70495_5_,
double p_70495_7_) |
AxisAlignedBB |
getRenderBoundingBox() |
int |
getRollingAmplitude() |
int |
getRollingDirection() |
double |
getSlopeAdjustment() |
abstract EntityMinecart.Type |
getType() |
boolean |
hasDisplayTile() |
boolean |
isPoweredCart()
Returns true if this cart is self propelled.
|
void |
killMinecart(DamageSource source) |
protected void |
moveAlongTrack(BlockPos p_180460_1_,
IBlockState p_180460_2_) |
protected void |
moveDerailedMinecart() |
void |
moveMinecartOnRail(BlockPos pos)
Moved to allow overrides.
|
void |
onActivatorRailPass(int x,
int y,
int z,
boolean receivingPower) |
void |
onUpdate() |
void |
performHurtAnimation() |
protected void |
readEntityFromNBT(NBTTagCompound compound) |
void |
setCanUseRail(boolean use)
Set whether the minecart can use rails.
|
static void |
setCollisionHandler(IMinecartCollisionHandler handler)
Sets the global Minecart Collision handler, overwrites any
that is currently set.
|
void |
setCurrentCartSpeedCapOnRail(float value) |
void |
setDamage(float damage) |
void |
setDead() |
void |
setDisplayTile(IBlockState displayTile) |
void |
setDisplayTileOffset(int displayTileOffset) |
void |
setDragAir(double value) |
void |
setHasDisplayTile(boolean showBlock) |
void |
setMaxSpeedAirLateral(float value) |
void |
setMaxSpeedAirVertical(float value) |
void |
setPosition(double x,
double y,
double z) |
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) |
boolean |
shouldDoRailFunctions()
Return false if this cart should not call onMinecartPass() and should ignore Powered Rails.
|
protected void |
writeEntityToNBT(NBTTagCompound compound) |
addChatMessage, addEntityCrashInfo, addPassenger, addTag, addToPlayerScore, addTrackingPlayer, addVelocity, applyEnchantments, applyOrientationToEntity, applyPlayerInteraction, canBeAttackedWithItem, canBeRidden, canCommandSenderUseCommand, canFitPassenger, canPassengerSteer, canRenderOnFire, canRiderInteract, changeDimension, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, decrementTimeUntilPortal, deserializeNBT, dismountRidingEntity, doBlockCollisions, doesEntityNotTriggerPressurePlate, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, fall, getAir, getAlwaysRenderNameTag, getAlwaysRenderNameTagForRender, getArmorInventoryList, getBrightness, getBrightnessForRender, getCachedUniqueIdString, getCapability, getCollisionBorderSize, getCommandSenderEntity, getCommandStats, getControllingPassenger, getCustomNameTag, getDataManager, getDisplayName, getDistance, getDistanceSq, getDistanceSq, getDistanceSqToCenter, getDistanceSqToEntity, getDistanceToEntity, getEntityBoundingBox, getEntityData, getEntityId, getEntityString, getEntityWorld, getEquipmentAndArmor, getExplosionResistance, getEyeHeight, getFlag, getHeldEquipment, getHorizontalFacing, getHoverEvent, getLastPortalVec, getLook, getLookVec, getLowestRidingEntity, getMaxFallHeight, getMaxInPortalTime, getMirroredYaw, getName, getParts, getPassengers, getPersistentID, getPickedResult, getPortalCooldown, getPosition, getPositionEyes, getPositionVector, getPushReaction, getRecursivePassengers, getRecursivePassengersByType, getRenderDistanceWeight, getRidingEntity, getRotatedYaw, getRotationYawHead, getServer, getSoundCategory, getSplashSound, getSwimSound, getTags, getTeam, getTeleportDirection, getUniqueID, getVectorForRotation, getYOffset, handleStatusUpdate, handleWaterMovement, hasCapability, hasCustomName, hashCode, hitByEntity, ignoreItemEntityData, isBeingRidden, isBurning, isCreatureType, isEntityAlive, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInvulnerable, isGlowing, isImmuneToExplosions, isImmuneToFire, isInLava, isInRangeToRender3d, isInRangeToRenderDist, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isNonBoss, isOffsetPositionInLiquid, isOnSameTeam, isOnScoreboardTeam, isOutsideBorder, isPassenger, isPushedByWater, isRiding, isRidingOrBeingRiddenBy, isRidingSameEntity, isSilent, isSneaking, isSpectatedByPlayer, isSprinting, isWet, kill, moveEntity, moveRelative, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, notifyDataManagerChange, onChunkLoad, onCollideWithPlayer, onEntityUpdate, onKillCommand, onKillEntity, onStruckByLightning, playSound, playStepSound, preparePlayerToSpawn, processInitialInteract, pushOutOfBlocks, rayTrace, readFromNBT, removePassenger, removePassengers, removeTag, removeTrackingPlayer, replaceItemInInventory, resetEntityId, resetHeight, resetPositionToBB, sendCommandFeedback, serializeNBT, setAir, setAlwaysRenderNameTag, setAngles, setBeenAttacked, setCommandStat, setCommandStats, setCustomNameTag, setDropItemsWhenDead, setEntityBoundingBox, setEntityId, setEntityInvulnerable, setFire, setFlag, setGlowing, setInvisible, setInWeb, setItemStackToSlot, setLocationAndAngles, setOnFireFromLava, setOutsideBorder, setPortal, setPositionAndRotation, setPositionAndUpdate, setPositionNonDirty, setRenderDistanceWeight, setRenderYawOffset, setRotation, setRotationYawHead, setSilent, setSize, setSneaking, setSprinting, setUniqueId, setWorld, shouldDismountInWater, shouldRenderInPass, shouldRiderSit, shouldSetPosAfterLoading, spawnRunningParticles, startRiding, startRiding, toString, updateFallState, updatePassenger, updateRidden, verifyExplosion, writeToNBT, writeToNBTAtomically, writeToNBTOptional
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getDisplayName, getName, hasCustomName
public static float defaultMaxSpeedAirLateral
public static float defaultMaxSpeedAirVertical
public static double defaultDragAir
protected boolean canUseRail
protected boolean canBePushed
protected float maxSpeedAirLateral
protected float maxSpeedAirVertical
protected double dragAir
public EntityMinecart(World worldIn)
public EntityMinecart(World worldIn, double x, double y, double z)
public static EntityMinecart create(World worldIn, double x, double y, double z, EntityMinecart.Type typeIn)
protected boolean canTriggerWalking()
canTriggerWalking
in class Entity
protected void entityInit()
entityInit
in class Entity
@Nullable public AxisAlignedBB getCollisionBox(Entity entityIn)
getCollisionBox
in class Entity
@Nullable public AxisAlignedBB getCollisionBoundingBox()
getCollisionBoundingBox
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 EnumFacing 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 p_180460_1_, IBlockState p_180460_2_)
protected void applyDrag()
public void setPosition(double x, double y, double z)
setPosition
in class Entity
public Vec3d getPosOffset(double p_70495_1_, double p_70495_3_, double p_70495_5_, double p_70495_7_)
public Vec3d getPos(double p_70489_1_, double p_70489_3_, double p_70489_5_)
public AxisAlignedBB getRenderBoundingBox()
getRenderBoundingBox
in class Entity
protected void readEntityFromNBT(NBTTagCompound compound)
readEntityFromNBT
in class Entity
protected void writeEntityToNBT(NBTTagCompound compound)
writeEntityToNBT
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 setDamage(float damage)
public void setVelocity(double x, double y, double z)
setVelocity
in class Entity
public float getDamage()
public void setRollingAmplitude(int rollingAmplitude)
public int getRollingAmplitude()
public void setRollingDirection(int rollingDirection)
public int getRollingDirection()
public abstract EntityMinecart.Type getType()
public IBlockState getDisplayTile()
public IBlockState getDefaultDisplayTile()
public int getDisplayTileOffset()
public int getDefaultDisplayTileOffset()
public void setDisplayTile(IBlockState displayTile)
public void setDisplayTileOffset(int displayTileOffset)
public boolean hasDisplayTile()
public void setHasDisplayTile(boolean showBlock)
protected double getMaxSpeed()
public void moveMinecartOnRail(BlockPos pos)
public static IMinecartCollisionHandler getCollisionHandler()
public static void setCollisionHandler(IMinecartCollisionHandler handler)
handler
- The new handlerpublic ItemStack getCartItem()
public boolean canUseRail()
public void setCanUseRail(boolean use)
use
- Whether the minecart can currently use rails.public boolean shouldDoRailFunctions()
public boolean isPoweredCart()
public boolean canBeRidden()
public float getMaxCartSpeedOnRail()
public final float getCurrentCartSpeedCapOnRail()
public final void setCurrentCartSpeedCapOnRail(float value)
public float getMaxSpeedAirLateral()
public void setMaxSpeedAirLateral(float value)
public float getMaxSpeedAirVertical()
public void setMaxSpeedAirVertical(float value)
public double getDragAir()
public void setDragAir(double value)
public double getSlopeAdjustment()