Package net.minecraft.src
Class BlockRedstoneLogic
java.lang.Object
net.minecraft.src.Block
net.minecraft.src.BlockDirectional
net.minecraft.src.BlockRedstoneLogic
- Direct Known Subclasses:
BlockComparator,BlockRedstoneRepeater
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanTells whether the repeater is powered or notFields 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 TypeMethodDescriptionbooleancanBlockStay(World par1World, int par2, int par3, int par4) Can this block stay at this position.booleancanPlaceBlockAt(World par1World, int par2, int par3, int par4) Checks to see if its valid to put this block at the specified coordinates.booleanCan this block provide power.booleancanRotateOnTurntable(IBlockAccess blockAccess, int x, int y, int z) booleanfunc_83011_d(World par1World, int par2, int par3, int par4, int par5) booleanfunc_94476_e(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) protected booleanfunc_94477_d(int par1) protected voidfunc_94479_f(World par1World, int par2, int par3, int par4, int par5) protected intfunc_94480_d(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) protected abstract intfunc_94481_j_(int var1) protected intfunc_94482_f(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) protected voidfunc_94483_i_(World world, int x, int y, int z) protected abstract BlockRedstoneLogicprotected abstract BlockRedstoneLogicprotected intfunc_94486_g(int par1) booleanfunc_94487_f(int par1) protected intfunc_94488_g(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) protected booleanfunc_96470_c(int par1) getIcon(int par1, int par2) From the specified side and block metadata retrieves the blocks texture.protected intgetInputStrength(World par1World, int par2, int par3, int par4, int par5) Returns the signal strength at one input of the block.intThe type of render function that is called for this blockbooleanisAssociatedBlockID(int par1) Returns true if the given block ID is equivalent to this one.protected booleanisGettingInput(World par1World, int par2, int par3, int par4, int par5) booleanIs this block (a) opaque and (b) a full 1m cube?intisProvidingStrongPower(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) Returns true if the block is emitting direct/strong redstone power on the specified side.intisProvidingWeakPower(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) Returns true if the block is emitting indirect/weak redstone power on the specified side.static booleanisRedstoneRepeaterBlockID(int par0) voidonBlockAdded(World par1World, int par2, int par3, int par4) Called whenever the block is added into the world.voidonBlockDestroyedByPlayer(World par1World, int par2, int par3, int par4, int par5) Called right before the block is destroyed by a player.intonBlockPlaced(World world, int x, int y, int z, int facing, float clickX, float clickY, float clickZ, int metadata) Called when a block is placed using its ItemBlock.voidonBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack) Called when the block is placed in the world.voidonNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5) Lets the block know when one of its neighbor changes.booleanIf this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)booleanrenderBlock(RenderBlocks renderer, int i, int j, int k) booleanrotateAroundJAxis(World world, int x, int y, int z, boolean reverse) Returns true if the facing has actually changed as a result of this callbooleanshouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) Returns true if the given side of this block type should be rendered, if the adjacent block is at the given coordinates.booleanWhether or not the block sets off Buddy Blocks.protected voidupdateNeighborsInDirection(World world, int x, int y, int z, int direction) voidupdateTick(World par1World, int par2, int par3, int par4, Random par5Random) Ticks the block if it's been scheduledMethods inherited from class net.minecraft.src.BlockDirectional
getDirection, rotateMetadataAroundYAxisMethods inherited from class net.minecraft.src.Block
addCollisionBoxesToList, adjustMetadataForPistonMove, adjustPathWeightOnNotBlocked, areAxesEffectiveOn, arechiselseffectiveon, arechiselseffectiveon, areHoesEffectiveOn, arePicksEffectiveOn, areShovelsEffectiveOn, attachToFacing, attemptToAffectBlockWithSoul, attemptToApplyFertilizerTo, attemptToCombineWithFallingEntity, blocksEndermanPickup, breakBlock, canBeConvertedByMobSpawner, canBeCrushedByFallingEntity, canBeGrazedOn, canBePistonShoveled, canBlockBePulledByPiston, canBlockBePushedByPiston, canBlocksBePlacedAgainstThisBlock, canBlockStayDuringGenerate, canBlockSuffocateEntity, canCactusGrowOnBlock, canChiselsHarvest, canCollideCheck, canContainPistonPackingToFacing, canConvertBlock, canDomesticatedCropsGrowOnBlock, canDropFromExplosion, canEndermenPickUpBlock, canFallIntoBlockAtPos, canGroundCoverRestOnBlock, canLeashKnotOnBlock, canMobsSpawnOn, canNetherWartGrowOnBlock, canPathThroughBlock, canPlaceBlockOnSide, canPlaceBlockOnSide, canRedstoneConnectToSide, canReedsGrowOnBlock, canRotateAroundBlockOnTurntableToFacing, 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, getComparatorInputOverride, getConvertsLegacySoil, getCookTimeMultiplierInKiLn, getCreativeTabToDisplayOn, getDamageValue, getDoesFireDamageToEntities, getDoesFireDamageToEntities, getDoesStumpRemoverWorkOnBlock, getEfficientToolLevel, getEnableStats, getExplosionResistance, getExplosionResistance, getFacing, 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, getSelectedBoundingBoxFromPool, getSelectedBoundingBoxFromPool, getStackRetrievedByBlockDispenser, getStepSound, getStepSound, getStepSoundInternal, getStepSoundName, getStepSoundName, getSubBlocks, getTextureName, getTickRandomly, getUnlocalizedName, getUnlocalizedName2, getWeedsGrowthLevel, getWeightOnPathBlocked, groundCoverRestingOnVisualOffset, harvestBlock, hasCenterHardPointToFacing, hasCenterHardPointToFacing, hasComparatorInputOverride, 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, isBenchOrTable, isBlockAttachedToFacing, isBlockClimbable, isBlockDestroyedByBlockDispenser, isBlockHydratedForPlantGrowthOn, isBlockInfestable, isBlockInfestedBy, isBlockRestingOnThatBelow, isBlockSolid, isBreakableBarricade, isBreakableBarricadeOpen, isCollidable, isConsideredNeighbouringWaterForReedGrowthOn, isFallingBlock, isFence, isFlowerPot, isGroundCover, isIncineratedInCrucible, isLeafBlock, isLog, isNaturalStone, isNormalCube, isNormalCube, isRedstoneConductor, isReplaceableVegetation, isSnowCoveringTopSurface, isStairBlock, isStickyToSnow, isWall, mobSpawnOnVerticalOffset, mouseOverRayTrace, notifyNearbyAnimalsFinishedFalling, notifyNeighborDirtDugWithImproperTool, notifyNeighborsBlockDisrupted, notifyOfFullStagePlantGrowthOn, notifyOfPlantAboveRemoved, onArrowCollide, onArrowImpact, onBlockActivated, onBlockClicked, onBlockDestroyedByExplosion, onBlockDestroyedByMiningCharge, onBlockDestroyedLandingFromFall, onBlockDestroyedWithImproperTool, onBlockEventReceived, onBlockHarvested, 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, registerIcons, removeWeeds, renderBlockAsItem, renderBlockMovedByPiston, renderBlockSecondPass, renderBlockWithTexture, renderCookingByKiLnOverlay, renderCrossHatch, renderFallingBlock, rotateFacingAroundY, 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, shouldSideBeRenderedOnFallingBlock, shouldWallConnectToThisBlockToFacing, shouldWallFormPostBelowThisBlock, spreadGrassToBlock, spreadMyceliumToBlock, startlesAnimalsWhenPlaced, tickRate, toggleFacing, turntableCraftingRotation, velocityToAddToEntity
-
Field Details
-
isRepeaterPowered
protected final boolean isRepeaterPoweredTells whether the repeater is powered or not
-
-
Constructor Details
-
BlockRedstoneLogic
protected BlockRedstoneLogic(int par1, boolean par2)
-
-
Method Details
-
renderAsNormalBlock
public boolean renderAsNormalBlock()If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)- Overrides:
renderAsNormalBlockin classBlock
-
canPlaceBlockAt
Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z- Overrides:
canPlaceBlockAtin classBlock
-
canBlockStay
Can this block stay at this position. Similar to canPlaceBlockAt except gets checked often with plants.- Overrides:
canBlockStayin classBlock
-
updateTick
Ticks the block if it's been scheduled- Overrides:
updateTickin classBlock
-
getIcon
From the specified side and block metadata retrieves the blocks texture. Args: side, metadata -
shouldSideBeRendered
public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) Returns true if the given side of this block type should be rendered, if the adjacent block is at the given coordinates. Args: blockAccess, x, y, z, side- Overrides:
shouldSideBeRenderedin classBlock
-
getRenderType
public int getRenderType()The type of render function that is called for this block- Overrides:
getRenderTypein classBlock
-
func_96470_c
protected boolean func_96470_c(int par1) -
isProvidingStrongPower
public int isProvidingStrongPower(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) Returns true if the block is emitting direct/strong redstone power on the specified side. Args: World, X, Y, Z, side. Note that the side is reversed - eg it is 1 (up) when checking the bottom of the block.- Overrides:
isProvidingStrongPowerin classBlock
-
isProvidingWeakPower
public int isProvidingWeakPower(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) Returns true if the block is emitting indirect/weak redstone power on the specified side. If isBlockNormalCube returns true, standard redstone propagation rules will apply instead and this will not be called. Args: World, X, Y, Z, side. Note that the side is reversed - eg it is 1 (up) when checking the bottom of the block.- Overrides:
isProvidingWeakPowerin classBlock
-
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
-
func_94479_f
-
func_94476_e
-
isGettingInput
-
getInputStrength
Returns the signal strength at one input of the block. Args: world, X, Y, Z, side -
func_94482_f
-
func_94488_g
-
canProvidePower
public boolean canProvidePower()Can this block provide power. Only wire currently seems to have this change based on its state.- Overrides:
canProvidePowerin classBlock
-
onBlockPlacedBy
public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack) Called when the block is placed in the world.- Overrides:
onBlockPlacedByin classBlock
-
onBlockAdded
Called whenever the block is added into the world. Args: world, x, y, z- Overrides:
onBlockAddedin classBlock
-
func_94483_i_
-
onBlockDestroyedByPlayer
Called right before the block is destroyed by a player. Args: world, x, y, z, metaData- Overrides:
onBlockDestroyedByPlayerin classBlock
-
isOpaqueCube
public boolean isOpaqueCube()Is this block (a) opaque and (b) a full 1m cube? This determines whether or not to render the shared face of two adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.- Overrides:
isOpaqueCubein classBlock
-
func_94477_d
protected boolean func_94477_d(int par1) -
func_94480_d
-
isRedstoneRepeaterBlockID
public static boolean isRedstoneRepeaterBlockID(int par0) -
func_94487_f
public boolean func_94487_f(int par1) -
func_83011_d
-
func_94486_g
protected int func_94486_g(int par1) -
func_94481_j_
protected abstract int func_94481_j_(int var1) -
func_94485_e
-
func_94484_i
-
isAssociatedBlockID
public boolean isAssociatedBlockID(int par1) Returns true if the given block ID is equivalent to this one. Example: redstoneTorchOn matches itself and redstoneTorchOff, and vice versa. Most blocks only match themselves.- Overrides:
isAssociatedBlockIDin classBlock
-
updateNeighborsInDirection
-
onBlockPlaced
public int onBlockPlaced(World world, int x, int y, int z, int facing, float clickX, float clickY, float clickZ, int metadata) Description copied from class:BlockCalled when a block is placed using its ItemBlock. Args: World, X, Y, Z, side, hitX, hitY, hitZ, block metadata- Overrides:
onBlockPlacedin classBlock
-
triggersBuddy
public boolean triggersBuddy()Description copied from class:BlockWhether or not the block sets off Buddy Blocks. Set to false for stuff like redstone blocks that can cause feedback loops.- Overrides:
triggersBuddyin classBlock
-
canRotateOnTurntable
- Overrides:
canRotateOnTurntablein classBlock
-
rotateAroundJAxis
Description copied from class:BlockReturns true if the facing has actually changed as a result of this call- Overrides:
rotateAroundJAxisin classBlock
-
renderBlock
- Overrides:
renderBlockin classBlock
-