public abstract class EntityMinecart extends Entity implements IWorldNameable
Modifier and Type | Class and Description |
---|---|
static class |
EntityMinecart.EnumMinecartType |
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, capturedDrops, captureDrops, chunkCoordX, chunkCoordY, chunkCoordZ, dataWatcher, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, extendedProperties, fallDistance, fireResistance, firstUpdate, forceSpawn, height, hurtResistantTime, ignoreFrustumCheck, inPortal, inWater, isAirBorne, isCollided, isCollidedHorizontally, isCollidedVertically, isDead, isImmuneToFire, isInWeb, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, noClip, onGround, portalCounter, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, renderDistanceWeight, riddenByEntity, ridingEntity, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, teleportDirection, ticksExisted, timeUntilPortal, velocityChanged, width, worldObj
Constructor and Description |
---|
EntityMinecart(World worldIn) |
EntityMinecart(World worldIn,
double p_i1713_2_,
double p_i1713_4_,
double p_i1713_6_) |
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.
|
protected void |
entityInit() |
protected double |
func_174898_m() |
void |
func_174899_a(IBlockState p_174899_1_) |
void |
func_180426_a(double p_180426_1_,
double p_180426_3_,
double p_180426_5_,
float p_180426_7_,
float p_180426_8_,
int p_180426_9_,
boolean p_180426_10_) |
static EntityMinecart |
func_180458_a(World worldIn,
double p_180458_1_,
double p_180458_3_,
double p_180458_5_,
EntityMinecart.EnumMinecartType p_180458_7_) |
protected void |
func_180460_a(BlockPos p_180460_1_,
IBlockState p_180460_2_) |
Vec3 |
func_70489_a(double p_70489_1_,
double p_70489_3_,
double p_70489_5_) |
Vec3 |
func_70495_a(double p_70495_1_,
double p_70495_3_,
double p_70495_5_,
double p_70495_7_) |
AxisAlignedBB |
getBoundingBox() |
ItemStack |
getCartItem()
This function returns an ItemStack that represents this cart.
|
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.
|
java.lang.String |
getCustomNameTag() |
float |
getDamage() |
IBlockState |
getDefaultDisplayTile() |
int |
getDefaultDisplayTileOffset() |
IChatComponent |
getDisplayName() |
IBlockState |
getDisplayTile() |
int |
getDisplayTileOffset() |
double |
getDragAir() |
float |
getMaxCartSpeedOnRail()
Returns the carts max speed when traveling on rails.
|
protected double |
getMaxSpeed() |
float |
getMaxSpeedAirLateral() |
float |
getMaxSpeedAirVertical() |
abstract EntityMinecart.EnumMinecartType |
getMinecartType() |
double |
getMountedYOffset() |
java.lang.String |
getName() |
int |
getRollingAmplitude() |
int |
getRollingDirection() |
double |
getSlopeAdjustment() |
boolean |
hasCustomName() |
boolean |
hasDisplayTile() |
boolean |
isPoweredCart()
Returns true if this cart is self propelled.
|
void |
killMinecart(DamageSource p_94095_1_) |
protected void |
moveDerailedMinecart() |
void |
moveMinecartOnRail(BlockPos pos)
Moved to allow overrides.
|
void |
onActivatorRailPass(int p_96095_1_,
int p_96095_2_,
int p_96095_3_,
boolean p_96095_4_) |
void |
onUpdate() |
void |
performHurtAnimation() |
protected void |
readEntityFromNBT(NBTTagCompound tagCompund) |
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 |
setCustomNameTag(java.lang.String p_96094_1_) |
void |
setDamage(float p_70492_1_) |
void |
setDead() |
void |
setDisplayTileOffset(int p_94086_1_) |
void |
setDragAir(double value) |
void |
setHasDisplayTile(boolean p_94096_1_) |
void |
setMaxSpeedAirLateral(float value) |
void |
setMaxSpeedAirVertical(float value) |
void |
setPosition(double x,
double y,
double z) |
void |
setRollingAmplitude(int p_70497_1_) |
void |
setRollingDirection(int p_70494_1_) |
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 tagCompound) |
addChatMessage, addEntityCrashInfo, addToPlayerScore, addVelocity, canAttackWithItem, canRenderOnFire, canRiderInteract, canUseCommand, copyDataFromOld, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, doBlockCollisions, doesEntityNotTriggerPressurePlate, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, fall, func_145781_i, func_174807_aT, func_174815_a, func_174816_a, func_174817_o, func_174819_aU, func_174823_aP, func_174825_a, func_174827_a, func_174834_g, func_180427_aV, func_180433_a, getAir, getAlwaysRenderNameTag, getAlwaysRenderNameTagForRender, getBrightness, getBrightnessForRender, getCollisionBorderSize, getCommandSenderEntity, getDataWatcher, getDistance, getDistanceSq, getDistanceSq, getDistanceSqToCenter, getDistanceSqToEntity, getDistanceToEntity, getEntityBoundingBox, getEntityData, getEntityId, getEntityString, getEntityWorld, getExplosionResistance, getExtendedProperties, getEyeHeight, getFlag, getHorizontalFacing, getInventory, getLook, getLookVec, getMaxFallHeight, getMaxInPortalTime, getParts, getPersistentID, getPickedResult, getPortalCooldown, getPosition, getPositionEyes, getPositionVector, getRotationYawHead, getSplashSound, getSwimSound, getTeleportDirection, getUniqueID, getVectorForRotation, getYOffset, handleHealthUpdate, handleWaterMovement, hashCode, hitByEntity, interactFirst, isBurning, isCreatureType, isEating, isEntityAlive, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInvulnerable, isImmuneToFire, isInLava, isInRangeToRender3d, isInRangeToRenderDist, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isOffsetPositionInLiquid, isOutsideBorder, isPushedByWater, isRiding, isSilent, isSneaking, isSprinting, isWet, kill, mountEntity, moveEntity, moveFlying, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, onChunkLoad, onCollideWithPlayer, onEntityUpdate, onKillCommand, onKillEntity, onStruckByLightning, playSound, playStepSound, preparePlayerToSpawn, pushOutOfBlocks, rayTrace, readFromNBT, registerExtendedProperties, replaceItemInInventory, resetEntityId, resetHeight, sendCommandFeedback, setAir, setAlwaysRenderNameTag, setAngles, setBeenAttacked, setCommandStat, setCurrentItemOrArmor, setEating, setEntityBoundingBox, setEntityId, setFire, setFlag, setInPortal, setInvisible, setInWeb, setLocationAndAngles, setOnFireFromLava, setOutsideBorder, setPositionAndRotation, setPositionAndUpdate, setRotation, setRotationYawHead, setSilent, setSize, setSneaking, setSprinting, setWorld, shouldDismountInWater, shouldRenderInPass, shouldRiderSit, shouldSetPosAfterLoading, spawnRunningParticles, toString, travelToDimension, updateRidden, updateRiderPosition, writeMountToNBT, writeToNBT, writeToNBTOptional
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 p_i1713_2_, double p_i1713_4_, double p_i1713_6_)
public static EntityMinecart func_180458_a(World worldIn, double p_180458_1_, double p_180458_3_, double p_180458_5_, EntityMinecart.EnumMinecartType p_180458_7_)
protected boolean canTriggerWalking()
canTriggerWalking
in class Entity
protected void entityInit()
entityInit
in class Entity
public AxisAlignedBB getCollisionBox(Entity entityIn)
getCollisionBox
in class Entity
public AxisAlignedBB getBoundingBox()
getBoundingBox
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 p_94095_1_)
public void performHurtAnimation()
performHurtAnimation
in class Entity
public boolean canBeCollidedWith()
canBeCollidedWith
in class Entity
protected double func_174898_m()
public void onActivatorRailPass(int p_96095_1_, int p_96095_2_, int p_96095_3_, boolean p_96095_4_)
protected void moveDerailedMinecart()
protected void func_180460_a(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 Vec3 func_70495_a(double p_70495_1_, double p_70495_3_, double p_70495_5_, double p_70495_7_)
public Vec3 func_70489_a(double p_70489_1_, double p_70489_3_, double p_70489_5_)
protected void readEntityFromNBT(NBTTagCompound tagCompund)
readEntityFromNBT
in class Entity
protected void writeEntityToNBT(NBTTagCompound tagCompound)
writeEntityToNBT
in class Entity
public void applyEntityCollision(Entity entityIn)
applyEntityCollision
in class Entity
public void func_180426_a(double p_180426_1_, double p_180426_3_, double p_180426_5_, float p_180426_7_, float p_180426_8_, int p_180426_9_, boolean p_180426_10_)
func_180426_a
in class Entity
public void setDamage(float p_70492_1_)
public void setVelocity(double x, double y, double z)
setVelocity
in class Entity
public float getDamage()
public void setRollingAmplitude(int p_70497_1_)
public int getRollingAmplitude()
public void setRollingDirection(int p_70494_1_)
public int getRollingDirection()
public abstract EntityMinecart.EnumMinecartType getMinecartType()
public IBlockState getDisplayTile()
public IBlockState getDefaultDisplayTile()
public int getDisplayTileOffset()
public int getDefaultDisplayTileOffset()
public void func_174899_a(IBlockState p_174899_1_)
public void setDisplayTileOffset(int p_94086_1_)
public boolean hasDisplayTile()
public void setHasDisplayTile(boolean p_94096_1_)
public void setCustomNameTag(java.lang.String p_96094_1_)
setCustomNameTag
in class Entity
public java.lang.String getName()
getName
in interface ICommandSender
getName
in interface IWorldNameable
getName
in class Entity
public boolean hasCustomName()
hasCustomName
in interface IWorldNameable
hasCustomName
in class Entity
public java.lang.String getCustomNameTag()
getCustomNameTag
in class Entity
public IChatComponent getDisplayName()
getDisplayName
in interface ICommandSender
getDisplayName
in interface IWorldNameable
getDisplayName
in class Entity
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()