public abstract class EntityMinecartContainer extends EntityMinecart implements IInventory
defaultDragAir, defaultMaxSpeedAirLateral, defaultMaxSpeedAirVertical
addedToChunk, boundingBox, capturedDrops, captureDrops, chunkCoordX, chunkCoordY, chunkCoordZ, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityId, fallDistance, field_70135_K, fireResistance, forceSpawn, 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, stepHeight, ticksExisted, timeUntilPortal, velocityChanged, width, worldObj, yOffset, ySize
Constructor and Description |
---|
EntityMinecartContainer(World par1World) |
EntityMinecartContainer(World par1World,
double par2,
double par4,
double par6) |
Modifier and Type | Method and Description |
---|---|
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.
|
int |
getInventoryStackLimit()
Returns the maximum stack size for a inventory slot.
|
String |
getInvName()
Returns the name of 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 |
interactFirst(EntityPlayer par1EntityPlayer)
First layer of player interaction
|
boolean |
isItemValidForSlot(int par1,
ItemStack par2ItemStack)
Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot.
|
boolean |
isUseableByPlayer(EntityPlayer par1EntityPlayer)
Do not make give this method the name canInteractWith because it clashes with Container
|
void |
killMinecart(DamageSource par1DamageSource) |
void |
onInventoryChanged()
Called when an the contents of an Inventory change, usually
|
void |
openChest() |
void |
setDead()
Will get destroyed next tick.
|
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 |
travelToDimension(int par1)
Teleports the entity to another dimension.
|
applyEntityCollision, attackEntityFrom, canBeCollidedWith, canBePushed, canBeRidden, canUseRail, createMinecart, func_70489_a, func_70495_a, func_95999_t, getBoundingBox, getCartItem, getCollisionBox, getCollisionHandler, getCurrentCartSpeedCapOnRail, getDamage, getDefaultDisplayTile, getDefaultDisplayTileData, getDefaultDisplayTileOffset, getDisplayTile, getDisplayTileData, getDisplayTileOffset, getDragAir, getEntityName, getMaxCartSpeedOnRail, getMaxSpeedAirLateral, getMaxSpeedAirVertical, getMinecartType, getMountedYOffset, getRollingAmplitude, getRollingDirection, getShadowSize, getSlopeAdjustment, hasDisplayTile, isInvNameLocalized, isPoweredCart, moveMinecartOnRail, onActivatorRailPass, onUpdate, performHurtAnimation, setCanUseRail, setCollisionHandler, setCurrentCartSpeedCapOnRail, setDamage, setDisplayTile, setDisplayTileData, setDisplayTileOffset, setDragAir, setHasDisplayTile, setMaxSpeedAirLateral, setMaxSpeedAirVertical, setMinecartName, setPositionAndRotation2, setRollingAmplitude, setRollingDirection, setVelocity, shouldDoRailFunctions
addEntityCrashInfo, addToPlayerScore, addVelocity, canAttackWithItem, canRenderOnFire, canRiderInteract, copyDataFrom, copyLocationAndAnglesFrom, doesEntityNotTriggerPressurePlate, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, getAir, getBlockExplosionResistance, getBrightness, getBrightnessForRender, getCollisionBorderSize, getDataWatcher, getDistance, getDistanceSq, getDistanceSqToEntity, getDistanceToEntity, getEntityData, getExtendedProperties, getEyeHeight, getLastActiveItems, getLookVec, getMaxInPortalTime, getMaxSafePointTries, getParts, getPersistentID, getPickedResult, getPortalCooldown, getRotationYawHead, getTeleportDirection, getTranslatedEntityName, getUniqueID, getYOffset, handleHealthUpdate, handleLavaMovement, handleWaterMovement, hashCode, hitByEntity, isBurning, isCreatureType, isEating, isEntityAlive, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInvulnerable, isImmuneToFire, isInRangeToRenderDist, isInRangeToRenderVec3D, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isOffsetPositionInLiquid, isPushedByWater, isRiding, isSneaking, isSprinting, isWet, mountEntity, moveEntity, moveFlying, onChunkLoad, onCollideWithPlayer, onEntityUpdate, onKillEntity, onStruckByLightning, playSound, readFromNBT, registerExtendedProperties, resetEntityId, setAir, setAngles, setCurrentItemOrArmor, setEating, setFire, setInPortal, setInvisible, setInWeb, setLocationAndAngles, setPosition, setPositionAndRotation, setRotationYawHead, setSneaking, setSprinting, setWorld, shouldDismountInWater, shouldExplodeBlock, shouldRenderInPass, shouldRiderSit, toString, updateRidden, updateRiderPosition, writeMountToNBT, writeToNBT, writeToNBTOptional
getSizeInventory, isInvNameLocalized
public EntityMinecartContainer(World par1World)
public EntityMinecartContainer(World par1World, double par2, double par4, double par6)
public void killMinecart(DamageSource par1DamageSource)
killMinecart
in class EntityMinecart
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 void onInventoryChanged()
onInventoryChanged
in interface IInventory
public boolean isUseableByPlayer(EntityPlayer par1EntityPlayer)
isUseableByPlayer
in interface IInventory
public void openChest()
openChest
in interface IInventory
public void closeChest()
closeChest
in interface IInventory
public boolean isItemValidForSlot(int par1, ItemStack par2ItemStack)
isItemValidForSlot
in interface IInventory
public String getInvName()
getInvName
in interface IInventory
public int getInventoryStackLimit()
getInventoryStackLimit
in interface IInventory
public void travelToDimension(int par1)
travelToDimension
in class Entity
public void setDead()
setDead
in class EntityMinecart
public boolean interactFirst(EntityPlayer par1EntityPlayer)
interactFirst
in class Entity