Package net.minecraft.src
Class BlockDispenser
java.lang.Object
net.minecraft.src.Block
net.minecraft.src.BlockContainer
net.minecraft.src.BlockDispenser
- All Implemented Interfaces:
ITileEntityProvider
- Direct Known Subclasses:
BlockDropper
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IRegistryRegistry for all dispense behaviors.protected Iconprotected Iconprotected Iconprotected RandomFields inherited from class net.minecraft.src.Block
anvil, beacon, bed, bedrock, blockClay, blockConstructorCalled, blockDiamond, blockEmerald, blockGold, blockHardness, blockIcon, blockID, blockIron, blockLapis, blockMaterial, blockNetherQuartz, blockParticleGravity, blockRedstone, blockReplaced, blockReplacedBy, blockResistance, blocksList, blockSnow, bookShelf, brewingStand, brick, cactus, cake, canBlockGrass, carpet, carrot, cauldron, chest, chestTrapped, cloth, coalBlock, cobblestone, cobblestoneMossy, cobblestoneWall, cocoaPlant, commandBlock, crops, currentBlockRenderer, daylightSensor, deadBush, dirt, dispenser, doorIron, doorWood, dragonEgg, dropper, enableStats, enchantmentTable, enderChest, endPortal, endPortalFrame, fence, fenceGate, fenceIron, fire, flowerPot, furnaceBurning, furnaceIdle, glass, glowStone, grass, gravel, hardenedClay, hasKilnRecipe, hay, hopperBlock, ice, isBlockContainer, jukebox, ladder, lavaMoving, lavaStill, leaves, lever, lightOpacity, lightValue, lockedChest, maxX, maxY, maxZ, melon, melonStem, minX, minY, minZ, mobSpawner, modID, modIDSetter, mushroomBrown, mushroomCapBrown, mushroomCapRed, mushroomRed, music, mycelium, needsRandomTick, netherBrick, netherFence, netherrack, netherStalk, obsidian, opaqueCubeLookup, oreCoal, oreDiamond, oreEmerald, oreGold, oreIron, oreLapis, oreNetherQuartz, oreRedstone, oreRedstoneGlowing, pistonBase, pistonExtension, pistonMoving, pistonStickyBase, planks, plantRed, plantYellow, portal, potato, pressurePlateGold, pressurePlateIron, pressurePlatePlanks, pressurePlateStone, pumpkin, pumpkinLantern, pumpkinStem, rail, railActivator, railDetector, railPowered, redstoneComparatorActive, redstoneComparatorIdle, redstoneLampActive, redstoneLampIdle, redstoneRepeaterActive, redstoneRepeaterIdle, redstoneWire, reed, sand, sandStone, sapling, signPost, signWall, silverfish, skull, slipperiness, slowSand, snow, soundAnvilFootstep, soundClothFootstep, soundGlassFootstep, soundGrassFootstep, soundGravelFootstep, soundLadderFootstep, soundMetalFootstep, soundPowderFootstep, soundSandFootstep, soundSnowFootstep, soundStoneFootstep, soundWoodFootstep, sponge, stainedClay, stairsBrick, stairsCobblestone, stairsNetherBrick, stairsNetherQuartz, stairsSandStone, stairsStoneBrick, stairsWoodBirch, stairsWoodJungle, stairsWoodOak, stairsWoodSpruce, stepSound, stone, stoneBrick, stoneButton, stoneDoubleSlab, stoneSingleSlab, tallGrass, textureName, thinGlass, tilledField, tnt, torchRedstoneActive, torchRedstoneIdle, torchWood, trapdoor, tripWire, tripWireSource, useNeighborBrightness, vine, waterlily, waterMoving, waterStill, web, whiteStone, wood, woodDoubleSlab, woodenButton, woodSingleSlab, workbench -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbreakBlock(World par1World, int par2, int par3, int par4, int par5, int par6) Called on server worlds only when the block has been replaced by a different block ID, or the same block with a different metadata value, but before the new metadata value is set.createNewTileEntity(World par1World) Returns a new instance of a block's tile entity class.protected voidprotected IBehaviorDispenseItemgetBehaviorForItemStack(ItemStack par1ItemStack) Returns the behavior for the given ItemStack.intgetComparatorInputOverride(World par1World, int par2, int par3, int par4, int par5) If hasComparatorInputOverride returns true, the return value from this is used instead of the redstone signal strength when this block inputs to a comparator.static EnumFacinggetDispenserFacing(int par0) intgetFacing(int iMetadata) getIcon(int par1, int par2) From the specified side and block metadata retrieves the blocks texture.static IPositiongetIPositionFromBlockSource(IBlockSource par0IBlockSource) booleanIf this returns true, then comparators facing away from this block will use the value from getComparatorInputOverride instead of the actual redstone signal strength.booleanonBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) Called upon block activation (right click on the block.)voidonBlockAdded(World par1World, int par2, int par3, int par4) Called whenever the block is added into the world.voidonBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityLiving, ItemStack stack) Called when the block is placed in the world. // +++START EDIT+++ FCNOTE: Called AFTER the block is placed, unlike onBlockPlaced() // ---END EDIT---voidonNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5) Lets the block know when one of its neighbor changes.voidregisterIcons(IconRegister par1IconRegister) When this method is called, your block should register all the icons it needs with the given IconRegister.intsetFacing(int iMetadata, int iFacing) intHow many world ticks before tickingvoidupdateTick(World par1World, int par2, int par3, int par4, Random par5Random) Ticks the block if it's been scheduledMethods inherited from class net.minecraft.src.BlockContainer
onBlockEventReceivedMethods inherited from class net.minecraft.src.Block
addCollisionBoxesToList, adjustMetadataForPistonMove, adjustPathWeightOnNotBlocked, areAxesEffectiveOn, arechiselseffectiveon, arechiselseffectiveon, areHoesEffectiveOn, arePicksEffectiveOn, areShovelsEffectiveOn, attachToFacing, attemptToAffectBlockWithSoul, attemptToApplyFertilizerTo, attemptToCombineWithFallingEntity, blocksEndermanPickup, canBeConvertedByMobSpawner, canBeCrushedByFallingEntity, canBeGrazedOn, canBePistonShoveled, canBlockBePulledByPiston, canBlockBePushedByPiston, canBlocksBePlacedAgainstThisBlock, canBlockStay, canBlockStayDuringGenerate, canBlockSuffocateEntity, canCactusGrowOnBlock, canChiselsHarvest, canCollideCheck, canContainPistonPackingToFacing, canConvertBlock, canDomesticatedCropsGrowOnBlock, canDropFromExplosion, canEndermenPickUpBlock, canFallIntoBlockAtPos, canGroundCoverRestOnBlock, canLeashKnotOnBlock, canMobsSpawnOn, canNetherWartGrowOnBlock, canPathThroughBlock, canPlaceBlockAt, canPlaceBlockOnSide, canPlaceBlockOnSide, canProvidePower, canRedstoneConnectToSide, canReedsGrowOnBlock, canRotateAroundBlockOnTurntableToFacing, canRotateOnTurntable, canSaplingsGrowOnBlock, canSilkHarvest, canSilkHarvest, canSpitWebReplaceBlock, canSupportFallingBlocks, canSupportLeaves, canToolsStickInBlock, canToolStickInBlockSpecialCase, canTransmitRotationHorizontallyOnTurntable, canTransmitRotationVerticallyOnTurntable, canWeedsGrowInBlock, canWildVegetationGrowOnBlock, canWitherDestroyBlock, checkForFall, checkForUnstableGround, clientBlockAdded, clientBreakBlock, clientNotificationOfMetadataChange, collisionRayTrace, collisionRayTraceVsBlockBounds, colorMultiplier, convertBlock, convertBlockFromMobSpawner, convertFacingToBottomTextureRotation, convertFacingToTopTextureRotation, createStackedBlock, cycleFacing, damageDropped, disableStats, doEndermenIgnoreNeighbors, doesBlockBreakSaw, doesBlockDropAsItemOnSaw, doesBlockHopperEject, doesBlockHopperInsert, doesExtinguishFireAbove, doesInfiniteBurnToFacing, doesItemRenderAsBlock, dropBlockAsItem, dropBlockAsItem_do, dropBlockAsItemWithChance, dropComponentItemsOnBadBreak, dropItemsIndividually, dropItemsOnDestroyedByExplosion, dropItemsOnDestroyedByMiningCharge, dropXpOnBlockBreak, fillWithRain, func_82506_l, getAmbientOcclusionLightValue, getAsPistonMovingBoundingBox, getBlockBoundsFromPoolBasedOnState, getBlockBoundsFromPoolForItemRender, getBlockBoundsMaxX, getBlockBoundsMaxY, getBlockBoundsMaxZ, getBlockBoundsMinX, getBlockBoundsMinY, getBlockBoundsMinZ, getBlockBrightness, getBlockColor, getBlockHardness, getBlockIDOnInfest, getBlocksMovement, getBlockTexture, getBlockTextureFromSide, getBreakSoundName, getBreakSoundName, getBuoyancy, getCanBeCookedByKiLn, getCanBeSetOnFireDirectly, getCanBeSetOnFireDirectlyByItem, getCanBlightSpreadToBlock, getCanBlockBeIncinerated, getCanBlockBeReplacedByFire, getCanBlockLightItemOnFire, getCanGrassGrowUnderBlock, getCanGrassSpreadToBlock, getCanMyceliumSpreadToBlock, getChanceOfFireSpreadingDirectlyTo, getChickenItemFoodValue, getCollisionBoundingBoxFromPool, getConvertsLegacySoil, getCookTimeMultiplierInKiLn, getCreativeTabToDisplayOn, getDamageValue, getDoesFireDamageToEntities, getDoesFireDamageToEntities, getDoesStumpRemoverWorkOnBlock, getEfficientToolLevel, getEnableStats, getExplosionResistance, getExplosionResistance, getFacing, getFixedBlockBoundsFromPool, getFullBlockBoundingBoxFromPool, getFurnaceBurnTime, getHarvestToolLevel, getHerbivoreItemFoodValue, getHopperFilterIcon, getIconByIndex, getIsBlockWarm, getIsFertilizedForPlantGrowth, getIsProblemToRemove, getItemIconName, getLightValue, getLightValueForBlock, getLocalizedName, getMapColor, getMechanicalPowerLevelProvidedToAxleAtFacing, getMetadataConversionForStrataLevel, getMixedBrightnessForBlock, getMobilityFlag, getModId, getMovementModifier, getNewMetadataRotatedAroundBlockOnTurntableToFacing, getOppositeFacing, getOutputsWhenCookedByKiln, getPigItemFoodValue, getPistonShovelEjectDirection, getPlaceSoundName, getPlaceSoundName, getPlantGrowthOnMultiplier, getPlayerRelativeBlockHardness, getPreventsFluidFlow, getRenderBlockPass, getRenderColor, getRenderType, getSelectedBoundingBoxFromPool, getSelectedBoundingBoxFromPool, getStackRetrievedByBlockDispenser, getStepSound, getStepSound, getStepSoundInternal, getStepSoundName, getStepSoundName, getSubBlocks, getTextureName, getTickRandomly, getUnlocalizedName, getUnlocalizedName2, getWeedsGrowthLevel, getWeightOnPathBlocked, groundCoverRestingOnVisualOffset, harvestBlock, hasCenterHardPointToFacing, hasCenterHardPointToFacing, hasComparatorInputOverride, hasContactPointToFullFace, hasContactPointToSlabSideFace, hasContactPointToStairNarrowVerticalFace, hasContactPointToStairShapedFace, hasFallingBlockRestingOn, hasLargeCenterHardPointToFacing, hasLargeCenterHardPointToFacing, hasMortar, hasNeighborWithMortarInContact, hasSmallCenterHardPointToFacing, hasSmallCenterHardPointToFacing, hasStickySnowNeighborInContact, hasStrata, hasTileEntity, hasWaterToSidesOrTop, hideFromEMI, hideFromEMI, idDropped, idPicked, infestBlock, initBlockBounds, initBlockBounds, initializeBlock, installationIntegrityTest, isAirBlock, isAssociatedBlockID, isAssociatedBlockID, isBenchOrTable, isBlockAttachedToFacing, isBlockClimbable, isBlockDestroyedByBlockDispenser, isBlockHydratedForPlantGrowthOn, isBlockInfestable, isBlockInfestedBy, isBlockRestingOnThatBelow, isBlockSolid, isBreakableBarricade, isBreakableBarricadeOpen, isCollidable, isConsideredNeighbouringWaterForReedGrowthOn, isFallingBlock, isFence, isFlowerPot, isGroundCover, isIncineratedInCrucible, isLeafBlock, isLog, isNaturalStone, isNormalCube, isNormalCube, isOpaqueCube, isProvidingStrongPower, isProvidingWeakPower, isRedstoneConductor, isReplaceableVegetation, isSnowCoveringTopSurface, isStairBlock, isStickyToSnow, isWall, mobSpawnOnVerticalOffset, mouseOverRayTrace, notifyNearbyAnimalsFinishedFalling, notifyNeighborDirtDugWithImproperTool, notifyNeighborsBlockDisrupted, notifyOfFullStagePlantGrowthOn, notifyOfPlantAboveRemoved, onArrowCollide, onArrowImpact, onBlockClicked, onBlockDestroyedByExplosion, onBlockDestroyedByMiningCharge, onBlockDestroyedByPlayer, onBlockDestroyedLandingFromFall, onBlockDestroyedWithImproperTool, onBlockHarvested, onBlockPlaced, onBlockPreDestroy, onBlockSawed, onBlockSawed, onBrokenByPistonPush, onCookedByKiLn, onCraftedOnTurntable, onCreativeBonemealApplied, onCrushedByFallingEntity, onDestroyedByFire, onDirtDugWithImproperTool, onDirtSlabDugWithImproperTool, onEntityCollidedWithBlock, onEntityStepsIn, onEntityWalking, onFallenUpon, onFallingUpdate, onFinishedFalling, onFinishFalling, onFluidFlowIntoBlock, onGrazed, onInfested, onMortarApplied, onNeighborDirtDugWithImproperTool, onNeighborDisrupted, onPlayerWalksOnBlock, onPostBlockPlaced, onPreBlockPlacedByPiston, onRemovedByBlockDispenser, onRotatedAroundBlockOnTurntableToFacing, onRotatedOnTurntable, onStartFalling, onStruckByLightning, onVegetationAboveGrazed, postBlockDestroyedByExplosion, postBlockDestroyedByMiningCharge, preBlockPlacedBy, quantityDropped, quantityDroppedWithBonus, randomDisplayTick, randomUpdateTick, removeWeeds, renderAsNormalBlock, renderBlock, renderBlockAsItem, renderBlockMovedByPiston, renderBlockSecondPass, renderBlockWithTexture, renderCookingByKiLnOverlay, renderCrossHatch, renderFallingBlock, rotateAroundJAxis, rotateFacingAroundY, rotateMetadataAroundYAxis, rotateOnTurntable, scheduleCheckForFall, setAlwaysStartlesAnimals, setAxesEffectiveOn, setAxesEffectiveOn, setBlockBounds, setBlockBoundsBasedOnState, setBlockBoundsForItemRender, setBlockMaterial, setBlockUnbreakable, setBuoyancy, setBuoyant, setChickenItemFoodValue, setChiselsCanHarvest, setChiselsCanHarvest, setChiselsEffectiveOn, setChiselsEffectiveOn, setCreativeTab, setFacing, setFireProperties, setFireProperties, setFurnaceBurnTime, setFurnaceBurnTime, setHardness, setHerbivoreItemFoodValue, setHoesEffectiveOn, setHoesEffectiveOn, setLightOpacity, setLightValue, setMapColorsForMetadata, setModID, setNeutralBuoyant, setNonBuoyant, setOnFireDirectly, setPicksEffectiveOn, setPicksEffectiveOn, setPigItemFoodValue, setResistance, setShovelsEffectiveOn, setShovelsEffectiveOn, setStepSound, setTextureName, setTickRandomly, setUnlocalizedName, shouldDeleteTileEntityOnBlockChange, shouldFenceConnectToThisBlockToFacing, shouldOffsetPositionIfPathingOutOf, shouldPaneConnectToThisBlockToFacing, shouldPlayStandardConvertSound, shouldRenderNeighborFullFaceSide, shouldRenderNeighborHalfSlabSide, shouldRenderWhileFalling, shouldSideBeRendered, shouldSideBeRenderedOnFallingBlock, shouldWallConnectToThisBlockToFacing, shouldWallFormPostBelowThisBlock, spreadGrassToBlock, spreadMyceliumToBlock, startlesAnimalsWhenPlaced, toggleFacing, triggersBuddy, turntableCraftingRotation, velocityToAddToEntity
-
Field Details
-
dispenseBehaviorRegistry
Registry for all dispense behaviors. -
random
-
furnaceTopIcon
-
furnaceFrontIcon
-
field_96473_e
-
-
Constructor Details
-
BlockDispenser
protected BlockDispenser(int par1)
-
-
Method Details
-
getFacing
public int getFacing(int iMetadata) -
setFacing
public int setFacing(int iMetadata, int iFacing) -
onBlockPlacedBy
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entityLiving, ItemStack stack) Description copied from class:BlockCalled when the block is placed in the world. // +++START EDIT+++ FCNOTE: Called AFTER the block is placed, unlike onBlockPlaced() // ---END EDIT---- Overrides:
onBlockPlacedByin classBlock
-
tickRate
How many world ticks before ticking -
onBlockAdded
Called whenever the block is added into the world. Args: world, x, y, z- Overrides:
onBlockAddedin classBlockContainer
-
getIcon
From the specified side and block metadata retrieves the blocks texture. Args: side, metadata -
registerIcons
When this method is called, your block should register all the icons it needs with the given IconRegister. This is the only chance you get to register icons.- Overrides:
registerIconsin classBlock
-
onBlockActivated
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) Called upon block activation (right click on the block.)- Overrides:
onBlockActivatedin classBlock
-
dispense
-
getBehaviorForItemStack
Returns the behavior for the given ItemStack. -
onNeighborBlockChange
Lets the block know when one of its neighbor changes. Doesn't know which neighbor changed (coordinates passed are their own) Args: x, y, z, neighbor blockID- Overrides:
onNeighborBlockChangein classBlock
-
updateTick
Ticks the block if it's been scheduled- Overrides:
updateTickin classBlock
-
createNewTileEntity
Returns a new instance of a block's tile entity class. Called on placing the block. -
breakBlock
Called on server worlds only when the block has been replaced by a different block ID, or the same block with a different metadata value, but before the new metadata value is set. Args: World, x, y, z, old block ID, old metadata- Overrides:
breakBlockin classBlockContainer
-
getIPositionFromBlockSource
-
getDispenserFacing
-
hasComparatorInputOverride
public boolean hasComparatorInputOverride()If this returns true, then comparators facing away from this block will use the value from getComparatorInputOverride instead of the actual redstone signal strength.- Overrides:
hasComparatorInputOverridein classBlock
-
getComparatorInputOverride
If hasComparatorInputOverride returns true, the return value from this is used instead of the redstone signal strength when this block inputs to a comparator.- Overrides:
getComparatorInputOverridein classBlock
-