public abstract class EntityMinecartContainer extends EntityMinecart implements ILockableContainer
EntityMinecart.EnumMinecartType| Modifier and Type | Field and Description |
|---|---|
boolean |
dropContentsWhenDead
When set to true, the minecart will drop all items when setDead() is called.
|
IItemHandler |
itemHandler |
canBePushed, canUseRail, defaultDragAir, defaultMaxSpeedAirLateral, defaultMaxSpeedAirVertical, dragAir, maxSpeedAirLateral, maxSpeedAirVerticaladdedToChunk, capturedDrops, captureDrops, chunkCoordX, chunkCoordY, chunkCoordZ, dataWatcher, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, extendedProperties, fallDistance, field_181016_an, field_181017_ao, field_181018_ap, 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, ticksExisted, timeUntilPortal, velocityChanged, width, worldObj| Constructor and Description |
|---|
EntityMinecartContainer(World worldIn) |
EntityMinecartContainer(World worldIn,
double p_i1717_2_,
double p_i1717_4_,
double p_i1717_6_) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyDrag() |
void |
clear() |
void |
closeInventory(EntityPlayer player) |
ItemStack |
decrStackSize(int index,
int count)
Removes up to a specified number of items from an inventory slot and returns them in a new stack.
|
<T> T |
getCapability(Capability<T> capability,
EnumFacing facing)
Retrieves the handler for the capability requested on the specific side.
|
int |
getField(int id) |
int |
getFieldCount() |
int |
getInventoryStackLimit()
Returns the maximum stack size for a inventory slot.
|
LockCode |
getLockCode() |
java.lang.String |
getName()
Get the name of this object.
|
ItemStack |
getStackInSlot(int index)
Returns the stack in the given slot.
|
boolean |
hasCapability(Capability<?> capability,
EnumFacing facing)
Determines if this object has support for the capability in question on the specific side.
|
boolean |
interactFirst(EntityPlayer playerIn)
First layer of player interaction
|
boolean |
isItemValidForSlot(int index,
ItemStack stack)
Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot.
|
boolean |
isLocked() |
boolean |
isUseableByPlayer(EntityPlayer player)
Do not make give this method the name canInteractWith because it clashes with Container
|
void |
killMinecart(DamageSource p_94095_1_) |
void |
markDirty()
For tile entities, ensures the chunk containing the tile entity is saved to disk later - the game won't think it
hasn't changed and skip it.
|
void |
openInventory(EntityPlayer player) |
protected void |
readEntityFromNBT(NBTTagCompound tagCompund)
(abstract) Protected helper method to read subclass entity data from NBT.
|
ItemStack |
removeStackFromSlot(int index)
Removes a stack from the given slot and returns it.
|
void |
setDead()
Will get destroyed next tick.
|
void |
setField(int id,
int value) |
void |
setInventorySlotContents(int index,
ItemStack stack)
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).
|
void |
setLockCode(LockCode code) |
void |
travelToDimension(int dimensionId)
Teleports the entity to another dimension.
|
protected void |
writeEntityToNBT(NBTTagCompound tagCompound)
(abstract) Protected helper method to write subclass entity data to NBT.
|
applyEntityCollision, attackEntityFrom, canBeCollidedWith, canBePushed, canBeRidden, canTriggerWalking, canUseRail, entityInit, func_174899_a, func_180458_a, func_180460_a, func_70489_a, func_70495_a, getCartItem, getCollisionBoundingBox, getCollisionBox, getCollisionHandler, getCurrentCartSpeedCapOnRail, getCustomNameTag, getDamage, getDefaultDisplayTile, getDefaultDisplayTileOffset, getDisplayName, getDisplayTile, getDisplayTileOffset, getDragAir, getMaxCartSpeedOnRail, getMaximumSpeed, getMaxSpeed, getMaxSpeedAirLateral, getMaxSpeedAirVertical, getMinecartType, getMountedYOffset, getRollingAmplitude, getRollingDirection, getSlopeAdjustment, hasCustomName, hasDisplayTile, isPoweredCart, moveDerailedMinecart, moveMinecartOnRail, onActivatorRailPass, onUpdate, performHurtAnimation, setCanUseRail, setCollisionHandler, setCurrentCartSpeedCapOnRail, setCustomNameTag, setDamage, setDisplayTileOffset, setDragAir, setHasDisplayTile, setMaxSpeedAirLateral, setMaxSpeedAirVertical, setPosition, setPositionAndRotation2, setRollingAmplitude, setRollingDirection, setVelocity, shouldDoRailFunctionsaddChatMessage, addEntityCrashInfo, addToPlayerScore, addVelocity, applyEnchantments, canAttackWithItem, canCommandSenderUseCommand, canRenderOnFire, canRiderInteract, clientUpdateEntityNBT, copyDataFromOld, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, deserializeNBT, doBlockCollisions, doesEntityNotTriggerPressurePlate, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, fall, func_174817_o, func_181012_aH, func_181013_g, func_181014_aG, getAir, getAlwaysRenderNameTag, getAlwaysRenderNameTagForRender, getBrightness, getBrightnessForRender, getCollisionBorderSize, getCommandSenderEntity, getCommandStats, getDataWatcher, getDistance, getDistanceSq, getDistanceSq, getDistanceSqToCenter, getDistanceSqToEntity, getDistanceToEntity, getEntityBoundingBox, getEntityData, getEntityId, getEntityString, getEntityWorld, getExplosionResistance, getExtendedProperties, getEyeHeight, getFlag, getHorizontalFacing, getHoverEvent, getInventory, getLook, getLookVec, getMaxFallHeight, getMaxInPortalTime, getNBTTagCompound, getParts, getPersistentID, getPickedResult, getPortalCooldown, getPosition, getPositionEyes, getPositionVector, getRotationYawHead, getSplashSound, getSwimSound, getUniqueID, getVectorForRotation, getYOffset, handleStatusUpdate, handleWaterMovement, hashCode, hitByEntity, interactAt, isBurning, isCreatureType, isEating, isEntityAlive, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInvulnerable, isImmuneToExplosions, isImmuneToFire, isInLava, isInRangeToRender3d, isInRangeToRenderDist, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isOffsetPositionInLiquid, isOutsideBorder, isPushedByWater, isRiding, isSilent, isSneaking, isSpectatedByPlayer, isSprinting, isWet, kill, mountEntity, moveEntity, moveFlying, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, onChunkLoad, onCollideWithPlayer, onDataWatcherUpdate, onEntityUpdate, onKillCommand, onKillEntity, onStruckByLightning, playSound, playStepSound, preparePlayerToSpawn, pushOutOfBlocks, rayTrace, readFromNBT, registerExtendedProperties, replaceItemInInventory, resetEntityId, resetHeight, sendCommandFeedback, serializeNBT, setAir, setAlwaysRenderNameTag, setAngles, setBeenAttacked, setCommandStat, setCurrentItemOrArmor, setEating, setEntityBoundingBox, setEntityId, setFire, setFlag, setInvisible, setInWeb, setLocationAndAngles, setOnFireFromLava, setOutsideBorder, setPortal, setPositionAndRotation, setPositionAndUpdate, setRotation, setRotationYawHead, setSilent, setSize, setSneaking, setSprinting, setWorld, shouldDismountInWater, shouldRenderInPass, shouldRiderSit, shouldSetPosAfterLoading, spawnRunningParticles, toString, updateFallState, updateRidden, updateRiderPosition, verifyExplosion, writeMountToNBT, writeToNBT, writeToNBTOptionalclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetSizeInventorycreateContainer, getGuiIDgetDisplayName, hasCustomNamepublic boolean dropContentsWhenDead
public IItemHandler itemHandler
public EntityMinecartContainer(World worldIn)
public EntityMinecartContainer(World worldIn, double p_i1717_2_, double p_i1717_4_, double p_i1717_6_)
public void killMinecart(DamageSource p_94095_1_)
killMinecart in class EntityMinecartpublic ItemStack getStackInSlot(int index)
getStackInSlot in interface IInventorypublic ItemStack decrStackSize(int index, int count)
decrStackSize in interface IInventorypublic ItemStack removeStackFromSlot(int index)
removeStackFromSlot in interface IInventorypublic void setInventorySlotContents(int index,
ItemStack stack)
setInventorySlotContents in interface IInventorypublic void markDirty()
markDirty in interface IInventorypublic boolean isUseableByPlayer(EntityPlayer player)
isUseableByPlayer in interface IInventorypublic void openInventory(EntityPlayer player)
openInventory in interface IInventorypublic void closeInventory(EntityPlayer player)
closeInventory in interface IInventorypublic boolean isItemValidForSlot(int index,
ItemStack stack)
isItemValidForSlot in interface IInventorypublic java.lang.String getName()
getName in interface ICommandSendergetName in interface IWorldNameablegetName in class EntityMinecartpublic int getInventoryStackLimit()
getInventoryStackLimit in interface IInventorypublic void travelToDimension(int dimensionId)
travelToDimension in class Entitypublic void setDead()
setDead in class EntityMinecartprotected void writeEntityToNBT(NBTTagCompound tagCompound)
writeEntityToNBT in class EntityMinecartprotected void readEntityFromNBT(NBTTagCompound tagCompund)
readEntityFromNBT in class EntityMinecartpublic boolean interactFirst(EntityPlayer playerIn)
interactFirst in class Entityprotected void applyDrag()
applyDrag in class EntityMinecartpublic int getField(int id)
getField in interface IInventorypublic void setField(int id,
int value)
setField in interface IInventorypublic int getFieldCount()
getFieldCount in interface IInventorypublic boolean isLocked()
isLocked in interface ILockableContainerpublic void setLockCode(LockCode code)
setLockCode in interface ILockableContainerpublic LockCode getLockCode()
getLockCode in interface ILockableContainerpublic void clear()
clear in interface IInventorypublic <T> T getCapability(Capability<T> capability, EnumFacing facing)
ICapabilityProvidergetCapability in interface ICapabilityProvidergetCapability in class Entitycapability - The capability to checkfacing - The Side to check from:
CAN BE NULL. Null is defined to represent 'internal' or 'self'public boolean hasCapability(Capability<?> capability, EnumFacing facing)
ICapabilityProviderhasCapability in interface ICapabilityProviderhasCapability in class Entitycapability - The capability to checkfacing - The Side to check from:
CAN BE NULL. Null is defined to represent 'internal' or 'self'