Package net.minecraft.src
Class EntityMinecartContainer
java.lang.Object
net.minecraft.src.Entity
net.minecraft.src.EntityMinecart
net.minecraft.src.EntityMinecartContainer
- All Implemented Interfaces:
IInventory
- Direct Known Subclasses:
EntityMinecartChest,EntityMinecartHopper
-
Field Summary
Fields inherited from class net.minecraft.src.EntityMinecart
minecartItemToDropFields inherited from class net.minecraft.src.Entity
addedToChunk, boundingBox, chunkCoordX, chunkCoordY, chunkCoordZ, dataWatcher, dimension, distanceWalkedModified, distanceWalkedOnStepModified, entityCollisionReduction, entityId, fallDistance, field_70135_K, fireResistance, forceSpawn, height, hurtResistantTime, ignoreFrustumCheck, inPortal, inWater, isAirBorne, isCollided, isCollidedHorizontally, isCollidedVertically, isDead, isImmuneToFire, isInWeb, lastGroundPosX, lastGroundPosY, lastGroundPosZ, lastTickPosX, lastTickPosY, lastTickPosZ, motionX, motionY, motionZ, myEntitySize, nextBlockCheckDistance, noClip, onGround, portalCounter, posX, posY, posZ, prevDistanceWalkedModified, preventEntitySpawning, prevPosX, prevPosY, prevPosZ, prevRotationPitch, prevRotationYaw, rand, renderDistanceWeight, riddenByEntity, ridingEntity, rotationPitch, rotationYaw, serverPosX, serverPosY, serverPosZ, stepHeight, teleportDirection, ticksExisted, timeUntilPortal, velocityChanged, width, worldObj, yOffset, ySize -
Constructor Summary
ConstructorsConstructorDescriptionEntityMinecartContainer(World par1World) EntityMinecartContainer(World par1World, double par2, double par4, double par6) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoiddecrStackSize(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.intReturns the maximum stack size for a inventory slot.Returns the name of the inventory.getStackInSlot(int par1) Returns the stack in slot igetStackInSlotOnClosing(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.booleaninteractFirst(EntityPlayer par1EntityPlayer) First layer of player interactionbooleanisItemValidForSlot(int par1, ItemStack par2ItemStack) Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot.booleanisUseableByPlayer(EntityPlayer par1EntityPlayer) Do not make give this method the name canInteractWith because it clashes with ContainervoidkillMinecart(DamageSource par1DamageSource) voidCalled when an the contents of an Inventory change, usuallyvoidprotected voidreadEntityFromNBT(NBTTagCompound par1NBTTagCompound) (abstract) Protected helper method to read subclass entity data from NBT.voidsetDead()Will get destroyed next tick.voidsetInventorySlotContents(int par1, ItemStack par2ItemStack) Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).voidtravelToDimension(int par1) Teleports the entity to another dimension.protected voidwriteEntityToNBT(NBTTagCompound par1NBTTagCompound) (abstract) Protected helper method to write subclass entity data to NBT.Methods inherited from class net.minecraft.src.EntityMinecart
applyEntityCollision, attackEntityFrom, canBeCollidedWith, canBePushed, canCollideWithEntity, canTriggerWalking, createMinecart, entityInit, func_70489_a, func_70495_a, func_94088_b, func_95999_t, getBoundingBox, getCollisionBox, getDamage, getDefaultDisplayTile, getDefaultDisplayTileData, getDefaultDisplayTileOffset, getDisplayTile, getDisplayTileData, getDisplayTileOffset, getEntityName, getMinecartType, getMountedYOffset, getRollingAmplitude, getRollingDirection, getShadowSize, hasDisplayTile, isInvNameLocalized, onActivatorRailPass, onBlockDispenserConsume, onUpdate, performHurtAnimation, setDamage, setDisplayTile, setDisplayTileData, setDisplayTileOffset, setHasDisplayTile, setMinecartName, setPositionAndRotation2, setRollingAmplitude, setRollingDirection, setVelocity, updateOnTrackMethods inherited from class net.minecraft.src.Entity
addComponent, addEntityCrashInfo, addToPlayerScore, addVelocity, appliesConstantForceWhenRidingBoat, attractsLightning, canAttackWithItem, canEntityTriggerTripwire, canRenderOnFire, copyDataFrom, copyLocationAndAnglesFrom, dealFireDamage, doBlockCollisions, doesEntityApplyToSpawnCap, doesEntityApplyToSquidPossessionCap, doesEntityNotTriggerPressurePlate, doesNotDismountInWater, dropItem, dropItemWithOffset, entityDropItem, equals, extinguish, fall, flagAllWatchedObjectsDirty, flingAwayFromEntity, getAir, getAnimalKickMovementMultiplier, getBlockExplosionResistance, getBrightness, getBrightnessForRender, getCanBeHeadCrabbed, getCollisionBorderSize, getComponent, getDataWatcher, getDistance, getDistanceSq, getDistanceSqToEntity, getDistanceToEntity, getEntityString, getEyeHeight, getFlag, getHeadCrabSharedAttackTarget, getLastActiveItems, getLookVec, getMaxInPortalTime, getMaxSafePointTries, getParts, getPortalCooldown, getRotationYawHead, getTeleportDirection, getTranslatedEntityName, getUniqueID, getVisualBoundingBox, getXZDistanceSqToEntity, getYOffset, handleHealthUpdate, handleLavaMovement, handleWaterMovement, hasComponent, hashCode, hasHeadCrabbedSquid, hitByEntity, initComponents, isAffectedByMovementModifiers, isBeingRainedOn, isBurning, isEating, isEntityAlive, isEntityEqual, isEntityInsideOpaqueBlock, isEntityInsideOpaqueBlock, isEntityInsideSuffocatingBlock, isEntityInsideSuffocatingBlock, isEntityInvulnerable, isImmuneToFire, isImmuneToHeadCrabDamage, isInRangeToRenderDist, isInRangeToRenderVec3D, isInsideOfMaterial, isInvisible, isInvisibleToPlayer, isInWater, isItemEntity, isOffsetPositionInLiquid, isPushedByWater, isRiding, isSecondaryTargetForSquid, isSneaking, isSprinting, isUsingSpecialKey, isValidOngoingAttackTargetForSquid, isValidZombieSecondaryTarget, isWet, kill, mountEntity, mountEntityRemote, moveEntity, moveFlying, movementModifierWhenRidingBoat, newDoubleNBTList, newFloatNBTList, notifyOfWolfHowl, onChunkLoad, onCollideWithPlayer, onEntityUpdate, onFlungBySquidTentacle, onHeadCrabbedBySquid, onKickedByAnimal, onKillEntity, onPossessedRidingEntityDeath, onStruckByLightning, outOfUpdateRangeUpdate, playSound, playStepSound, preparePlayerToSpawn, pushOutOfBlocks, readFromNBT, setAir, setAngles, setBeenAttacked, setCurrentItemOrArmor, setEating, setFire, setFlag, setInPortal, setInvisible, setInWeb, setLocationAndAngles, setOnFireFromLava, setPosition, setPositionAndRotation, setRotation, setRotationYawHead, setSize, setSneaking, setSprinting, setWorld, shouldExplodeBlock, shouldSetPosAfterLoading, shouldSetPositionOnLoad, toString, tryToSetFireToBlocksInContact, updateCloak, updateFallState, updateRidden, updateRiderPosition, writeMountToNBT, writeToNBT, writeToNBTOptionalMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.src.IInventory
getSizeInventory, isInvNameLocalized
-
Constructor Details
-
EntityMinecartContainer
-
EntityMinecartContainer
-
-
Method Details
-
killMinecart
- Overrides:
killMinecartin classEntityMinecart
-
getStackInSlot
Returns the stack in slot i- Specified by:
getStackInSlotin interfaceIInventory
-
decrStackSize
Removes from an inventory slot (first arg) up to a specified number (second arg) of items and returns them in a new stack.- Specified by:
decrStackSizein interfaceIInventory
-
getStackInSlotOnClosing
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.- Specified by:
getStackInSlotOnClosingin interfaceIInventory
-
setInventorySlotContents
Sets the given item stack to the specified slot in the inventory (can be crafting or armor sections).- Specified by:
setInventorySlotContentsin interfaceIInventory
-
onInventoryChanged
public void onInventoryChanged()Called when an the contents of an Inventory change, usually- Specified by:
onInventoryChangedin interfaceIInventory
-
isUseableByPlayer
Do not make give this method the name canInteractWith because it clashes with Container- Specified by:
isUseableByPlayerin interfaceIInventory
-
openChest
public void openChest()- Specified by:
openChestin interfaceIInventory
-
closeChest
public void closeChest()- Specified by:
closeChestin interfaceIInventory
-
isItemValidForSlot
Returns true if automation is allowed to insert the given stack (ignoring stack size) into the given slot.- Specified by:
isItemValidForSlotin interfaceIInventory
-
getInvName
Returns the name of the inventory.- Specified by:
getInvNamein interfaceIInventory
-
getInventoryStackLimit
public int getInventoryStackLimit()Returns the maximum stack size for a inventory slot. Seems to always be 64, possibly will be extended. *Isn't this more of a set than a get?*- Specified by:
getInventoryStackLimitin interfaceIInventory
-
travelToDimension
public void travelToDimension(int par1) Teleports the entity to another dimension. Params: Dimension number to teleport to- Overrides:
travelToDimensionin classEntity
-
setDead
public void setDead()Will get destroyed next tick.- Overrides:
setDeadin classEntityMinecart
-
writeEntityToNBT
(abstract) Protected helper method to write subclass entity data to NBT.- Overrides:
writeEntityToNBTin classEntityMinecart
-
readEntityFromNBT
(abstract) Protected helper method to read subclass entity data from NBT.- Overrides:
readEntityFromNBTin classEntityMinecart
-
interactFirst
First layer of player interaction- Overrides:
interactFirstin classEntity
-
applyDrag
protected void applyDrag()- Overrides:
applyDragin classEntityMinecart
-