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, maxSpeedAirVertical
addedToChunk, 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, shouldDoRailFunctions
addChatMessage, 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, writeToNBTOptional
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getSizeInventory
createContainer, getGuiID
getDisplayName, hasCustomName
public 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 EntityMinecart
public ItemStack getStackInSlot(int index)
getStackInSlot
in interface IInventory
public ItemStack decrStackSize(int index, int count)
decrStackSize
in interface IInventory
public ItemStack removeStackFromSlot(int index)
removeStackFromSlot
in interface IInventory
public void setInventorySlotContents(int index, ItemStack stack)
setInventorySlotContents
in interface IInventory
public void markDirty()
markDirty
in interface IInventory
public boolean isUseableByPlayer(EntityPlayer player)
isUseableByPlayer
in interface IInventory
public void openInventory(EntityPlayer player)
openInventory
in interface IInventory
public void closeInventory(EntityPlayer player)
closeInventory
in interface IInventory
public boolean isItemValidForSlot(int index, ItemStack stack)
isItemValidForSlot
in interface IInventory
public java.lang.String getName()
getName
in interface ICommandSender
getName
in interface IWorldNameable
getName
in class EntityMinecart
public int getInventoryStackLimit()
getInventoryStackLimit
in interface IInventory
public void travelToDimension(int dimensionId)
travelToDimension
in class Entity
public void setDead()
setDead
in class EntityMinecart
protected void writeEntityToNBT(NBTTagCompound tagCompound)
writeEntityToNBT
in class EntityMinecart
protected void readEntityFromNBT(NBTTagCompound tagCompund)
readEntityFromNBT
in class EntityMinecart
public boolean interactFirst(EntityPlayer playerIn)
interactFirst
in class Entity
protected void applyDrag()
applyDrag
in class EntityMinecart
public int getField(int id)
getField
in interface IInventory
public void setField(int id, int value)
setField
in interface IInventory
public int getFieldCount()
getFieldCount
in interface IInventory
public boolean isLocked()
isLocked
in interface ILockableContainer
public void setLockCode(LockCode code)
setLockCode
in interface ILockableContainer
public LockCode getLockCode()
getLockCode
in interface ILockableContainer
public void clear()
clear
in interface IInventory
public <T> T getCapability(Capability<T> capability, EnumFacing facing)
ICapabilityProvider
getCapability
in interface ICapabilityProvider
getCapability
in class Entity
capability
- 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)
ICapabilityProvider
hasCapability
in interface ICapabilityProvider
hasCapability
in class Entity
capability
- The capability to checkfacing
- The Side to check from:
CAN BE NULL. Null is defined to represent 'internal' or 'self'