Package net.minecraft.src
Class BlockJukeBox
java.lang.Object
net.minecraft.src.Block
net.minecraft.src.BlockContainer
net.minecraft.src.BlockJukeBox
- All Implemented Interfaces:
MechanicalBlock,ITileEntityProvider
Metadata:
0b1100 - Tilt
0b0010 - Disk
0b0001 - Powered
-
Field Summary
Fields 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.booleancanInputAxlePowerToFacing(World world, int i, int j, int k, int iFacing) booleanbooleancreateNewTileEntity(World world) Returns a new instance of a block's tile entity class.voiddropBlockAsItemWithChance(World world, int x, int y, int z, int par5, float par6, int par7) Drops the block items with a specified chance of dropping the specified itemsvoidejectRecord(EntityPlayer player, World world, int x, int y, int z) Ejects the current record inside the jukebox.intgetComparatorInputOverride(World world, int x, int y, int z, 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.intgetFacing(int iMetadata) intgetFacing(IBlockAccess blockAccess, int i, int j, int k) booleangetHasDiskFlag(IBlockAccess iBlockAccess, int i, int j, int k) trueif this jukebox contains a diskgetIcon(int side, int meta) From the specified side and block metadata retrieves the blocks texture.intgetTiltFacing(int metadata) Gets the current horizontal tilt of the jukeboxintgetTiltFacing(IBlockAccess iBlockAccess, int i, int j, int k) Gets the current horizontal tilt of the jukeboxbooleanIf this returns true, then comparators facing away from this block will use the value from getComparatorInputOverride instead of the actual redstone signal strength.voidinsertRecord(World world, int x, int y, int z, ItemStack stack) Insert the specified music disc in the jukebox at the given coordinatesbooleanisInputtingMechanicalPower(World world, int i, int j, int k) booleanisOutputtingMechanicalPower(World world, int i, int j, int k) booleanisPowered(int meta) trueif jukebox is powered.booleanisPowered(IBlockAccess iBlockAccess, int i, int j, int k) trueif jukebox is powered.booleanonBlockActivated(World world, int x, int y, int z, EntityPlayer player, int iFacing, float fClickX, float fClickY, float fClickZ) Called upon block activation (right click on the block.)voidonBlockAdded(World world, int i, int j, int k) Schedules initial block updatevoidonEntityCollidedWithBlock(World world, int i, int j, int k, Entity entity) Disk insertion from world functionalityvoidonNeighborBlockChange(@NotNull World world, int i, int j, int k, int _iBlockID) Lets the block know when one of its neighbor changes.voidvoidregisterIcons(IconRegister register) When this method is called, your block should register all the icons it needs with the given IconRegister.booleanrenderBlock(RenderBlocks renderer, int i, int j, int k) voidsetHasDiskFlag(World world, int i, int j, int k, boolean bFlag) trueif this jukebox contains a diskvoidsetTiltFacing(World world, int i, int j, int k, int iFacing) Sets the current horizontal tilt of the jukebox.intHow many world ticks before tickingvoidupdateTick(World world, int i, int j, int k, Random rand) Update tick, checks for mechanical power and handles jukebox tippingMethods 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, 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, 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, onBlockPlacedBy, onBlockPreDestroy, onBlockSawed, onBlockSawed, onBrokenByPistonPush, onCookedByKiLn, onCraftedOnTurntable, onCreativeBonemealApplied, onCrushedByFallingEntity, onDestroyedByFire, onDirtDugWithImproperTool, onDirtSlabDugWithImproperTool, 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, 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, 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
-
Constructor Details
-
BlockJukeBox
protected BlockJukeBox(int par1)
-
-
Method Details
-
tickRate
Description copied from class:BlockHow many world ticks before ticking -
onBlockAdded
Schedules initial block update- Overrides:
onBlockAddedin classBlockContainer
-
updateTick
Update tick, checks for mechanical power and handles jukebox tipping- Overrides:
updateTickin classBlock
-
onNeighborBlockChange
public void onNeighborBlockChange(@NotNull @NotNull World world, int i, int j, int k, int _iBlockID) Description copied from class:BlockLets 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 // +++START EDIT+++ FCNOTE: Only called on server // ---END EDIT---- Overrides:
onNeighborBlockChangein classBlock
-
getFacing
-
getFacing
public int getFacing(int iMetadata) -
onBlockActivated
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int iFacing, float fClickX, float fClickY, float fClickZ) Called upon block activation (right click on the block.)- Overrides:
onBlockActivatedin classBlock
-
insertRecord
Insert the specified music disc in the jukebox at the given coordinates -
ejectRecord
Ejects the current record inside the jukebox. -
onEntityCollidedWithBlock
Disk insertion from world functionality- Overrides:
onEntityCollidedWithBlockin classBlock
-
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
-
dropBlockAsItemWithChance
public void dropBlockAsItemWithChance(World world, int x, int y, int z, int par5, float par6, int par7) Drops the block items with a specified chance of dropping the specified items- Overrides:
dropBlockAsItemWithChancein classBlock
-
createNewTileEntity
Returns a new instance of a block's tile entity class. Called on placing the block.- Specified by:
createNewTileEntityin interfaceITileEntityProvider
-
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
-
canOutputMechanicalPower
public boolean canOutputMechanicalPower()- Specified by:
canOutputMechanicalPowerin interfaceMechanicalBlock
-
canInputMechanicalPower
public boolean canInputMechanicalPower()- Specified by:
canInputMechanicalPowerin interfaceMechanicalBlock
-
isInputtingMechanicalPower
- Specified by:
isInputtingMechanicalPowerin interfaceMechanicalBlock
-
isOutputtingMechanicalPower
- Specified by:
isOutputtingMechanicalPowerin interfaceMechanicalBlock
-
canInputAxlePowerToFacing
- Specified by:
canInputAxlePowerToFacingin interfaceMechanicalBlock
-
overpower
- Specified by:
overpowerin interfaceMechanicalBlock
-
getTiltFacing
Gets the current horizontal tilt of the jukebox -
getTiltFacing
public int getTiltFacing(int metadata) Gets the current horizontal tilt of the jukebox -
setTiltFacing
Sets the current horizontal tilt of the jukebox. -
isPowered
trueif jukebox is powered. -
isPowered
public boolean isPowered(int meta) trueif jukebox is powered. -
getHasDiskFlag
trueif this jukebox contains a disk -
setHasDiskFlag
trueif this jukebox contains a disk -
registerIcons
Description copied from class:BlockWhen 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
-
getIcon
From the specified side and block metadata retrieves the blocks texture. Args: side, metadata -
renderBlock
- Overrides:
renderBlockin classBlock
-