public abstract class EntityMinecart extends Entity
Modifier and Type | Field and Description |
---|---|
static double |
defaultDragAir |
static float |
defaultMaxSpeedAirLateral |
static float |
defaultMaxSpeedAirVertical |
addedToChunk, boundingBox, capturedDrops, captureDrops, chunkCoordX, chunkCoordY, chunkCoordZ, cloakUrl, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityId, fallDistance, field_70135_K, field_98038_p, fireResistance, height, hurtResistantTime, ignoreFrustumCheck, isAirBorne, isCollided, isCollidedHorizontally, isCollidedVertically, isDead, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, myEntitySize, noClip, onGround, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, renderDistanceWeight, riddenByEntity, ridingEntity, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, skinUrl, stepHeight, 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 |
---|---|
void |
applyEntityCollision(Entity par1Entity)
Applies a velocity to each of the entities pushing them away from each other.
|
boolean |
attackEntityFrom(DamageSource par1DamageSource,
int par2)
Called when the entity is attacked.
|
boolean |
canBeCollidedWith()
Returns true if other Entities should be prevented from moving through this Entity.
|
boolean |
canBePushed()
Returns true if this entity should push and be pushed by other entities when colliding.
|
boolean |
canBeRidden()
Returns true if this cart can be ridden by an Entity.
|
boolean |
canUseRail()
Returns true if this cart can currently use rails.
|
static EntityMinecart |
createMinecart(World par0World,
double par1,
double par3,
double par5,
int par7)
Creates a new minecart of the specified type in the specified location in the given world.
|
Vec3 |
func_70489_a(double par1,
double par3,
double par5) |
Vec3 |
func_70495_a(double par1,
double par3,
double par5,
double par7) |
String |
func_95999_t() |
void |
func_96094_a(String par1Str) |
AxisAlignedBB |
getBoundingBox()
returns the bounding box for this entity
|
ItemStack |
getCartItem()
This function returns an ItemStack that represents this cart.
|
AxisAlignedBB |
getCollisionBox(Entity par1Entity)
Returns a boundingBox used to collide the entity with other entities and blocks.
|
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.
|
int |
getDamage()
Gets the current amount of damage the minecart has taken.
|
Block |
getDefaultDisplayTile() |
int |
getDefaultDisplayTileData() |
int |
getDefaultDisplayTileOffset() |
Block |
getDisplayTile() |
int |
getDisplayTileData() |
int |
getDisplayTileOffset() |
double |
getDragAir() |
String |
getEntityName()
Gets the username of the entity.
|
float |
getMaxCartSpeedOnRail()
Returns the carts max speed when traveling on rails.
|
float |
getMaxSpeedAirLateral() |
float |
getMaxSpeedAirVertical() |
abstract int |
getMinecartType() |
double |
getMountedYOffset()
Returns the Y offset from the entity's position for any entity riding this one.
|
int |
getRollingAmplitude()
Gets the rolling amplitude the cart rolls while being attacked.
|
int |
getRollingDirection()
Gets the rolling direction the cart rolls while being attacked.
|
float |
getShadowSize() |
double |
getSlopeAdjustment() |
boolean |
hasDisplayTile() |
boolean |
isInvNameLocalized()
If this returns false, the inventory name will be used as an unlocalized name, and translated into the player's
language.
|
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)
Called every tick the minecart is on an activator rail.
|
void |
onUpdate()
Called to update the entity's position/logic.
|
void |
performHurtAnimation() |
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(int par1)
Sets the current amount of damage the minecart has taken.
|
void |
setDead()
Will get destroyed next tick.
|
void |
setDisplayTile(int par1) |
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 |
setPositionAndRotation2(double par1,
double par3,
double par5,
float par7,
float par8,
int par9) |
void |
setRollingAmplitude(int par1)
Sets the rolling amplitude the cart rolls while being attacked.
|
void |
setRollingDirection(int par1)
Sets the rolling direction the cart rolls while being attacked.
|
void |
setVelocity(double par1,
double par3,
double par5) |
boolean |
shouldDoRailFunctions()
Return false if this cart should not call onMinecartPass() and should ignore Powered Rails.
|
addEntityID, addNotRiddenEntityID, addToPlayerScore, addVelocity, canAttackWithItem, canRenderOnFire, copyDataFrom, doesEntityNotTriggerPressurePlate, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, func_82143_as, func_82146_a, func_82149_j, func_85029_a, func_85031_j, func_96091_a, func_96092_aw, func_98034_c, getAir, getBrightness, getBrightnessForRender, getCollisionBorderSize, getDataWatcher, getDistance, getDistanceSq, getDistanceSqToEntity, getDistanceToEntity, getEntityData, getExtendedProperties, getEyeHeight, getLastActiveItems, getLookVec, getMaxInPortalTime, getParts, getPersistentID, getPickedResult, getPortalCooldown, getRotationYawHead, getTeleportDirection, getTexture, getTranslatedEntityName, getYOffset, handleHealthUpdate, handleLavaMovement, handleWaterMovement, hashCode, interact, isBurning, isCreatureType, isEating, isEntityAlive, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInvulnerable, isImmuneToFire, isInRangeToRenderDist, isInRangeToRenderVec3D, isInsideOfMaterial, isInvisible, isInWater, isOffsetPositionInLiquid, isRiding, isSneaking, isSprinting, isWet, mountEntity, moveEntity, moveFlying, onCollideWithPlayer, onEntityUpdate, onKillEntity, onStruckByLightning, playSound, readFromNBT, registerExtendedProperties, resetEntityId, setAir, setAngles, setCurrentItemOrArmor, setEating, setFire, setInPortal, setInvisible, setInWeb, setLocationAndAngles, setPosition, setPositionAndRotation, setRotationYawHead, setSneaking, setSprinting, setWorld, shouldRenderInPass, shouldRiderSit, toString, travelToDimension, unmountEntity, updateCloak, updateRidden, updateRiderPosition, writeToNBT
public static float defaultMaxSpeedAirLateral
public static float defaultMaxSpeedAirVertical
public static double defaultDragAir
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)
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, int 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 onUpdate()
public void onActivatorRailPass(int par1, int par2, int par3, boolean par4)
public Vec3 func_70495_a(double par1, double par3, double par5, double par7)
public Vec3 func_70489_a(double par1, double par3, double par5)
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 setVelocity(double par1, double par3, double par5)
setVelocity
in class Entity
public void setDamage(int par1)
public int getDamage()
public void setRollingAmplitude(int par1)
public int getRollingAmplitude()
public void setRollingDirection(int par1)
public int getRollingDirection()
public abstract int getMinecartType()
public Block getDisplayTile()
public Block getDefaultDisplayTile()
public int getDisplayTileData()
public int getDefaultDisplayTileData()
public int getDisplayTileOffset()
public int getDefaultDisplayTileOffset()
public void setDisplayTile(int par1)
public void setDisplayTileData(int par1)
public void setDisplayTileOffset(int par1)
public boolean hasDisplayTile()
public void setHasDisplayTile(boolean par1)
public void func_96094_a(String par1Str)
public String getEntityName()
getEntityName
in class Entity
public boolean isInvNameLocalized()
public 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()