public abstract class EntityMinecart extends Entity
Entity.EnumEntitySize
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, boundingBox, capturedDrops, captureDrops, chunkCoordX, chunkCoordY, chunkCoordZ, dataWatcher, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, extendedProperties, fallDistance, field_70135_K, fireResistance, forceSpawn, height, hurtResistantTime, ignoreFrustumCheck, inPortal, inWater, isAirBorne, isCollided, isCollidedHorizontally, isCollidedVertically, isDead, isImmuneToFire, isInWeb, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, myEntitySize, 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, yOffset, ySize
Constructor and Description |
---|
EntityMinecart(World par1World) |
EntityMinecart(World par1World,
double par2,
double par4,
double par6) |
Modifier and Type | Method and Description |
---|---|
protected void |
applyDrag() |
void |
applyEntityCollision(Entity par1Entity) |
boolean |
attackEntityFrom(DamageSource par1DamageSource,
float par2) |
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 |
createMinecart(World par0World,
double par1,
double par3,
double par5,
int par7) |
protected void |
entityInit() |
Block |
func_145817_o() |
void |
func_145819_k(int p_145819_1_) |
Block |
func_145820_n() |
protected void |
func_145821_a(int p_145821_1_,
int p_145821_2_,
int p_145821_3_,
double p_145821_4_,
double p_145821_6_,
Block p_145821_8_,
int p_145821_9_) |
Vec3 |
func_70489_a(double par1,
double par3,
double par5) |
Vec3 |
func_70495_a(double par1,
double par3,
double par5,
double par7) |
protected void |
func_94088_b(double par1) |
java.lang.String |
func_95999_t() |
AxisAlignedBB |
getBoundingBox() |
ItemStack |
getCartItem()
This function returns an ItemStack that represents this cart.
|
AxisAlignedBB |
getCollisionBox(Entity par1Entity) |
static IMinecartCollisionHandler |
getCollisionHandler()
Gets the current global Minecart Collision handler if none
is registered, returns null
|
java.lang.String |
getCommandSenderName() |
float |
getCurrentCartSpeedCapOnRail()
Returns the current speed cap for the cart when traveling on rails.
|
float |
getDamage() |
int |
getDefaultDisplayTileData() |
int |
getDefaultDisplayTileOffset() |
int |
getDisplayTileData() |
int |
getDisplayTileOffset() |
double |
getDragAir() |
float |
getMaxCartSpeedOnRail()
Returns the carts max speed when traveling on rails.
|
float |
getMaxSpeedAirLateral() |
float |
getMaxSpeedAirVertical() |
abstract int |
getMinecartType() |
double |
getMountedYOffset() |
int |
getRollingAmplitude() |
int |
getRollingDirection() |
float |
getShadowSize() |
double |
getSlopeAdjustment() |
boolean |
hasCustomInventoryName() |
boolean |
hasDisplayTile() |
boolean |
isPoweredCart()
Returns true if this cart is self propelled.
|
void |
killMinecart(DamageSource par1DamageSource) |
void |
moveMinecartOnRail(int x,
int y,
int z,
double par4)
Moved to allow overrides.
|
void |
onActivatorRailPass(int par1,
int par2,
int par3,
boolean par4) |
void |
onUpdate() |
void |
performHurtAnimation() |
protected void |
readEntityFromNBT(NBTTagCompound par1NBTTagCompound) |
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 par1) |
void |
setDead() |
void |
setDisplayTileData(int par1) |
void |
setDisplayTileOffset(int par1) |
void |
setDragAir(double value) |
void |
setHasDisplayTile(boolean par1) |
void |
setMaxSpeedAirLateral(float value) |
void |
setMaxSpeedAirVertical(float value) |
void |
setMinecartName(java.lang.String par1Str) |
void |
setPositionAndRotation2(double par1,
double par3,
double par5,
float par7,
float par8,
int par9) |
void |
setRollingAmplitude(int par1) |
void |
setRollingDirection(int par1) |
void |
setVelocity(double par1,
double par3,
double par5) |
boolean |
shouldDoRailFunctions()
Return false if this cart should not call onMinecartPass() and should ignore Powered Rails.
|
protected void |
writeEntityToNBT(NBTTagCompound par1NBTTagCompound) |
addEntityCrashInfo, addToPlayerScore, addVelocity, canAttackWithItem, canRenderOnFire, canRiderInteract, copyDataFrom, copyLocationAndAnglesFrom, dealFireDamage, doesEntityNotTriggerPressurePlate, dropItem, entityDropItem, equals, extinguish, fall, func_145748_c_, func_145771_j, func_145772_a, func_145774_a, func_145775_I, func_145778_a, func_145780_a, func_145781_i, getAir, getBrightness, getBrightnessForRender, getCollisionBorderSize, getDataWatcher, getDistance, getDistanceSq, getDistanceSqToEntity, getDistanceToEntity, getEntityData, getEntityId, getEntityString, getExtendedProperties, getEyeHeight, getFlag, getLastActiveItems, getLookVec, getMaxInPortalTime, getMaxSafePointTries, getParts, getPersistentID, getPickedResult, getPortalCooldown, getRotationYawHead, getSplashSound, getSwimSound, getTeleportDirection, getUniqueID, getYOffset, handleHealthUpdate, handleLavaMovement, handleWaterMovement, hashCode, hitByEntity, interactFirst, isBurning, isCreatureType, isEating, isEntityAlive, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInvulnerable, isImmuneToFire, isInRangeToRender3d, isInRangeToRenderDist, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isOffsetPositionInLiquid, isPushedByWater, isRiding, isSneaking, isSprinting, isWet, kill, mountEntity, moveEntity, moveFlying, newDoubleNBTList, newFloatNBTList, onChunkLoad, onCollideWithPlayer, onEntityUpdate, onKillEntity, onStruckByLightning, playSound, preparePlayerToSpawn, readFromNBT, registerExtendedProperties, resetEntityId, setAir, setAngles, setBeenAttacked, setCurrentItemOrArmor, setEating, setEntityId, setFire, setFlag, setInPortal, setInvisible, setInWeb, setLocationAndAngles, setOnFireFromLava, setPosition, setPositionAndRotation, setRotation, setRotationYawHead, setSize, setSneaking, setSprinting, setWorld, shouldDismountInWater, shouldRenderInPass, shouldRiderSit, shouldSetPosAfterLoading, toString, travelToDimension, updateFallState, 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 par1World)
public EntityMinecart(World par1World, double par2, double par4, double par6)
public static EntityMinecart createMinecart(World par0World, double par1, double par3, double par5, int par7)
protected boolean canTriggerWalking()
canTriggerWalking
in class Entity
protected void entityInit()
entityInit
in class Entity
public AxisAlignedBB getCollisionBox(Entity par1Entity)
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 par1DamageSource, float par2)
attackEntityFrom
in class Entity
public void killMinecart(DamageSource par1DamageSource)
public void performHurtAnimation()
performHurtAnimation
in class Entity
public boolean canBeCollidedWith()
canBeCollidedWith
in class Entity
public void onActivatorRailPass(int par1, int par2, int par3, boolean par4)
protected void func_94088_b(double par1)
protected void func_145821_a(int p_145821_1_, int p_145821_2_, int p_145821_3_, double p_145821_4_, double p_145821_6_, Block p_145821_8_, int p_145821_9_)
protected void applyDrag()
public Vec3 func_70495_a(double par1, double par3, double par5, double par7)
public Vec3 func_70489_a(double par1, double par3, double par5)
protected void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
readEntityFromNBT
in class Entity
protected void writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
writeEntityToNBT
in class Entity
public float getShadowSize()
getShadowSize
in class Entity
public void applyEntityCollision(Entity par1Entity)
applyEntityCollision
in class Entity
public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9)
setPositionAndRotation2
in class Entity
public void setDamage(float par1)
public void setVelocity(double par1, double par3, double par5)
setVelocity
in class Entity
public float getDamage()
public void setRollingAmplitude(int par1)
public int getRollingAmplitude()
public void setRollingDirection(int par1)
public int getRollingDirection()
public abstract int getMinecartType()
public Block func_145820_n()
public Block func_145817_o()
public int getDisplayTileData()
public int getDefaultDisplayTileData()
public int getDisplayTileOffset()
public int getDefaultDisplayTileOffset()
public void func_145819_k(int p_145819_1_)
public void setDisplayTileData(int par1)
public void setDisplayTileOffset(int par1)
public boolean hasDisplayTile()
public void setHasDisplayTile(boolean par1)
public void setMinecartName(java.lang.String par1Str)
public java.lang.String getCommandSenderName()
getCommandSenderName
in class Entity
public boolean hasCustomInventoryName()
public java.lang.String func_95999_t()
public void moveMinecartOnRail(int x, int y, int z, double par4)
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()