|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.minecraft.entity.Entity
net.minecraft.entity.item.EntityMinecart
public class EntityMinecart
Field Summary | |
---|---|
static double |
defaultDragAir
|
static double |
defaultDragEmpty
|
static double |
defaultDragRidden
|
static float |
defaultMaxSpeedAirLateral
|
static float |
defaultMaxSpeedAirVertical
|
static float |
defaultMaxSpeedGround
|
static float |
defaultMaxSpeedRail
|
int |
minecartType
The type of minecart, 2 for powered, 1 for storage. |
double |
pushX
|
double |
pushZ
|
Constructor Summary | |
---|---|
EntityMinecart(World par1World)
|
|
EntityMinecart(World par1World,
double par2,
double par4,
double par6,
int par8)
|
|
EntityMinecart(World world,
int type)
|
Method Summary | |
---|---|
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. |
void |
closeChest()
|
ItemStack |
decrStackSize(int par1,
int par2)
Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a new stack. |
void |
dropCartAsItem()
Drops the cart as a item. |
Vec3 |
func_70489_a(double par1,
double par3,
double par5)
|
int |
func_70493_k()
|
void |
func_70494_i(int par1)
|
Vec3 |
func_70495_a(double par1,
double par3,
double par5,
double par7)
|
int |
func_70496_j()
|
void |
func_70497_h(int par1)
|
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 |
int |
getDamage()
Gets the current amount of damage the minecart has taken. |
double |
getDragAir()
|
int |
getInventoryStackLimit()
Returns the maximum stack size for a inventory slot. |
String |
getInvName()
Returns the name of the inventory. |
List<ItemStack> |
getItemsDropped()
Override this to define which items your cart drops when broken. |
float |
getMaxSpeedAirLateral()
|
float |
getMaxSpeedAirVertical()
|
float |
getMaxSpeedGround()
|
float |
getMaxSpeedRail()
Returns the carts max speed. |
int |
getMinecartType()
Simply returns the minecartType variable. |
double |
getMountedYOffset()
Returns the Y offset from the entity's position for any entity riding this one. |
float |
getShadowSize()
|
int |
getSizeInventory()
Returns the number of slots in the inventory. |
ItemStack |
getStackInSlot(int par1)
Returns the stack in slot i |
ItemStack |
getStackInSlotOnClosing(int par1)
When some containers are closed they call this on each slot, then drop whatever it returns as an EntityItem - like when you close a workbench GUI. |
boolean |
interact(EntityPlayer par1EntityPlayer)
Called when a player interacts with a mob. |
boolean |
isMinecartPowered()
Is this minecart powered (Fuel > 0) |
boolean |
isPoweredCart()
Returns true if this cart is self propelled. |
boolean |
isStorageCart()
Returns true if this cart is a storage cart Some carts may have inventories but not be storage carts and some carts without inventories may be storage carts. |
boolean |
isUseableByPlayer(EntityPlayer par1EntityPlayer)
Do not make give this method the name canInteractWith because it clashes with Container |
void |
onInventoryChanged()
Called when an the contents of an Inventory change, usually |
void |
onUpdate()
Called to update the entity's position/logic. |
void |
openChest()
|
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 |
setDamage(int par1)
Sets the current amount of damage the minecart has taken. |
void |
setDead()
Will get destroyed next tick. |
void |
setDragAir(double value)
|
void |
setInventorySlotContents(int par1,
ItemStack par2ItemStack)
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections). |
void |
setMaxSpeedAirLateral(float value)
|
void |
setMaxSpeedAirVertical(float value)
|
void |
setMaxSpeedGround(float value)
|
void |
setMaxSpeedRail(float value)
|
void |
setPositionAndRotation2(double par1,
double par3,
double par5,
float par7,
float par8,
int par9)
|
void |
setVelocity(double par1,
double par3,
double par5)
|
boolean |
shouldDoRailFunctions()
Return false if this cart should not call IRail.onMinecartPass() and should ignore Powered Rails. |
void |
travelToDimension(int par1)
Teleports the entity to another dimension. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public int minecartType
public double pushX
public double pushZ
public static float defaultMaxSpeedRail
public static float defaultMaxSpeedGround
public static float defaultMaxSpeedAirLateral
public static float defaultMaxSpeedAirVertical
public static double defaultDragRidden
public static double defaultDragEmpty
public static double defaultDragAir
Constructor Detail |
---|
public EntityMinecart(World par1World)
public EntityMinecart(World world, int type)
public EntityMinecart(World par1World, double par2, double par4, double par6, int par8)
Method Detail |
---|
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 performHurtAnimation()
performHurtAnimation
in class Entity
public boolean canBeCollidedWith()
canBeCollidedWith
in class Entity
public void setDead()
setDead
in class Entity
public void travelToDimension(int par1)
travelToDimension
in class Entity
public void onUpdate()
onUpdate
in class Entity
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 int getSizeInventory()
getSizeInventory
in interface IInventory
public ItemStack getStackInSlot(int par1)
getStackInSlot
in interface IInventory
public ItemStack decrStackSize(int par1, int par2)
decrStackSize
in interface IInventory
public ItemStack getStackInSlotOnClosing(int par1)
getStackInSlotOnClosing
in interface IInventory
public void setInventorySlotContents(int par1, ItemStack par2ItemStack)
setInventorySlotContents
in interface IInventory
public String getInvName()
getInvName
in interface IInventory
public int getInventoryStackLimit()
getInventoryStackLimit
in interface IInventory
public void onInventoryChanged()
onInventoryChanged
in interface IInventory
public boolean interact(EntityPlayer par1EntityPlayer)
interact
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 boolean isUseableByPlayer(EntityPlayer par1EntityPlayer)
isUseableByPlayer
in interface IInventory
public boolean isMinecartPowered()
public void openChest()
openChest
in interface IInventory
public void closeChest()
closeChest
in interface IInventory
public void setDamage(int par1)
public int getDamage()
public void func_70497_h(int par1)
public int func_70496_j()
public void func_70494_i(int par1)
public int func_70493_k()
public void dropCartAsItem()
public List<ItemStack> getItemsDropped()
public ItemStack getCartItem()
public boolean isPoweredCart()
public boolean isStorageCart()
public boolean canBeRidden()
public boolean canUseRail()
public void setCanUseRail(boolean use)
use
- Whether the minecart can currently use rails.public boolean shouldDoRailFunctions()
public int getMinecartType()
public static IMinecartCollisionHandler getCollisionHandler()
public static void setCollisionHandler(IMinecartCollisionHandler handler)
handler
- The new handlerpublic float getMaxSpeedRail()
public void setMaxSpeedRail(float value)
public float getMaxSpeedGround()
public void setMaxSpeedGround(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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |