public abstract class EntityMinecartContainer extends EntityMinecart implements ILockableContainer, ILootContainer
EntityMinecart.Type| 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, cachedUniqueIdString, capturedDrops, captureDrops, chunkCoordX, chunkCoordY, chunkCoordZ, collided, collidedHorizontally, collidedVertically, dataManager, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityUniqueID, fallDistance, firstUpdate, FLAGS, forceSpawn, glowing, height, hurtResistantTime, ignoreFrustumCheck, inPortal, inWater, isAirBorne, isDead, isImmuneToFire, isInWeb, lastPortalPos, lastPortalVec, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, noClip, onGround, portalCounter, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, rideCooldown, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, teleportDirection, ticksExisted, timeUntilPortal, updateBlocked, velocityChanged, width, world| Constructor and Description |
|---|
EntityMinecartContainer(World worldIn) |
EntityMinecartContainer(World worldIn,
double x,
double y,
double z) |
| Modifier and Type | Method and Description |
|---|---|
static void |
addDataFixers(DataFixer p_190574_0_,
java.lang.Class<?> p_190574_1_) |
void |
addLoot(EntityPlayer player)
Adds loot to the minecart's contents.
|
protected void |
applyDrag() |
Entity |
changeDimension(int dimensionIn,
ITeleporter teleporter) |
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() |
ResourceLocation |
getLootTable() |
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 |
isEmpty() |
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 |
isUsableByPlayer(EntityPlayer player)
Don't rename this method to canInteractWith due to conflicts with Container
|
void |
killMinecart(DamageSource source) |
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) |
boolean |
processInitialInteract(EntityPlayer player,
EnumHand hand) |
protected void |
readEntityFromNBT(NBTTagCompound compound)
(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 |
setDropItemsWhenDead(boolean dropWhenDead)
Sets whether this entity should drop its items when setDead() is called.
|
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 |
setLootTable(ResourceLocation lootTableIn,
long lootTableSeedIn) |
protected void |
writeEntityToNBT(NBTTagCompound compound)
(abstract) Protected helper method to write subclass entity data to NBT.
|
applyEntityCollision, attackEntityFrom, canBeCollidedWith, canBePushed, canBeRidden, canTriggerWalking, canUseRail, create, entityInit, getAdjustedHorizontalFacing, getCartItem, getCollisionBoundingBox, getCollisionBox, getCollisionHandler, getComparatorLevel, getCurrentCartSpeedCapOnRail, getDamage, getDefaultDisplayTile, getDefaultDisplayTileOffset, getDisplayTile, getDisplayTileOffset, getDragAir, getMaxCartSpeedOnRail, getMaximumSpeed, getMaxSpeed, getMaxSpeedAirLateral, getMaxSpeedAirVertical, getMountedYOffset, getPos, getPosOffset, getRenderBoundingBox, getRollingAmplitude, getRollingDirection, getSlopeAdjustment, getType, hasDisplayTile, isPoweredCart, moveAlongTrack, moveDerailedMinecart, moveMinecartOnRail, onActivatorRailPass, onUpdate, performHurtAnimation, registerFixesMinecart, setCanUseRail, setCollisionHandler, setCurrentCartSpeedCapOnRail, setDamage, setDisplayTile, setDisplayTileOffset, setDragAir, setHasDisplayTile, setMaxSpeedAirLateral, setMaxSpeedAirVertical, setPosition, setPositionAndRotationDirect, setRollingAmplitude, setRollingDirection, setVelocity, shouldDoRailFunctionsaddEntityCrashInfo, addPassenger, addTag, addTrackingPlayer, addVelocity, applyEnchantments, applyOrientationToEntity, applyPlayerInteraction, awardKillScore, canBeAttackedWithItem, canBeRidden, canExplosionDestroyBlock, canFitPassenger, canPassengerSteer, canRenderOnFire, canRiderInteract, canTrample, canUseCommand, changeDimension, copyLocationAndAnglesFrom, createRunningParticles, dealFireDamage, decrementTimeUntilPortal, deserializeNBT, dismountRidingEntity, doBlockCollisions, doesEntityNotTriggerPressurePlate, doWaterSplashEffect, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, fall, getAir, getAlwaysRenderNameTag, getAlwaysRenderNameTagForRender, getArmorInventoryList, getBrightness, getBrightnessForRender, getCachedUniqueIdString, getCollisionBorderSize, getCommandSenderEntity, getCommandStats, getControllingPassenger, getCustomNameTag, getDataManager, getDisplayName, getDistance, getDistance, getDistanceSq, getDistanceSq, getDistanceSq, getDistanceSqToCenter, getEntityBoundingBox, getEntityData, getEntityId, getEntityString, getEntityWorld, getEquipmentAndArmor, getExplosionResistance, getEyeHeight, getFireImmuneTicks, getFlag, getForward, getHeldEquipment, getHorizontalFacing, getHoverEvent, getIsInvulnerable, getLastPortalVec, getLook, getLookVec, getLowestRidingEntity, getMaxFallHeight, getMaxInPortalTime, getMirroredYaw, getName, getParts, getPassengers, getPersistentID, getPickedResult, getPitchYaw, getPortalCooldown, getPosition, getPositionEyes, getPositionVector, getPushReaction, getRecursivePassengers, getRecursivePassengersByType, getRenderDistanceWeight, getRidingEntity, getRotatedYaw, getRotationYawHead, getServer, getSoundCategory, getSplashSound, getSwimSound, getTags, getTeam, getTeleportDirection, getUniqueID, getVectorForRotation, getYOffset, handleStatusUpdate, handleWaterMovement, hasCustomName, hashCode, hasNoGravity, hitByEntity, ignoreItemEntityData, isAddedToWorld, isBeingRidden, isBurning, isCreatureType, isEntityAlive, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInvulnerable, isGlowing, isImmuneToExplosions, isImmuneToFire, isInLava, isInRangeToRender3d, isInRangeToRenderDist, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isNonBoss, isOffsetPositionInLiquid, isOnSameTeam, isOnScoreboardTeam, isOutsideBorder, isOverWater, isPassenger, isPushedByWater, isRiding, isRidingOrBeingRiddenBy, isRidingSameEntity, isSilent, isSneaking, isSpectatedByPlayer, isSprinting, isWet, makeFlySound, markVelocityChanged, move, moveRelative, moveToBlockPosAndAngles, newDoubleNBTList, newFloatNBTList, notifyDataManagerChange, onAddedToWorld, onCollideWithPlayer, onEntityUpdate, onInsideBlock, onKillCommand, onKillEntity, onRemovedFromWorld, onStruckByLightning, outOfWorld, playFlySound, playSound, playStepSound, preparePlayerToSpawn, pushOutOfBlocks, rayTrace, readFromNBT, registerFixes, removePassenger, removePassengers, removeTag, removeTrackingPlayer, replaceItemInInventory, resetEntityId, resetPositionToBB, sendCommandFeedback, sendMessage, serializeNBT, setAir, setAlwaysRenderNameTag, setCommandStat, setCommandStats, setCustomNameTag, setEntityBoundingBox, setEntityId, setEntityInvulnerable, setFire, setFlag, setGlowing, setInvisible, setInWeb, setItemStackToSlot, setLocationAndAngles, setNoGravity, setOnFireFromLava, setOutsideBorder, setPortal, setPositionAndRotation, setPositionAndUpdate, setPositionNonDirty, setRenderDistanceWeight, setRenderYawOffset, setRotation, setRotationYawHead, setSilent, setSize, setSneaking, setSprinting, setUniqueId, setWorld, shouldDismountInWater, shouldRenderInPass, shouldRiderSit, shouldSetPosAfterLoading, spawnRunningParticles, startRiding, startRiding, toString, turn, updateFallState, updatePassenger, updateRidden, writeToNBT, writeToNBTAtomically, writeToNBTOptionalclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetSizeInventorycreateContainer, getGuiIDgetDisplayName, getName, hasCustomNamepublic boolean dropContentsWhenDead
public IItemHandler itemHandler
public EntityMinecartContainer(World worldIn)
public EntityMinecartContainer(World worldIn, double x, double y, double z)
public void killMinecart(DamageSource source)
killMinecart in class EntityMinecartpublic boolean isEmpty()
isEmpty in interface IInventorypublic 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 isUsableByPlayer(EntityPlayer player)
isUsableByPlayer 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 int getInventoryStackLimit()
getInventoryStackLimit in interface IInventorypublic Entity changeDimension(int dimensionIn, ITeleporter teleporter)
changeDimension in class Entitypublic void setDropItemsWhenDead(boolean dropWhenDead)
setDropItemsWhenDead in class Entitypublic static void addDataFixers(DataFixer p_190574_0_, java.lang.Class<?> p_190574_1_)
protected void writeEntityToNBT(NBTTagCompound compound)
writeEntityToNBT in class EntityMinecartprotected void readEntityFromNBT(NBTTagCompound compound)
readEntityFromNBT in class EntityMinecartpublic boolean processInitialInteract(EntityPlayer player, EnumHand hand)
processInitialInteract in class EntityMinecartprotected 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 addLoot(EntityPlayer player)
public <T> T getCapability(Capability<T> capability, EnumFacing facing)
ICapabilityProvider
Basically, this method functions analogously to Map.get(Object).
getCapability 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'ICapabilityProvider.hasCapability(Capability, EnumFacing)
would return true.public boolean hasCapability(Capability<?> capability, EnumFacing facing)
ICapabilityProviderICapabilityProvider.getCapability(Capability, EnumFacing).
Basically, this method functions analogously to Map.containsKey(Object).
Example: A Pipe getting a cover placed on one side causing it lose the Inventory attachment function for that side.
This is a light weight version of getCapability, intended for metadata uses.
hasCapability 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'ICapabilityProvider.getCapability(Capability, EnumFacing)
must not return null.public void clear()
clear in interface IInventorypublic void setLootTable(ResourceLocation lootTableIn, long lootTableSeedIn)
public ResourceLocation getLootTable()
getLootTable in interface ILootContainer