Package net.minecraft.src
Class Block
java.lang.Object
net.minecraft.src.Block
- Direct Known Subclasses:
AestheticNonOpaqueBlock,AestheticOpaqueBlock,AestheticOpaqueEarthBlock,AestheticVegetationBlock,AnchorBlock,AnvilBlock,AxleBlock,BellowsBlock,BlockAnvil,BlockBasePressurePlate,BlockBookshelf,BlockBreakable,BlockButton,BlockCactus,BlockCake,BlockCarpet,BlockCauldron,BlockClay,BlockColored,BlockContainer,BlockDirectional,BlockDoor,BlockEndPortalFrame,BlockFarmland,BlockFence,BlockFire,BlockFlowerPot,BlockFluid,BlockGlowStone,BlockGrass,BlockHalfSlab,BlockLadder,BlockLeavesBase,BlockLever,BlockLockedChest,BlockMelon,BlockMushroomCap,BlockMycelium,BlockNetherrack,BlockObsidian,BlockOre,BlockOreStorage,BlockPane,BlockPistonBase,BlockPistonExtension,BlockQuartz,BlockRailBase,BlockRedstoneLight,BlockRedstoneOre,BlockRedstoneWire,BlockReed,BlockRotatedPillar,BlockSandStone,BlockSilverfish,BlockSnow,BlockSnowBlock,BlockSoulSand,BlockSponge,BlockStairs,BlockStoneBrick,BlockTemplate,BlockTNT,BlockTorch,BlockTrapDoor,BlockTripWire,BlockTripWireSource,BlockVine,BlockWall,BlockWeb,BlockWood,BlockWorkbench,BloodWoodLogBlock,BrickBlock,BuddyBlock,CharredStumpBlock,ChewedLogBlock,ClusterBlock,CoalBlock,CobblestoneBlock,CompanionCubeBlock,CreeperOysterBlock,DetectorBlock,DetectorLogicBlock,DormantSoulforgeBlock,FallingBlock,FarmlandBlockBase,FenceBlock,FiredBrickBlock,FullBlock,GearBoxBlock,GroundCoverBlock,HandCrankBlock,HibachiBlock,KilnBlock,LadderBlockBase,LegacyCandleBlock,LegacyCornerBlock,LegacySidingBlock,LensBlock,LightBlock,LogSpikeBlock,MetalSpikeBlock,MiningChargeBlock,MossyCobblestoneBlock,MouldingBlock,NetherBrickBlock,NetherGrothBlock,NetherSludgeBlock,OldJackOLanternBlock,OreChunkBlock,PillarBlock,PistonShovelBlock,PlacedShaftBlock,PlanterBlockBase,PlantsBlock,PlatformBlock,RopeBlock,RottenFleshBlock,SawBlock,ScrewPumpBlock,SidingAndCornerBlock,SlabBlock,SolidSnowBlock,SoulforgedSteelBlock,SpiderEyeBlock,StairsBlockBase,StakeBlock,StakeStringBlock,StubBlock,SugarCaneBlockBase,TorchBlockBase,UnfiredClayBlock,UnfiredPotteryBlock,WickerBlock,WorkStumpBlock
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic Blockstatic BlockBeaconstatic Blockstatic Blockstatic Blockprotected booleanset to true when Block's constructor is called through the chain of super()'s.static Blockstatic Blockstatic BlockfloatIndicates how many hits it takes to break a block.final intID of the block.static Blockstatic BlockBlock material definition.static Blockfloatstatic Blockstatic final boolean[]static final String[]floatIndicates the blocks resistance to explosions.static final Block[]List of ly/ff (BlockType) containing the already registered blocks.static Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic final boolean[]Array of booleans that tells if a block can grass FCNOTE: Misleading name.static final Blockstatic Blockstatic BlockCauldronstatic BlockCheststatic Blockstatic Blockstatic final Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic BlockMainly used by shouldSideBeRendered() so that it can access the current render bounds.static BlockDaylightDetectorstatic BlockDeadBushstatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic Blockprotected booleanIf this field is true, the block is counted for statistics (mined or placed)static Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic BlockFirestatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic BlockGrassstatic Blockstatic final Blockstatic final boolean[]static final Blockstatic BlockHopperstatic Blockprotected booleantrue if the Block contains a Tile Entitystatic Blockstatic Blockstatic BlockFluidstatic Blockstatic BlockLeavesstatic Blockstatic final int[]How much light is subtracted for going through this blockstatic final int[]Amount of light emittedstatic BlockApril fools secret locked chest, only spawns on new chunks on 1st April.protected doubleFCNOTE: DEPRECATEDprotected doubleFCNOTE: DEPRECATEDprotected doubleFCNOTE: DEPRECATEDstatic Blockstatic Blockprotected doubleFCNOTE: DEPRECATEDprotected doubleFCNOTE: DEPRECATEDprotected doubleFCNOTE: DEPRECATEDstatic Blockprotected Stringstatic Stringstatic BlockFlowerstatic Blockstatic Blockstatic BlockFlowerstatic Blockstatic BlockMyceliumprotected booleanFlags whether or not this block is of a type that needs random ticking.static Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic final boolean[]An array of 4096 booleans corresponding to the result of the isOpaqueCube() method for each block IDstatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic BlockPistonBasestatic BlockPistonExtensionstatic BlockPistonMovingstatic BlockPistonBasestatic Blockstatic BlockFlowerstatic BlockFlowerstatic BlockPortalstatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic BlockComparatorstatic BlockComparatorstatic Blockstatic Blockstatic BlockRedstoneRepeaterstatic BlockRedstoneRepeaterstatic BlockRedstoneWirestatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic BlockfloatDetermines how much velocity is maintained while moving on top of this blockstatic Blockstatic Blockstatic final StepSoundstatic final StepSoundstatic final StepSoundstatic final StepSoundstatic final StepSoundstatic final StepSoundstatic final StepSoundstatic final StepSoundstatic final StepSoundstatic final StepSoundstatic final StepSoundstatic final StepSoundstatic Blockstatic final Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic BlockSound of stepping on the blockstatic Blockstatic Blockstatic Blockstatic BlockHalfSlabstatic BlockHalfSlabstatic BlockTallGrassprotected Stringstatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic Blockstatic BlockTripWireSourcestatic boolean[]Flag if block ID should use the brightest neighbor light value as its own // +++START EDIT+++ FCNOTE: Misleading name in that this does not apply to the neighbor below the block, only to sides and top // ---END EDIT---static Blockstatic Blockstatic BlockFluidstatic Blockstatic Blockstatic Blockstatic Blockstatic BlockHalfSlabstatic Blockstatic BlockHalfSlabstatic Block -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCollisionBoxesToList(World par1World, int par2, int par3, int par4, AxisAlignedBB par5AxisAlignedBB, List par6List, Entity par7Entity) Adds all intersecting collision boxes to a list.intadjustMetadataForPistonMove(int iMetadata) intadjustPathWeightOnNotBlocked(int iPreviousWeight) booleanbooleanbooleanarechiselseffectiveon(World world, int i, int j, int k) booleanbooleanbooleanvoidattachToFacing(World world, int i, int j, int k, int iFacing) booleanattemptToAffectBlockWithSoul(World world, int x, int y, int z) booleanattemptToApplyFertilizerTo(World world, int i, int j, int k) booleanattemptToCombineWithFallingEntity(World world, int i, int j, int k, EntityFallingSand entity) returns true if the block has combined with the entitybooleanblocksEndermanPickup(World world, int x, int y, int z) voidbreakBlock(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.booleancanBeConvertedByMobSpawner(World world, int x, int y, int z) booleancanBeCrushedByFallingEntity(World world, int i, int j, int k, EntityFallingSand entity) booleancanBeGrazedOn(IBlockAccess blockAccess, int i, int j, int k, EntityAnimal byAnimal) booleancanBePistonShoveled(World world, int i, int j, int k) booleancanBlockBePulledByPiston(World world, int i, int j, int k, int iToFacing) booleancanBlockBePushedByPiston(World world, int i, int j, int k, int iToFacing) booleancanBlocksBePlacedAgainstThisBlock(World world, int x, int y, int z) booleancanBlockStay(World par1World, int par2, int par3, int par4) Can this block stay at this position.booleancanBlockStayDuringGenerate(World world, int i, int j, int k) booleancanBlockSuffocateEntity(IBlockAccess blockAccess, int x, int y, int z) booleancanCactusGrowOnBlock(World world, int i, int j, int k) booleanbooleancanCollideCheck(int par1, boolean par2) Returns whether this block is collideable based on the arguments passed in \n@param par1 block metaData \n@param par2 whether the player right-clicked while holding a boatbooleancanContainPistonPackingToFacing(World world, int i, int j, int k, int iFacing) booleancanConvertBlock(ItemStack stack, World world, int i, int j, int k) booleancanDomesticatedCropsGrowOnBlock(World world, int i, int j, int k) booleancanDropFromExplosion(Explosion par1Explosion) Return whether this block can drop from an explosion.booleancanEndermenPickUpBlock(World world, int x, int y, int z) booleancanFallIntoBlockAtPos(World world, int i, int j, int k) booleancanGroundCoverRestOnBlock(World world, int i, int j, int k) booleancanLeashKnotOnBlock(World world, int x, int y, int z) booleancanMobsSpawnOn(World world, int i, int j, int k) This is only a first-pass indicator as to whether ANY mobs can spawn on top of the block, so stuff like leaves where only Jungle Spiders can spawn on them, should still return true.booleancanNetherWartGrowOnBlock(World world, int i, int j, int k) booleancanPathThroughBlock(IBlockAccess blockAccess, int i, int j, int k, Entity entity, PathFinder pathFinder) booleancanPlaceBlockAt(World par1World, int par2, int par3, int par4) Checks to see if its valid to put this block at the specified coordinates.booleancanPlaceBlockOnSide(World par1World, int par2, int par3, int par4, int par5) checks to see if you can place this block can be placed on that side of a block: BlockLever overridesbooleancanPlaceBlockOnSide(World par1World, int par2, int par3, int par4, int par5, ItemStack par6ItemStack) booleanCan this block provide power.booleancanRedstoneConnectToSide(IBlockAccess blockAccess, int x, int y, int z, int flatDirection) Should redstone dust redirect itself to this side of the blockbooleancanReedsGrowOnBlock(World world, int i, int j, int k) booleancanRotateAroundBlockOnTurntableToFacing(World world, int i, int j, int k, int iFacing) booleancanRotateOnTurntable(IBlockAccess blockAccess, int i, int j, int k) booleancanSaplingsGrowOnBlock(World world, int i, int j, int k) protected booleanReturn true if a player with Silk Touch can harvest this block directly, and not its normal drops.protected booleancanSilkHarvest(int iMetadata) booleancanSpitWebReplaceBlock(World world, int i, int j, int k) booleancanSupportFallingBlocks(IBlockAccess blockAccess, int i, int j, int k) booleancanSupportLeaves(IBlockAccess blockAccess, int x, int y, int z) booleancanToolsStickInBlock(IBlockAccess blockAccess, int i, int j, int k) booleancanToolStickInBlockSpecialCase(World world, int x, int y, int z, Item toolOrSword) booleancanTransmitRotationHorizontallyOnTurntable(IBlockAccess blockAccess, int i, int j, int k) booleancanTransmitRotationVerticallyOnTurntable(IBlockAccess blockAccess, int i, int j, int k) booleancanWeedsGrowInBlock(IBlockAccess blockAccess, int i, int j, int k) This determines whether weeds can share space with crop blocks, or grow within their own independent weed blocksbooleancanWildVegetationGrowOnBlock(World world, int i, int j, int k) Covers stuff like flowers and tall grassbooleanprotected booleancheckForFall(World world, int i, int j, int k) protected voidcheckForUnstableGround(World world, int i, int j, int k) voidclientBlockAdded(World world, int i, int j, int k) voidclientBreakBlock(World world, int i, int j, int k, int iBlockID, int iMetadata) voidclientNotificationOfMetadataChange(World world, int i, int j, int k, int iOldMetadata, int iNewMetadata) collisionRayTrace(World world, int i, int j, int k, Vec3 startRay, Vec3 endRay) collisionRayTraceVsBlockBounds(World world, int i, int j, int k, Vec3 startRay, Vec3 endRay) intcolorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) Returns a integer with hex for 0xrrggbb with this color multiplied against the blocks color.booleanconvertBlock(ItemStack stack, World world, int i, int j, int k, int iFromSide) Returns false if the block has not been replaced with another, and should be removedvoidconvertBlockFromMobSpawner(World world, int x, int y, int z) intconvertFacingToBottomTextureRotation(int iFacing) intconvertFacingToTopTextureRotation(int iFacing) protected ItemStackcreateStackedBlock(int par1) Returns an item stack containing a single instance of the current block type.static intcycleFacing(int iFacing, boolean bReverse) intdamageDropped(int par1) Determines the damage on the item the block drops.Disable statistics for the block, the block will no count for mined or placed.booleandoEndermenIgnoreNeighbors(World world, int x, int y, int z) booleandoesBlockBreakSaw(World world, int x, int y, int z) booleandoesBlockDropAsItemOnSaw(World world, int i, int j, int k) booleandoesBlockHopperEject(World world, int i, int j, int k) Applies to Hopper ejecting items into the world, not inserting into the block itselfbooleandoesBlockHopperInsert(World world, int i, int j, int k) Applies to Hopper inserting items directly into the block's inventory.booleandoesExtinguishFireAbove(World world, int i, int j, int k) booleandoesInfiniteBurnToFacing(IBlockAccess blockAccess, int i, int j, int k, int iFacing) booleandoesItemRenderAsBlock(int iItemDamage) final voiddropBlockAsItem(World par1World, int par2, int par3, int par4, int par5, int par6) // +++START EDIT+++ // ---END EDIT--- Drops the specified block itemsprotected voiddropBlockAsItem_do(World par1World, int par2, int par3, int par4, ItemStack par5ItemStack) Spawns EntityItem in the world for the given ItemStack if the world is not remote.voiddropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7) Drops the block items with a specified chance of dropping the specified itemsbooleandropComponentItemsOnBadBreak(World world, int i, int j, int k, int iMetadata, float fChanceOfDrop) Called by explosions and improper tool use.protected voiddropItemsIndividually(World world, int i, int j, int k, int iIDDropped, int iPileCount, int iDamageDropped, float fChanceOfPileDrop) voiddropItemsOnDestroyedByExplosion(World world, int i, int j, int k, Explosion explosion) Explosion may be null if this is called by a mining chargevoiddropItemsOnDestroyedByMiningCharge(World world, int x, int y, int z, int metadata) protected voiddropXpOnBlockBreak(World par1World, int par2, int par3, int par4, int par5) called by spawner, ore, redstoneOre blocksvoidfillWithRain(World par1World, int par2, int par3, int par4) currently only used by BlockCauldron to incrament meta-data during rainbooleanfloatgetAmbientOcclusionLightValue(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) Returns the default ambient occlusion value based on block opacitygetAsPistonMovingBoundingBox(World world, int i, int j, int k) getBlockBoundsFromPoolBasedOnState(IBlockAccess blockAccess, int i, int j, int k) getBlockBoundsFromPoolForItemRender(int iItemDamage) final doublereturns the block bounderies maxX valuefinal doublereturns the block bounderies maxY valuefinal doublereturns the block bounderies maxZ valuefinal doublereturns the block bounderies minX valuefinal doublereturns the block bounderies minY valuefinal doublereturns the block bounderies minZ valuefloatgetBlockBrightness(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) How bright to render this block based on the light its receiving.intfloatgetBlockHardness(World par1World, int par2, int par3, int par4) Returns the block hardness at a location.intgetBlockIDOnInfest(EntityLiving entity, int metadata) booleangetBlocksMovement(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) FCNOTE: This is misnamed and returns true if the block *doesn't* block movementgetBlockTexture(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) Retrieves the block texture to use based on the display side.final IcongetBlockTextureFromSide(int par1) Returns the block texture based on the side being looked at.final StringgetBreakSoundName(World world, int meta) final StringgetBreakSoundName(World world, int i, int j, int k) floatgetBuoyancy(int iMetadata) final booleangetCanBeCookedByKiLn(IBlockAccess blockAccess, int i, int j, int k) booleangetCanBeSetOnFireDirectly(IBlockAccess blockAccess, int i, int j, int k) Whether the block itself can be set on fire, rather than a neighboring block being set to a fire blockbooleangetCanBeSetOnFireDirectlyByItem(IBlockAccess blockAccess, int i, int j, int k) booleangetCanBlightSpreadToBlock(World world, int i, int j, int k, int iBlightLevel) booleangetCanBlockBeIncinerated(World world, int i, int j, int k) Used by Hibachi to determine if it can remove the block above it when litbooleangetCanBlockBeReplacedByFire(World world, int i, int j, int k) Whether a fire block can be directly placed over this one, without first burning or catching fire, as if it were air.booleangetCanBlockLightItemOnFire(IBlockAccess blockAccess, int i, int j, int k) booleangetCanGrassGrowUnderBlock(World world, int i, int j, int k, boolean bGrassOnHalfSlab) booleangetCanGrassSpreadToBlock(World world, int i, int j, int k) booleangetCanMyceliumSpreadToBlock(World world, int i, int j, int k) intgetChanceOfFireSpreadingDirectlyTo(IBlockAccess blockAccess, int i, int j, int k) intgetChickenItemFoodValue(int iItemDamage) getCollisionBoundingBoxFromPool(World world, int i, int j, int k) 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.booleangetConvertsLegacySoil(IBlockAccess blockAccess, int i, int j, int k) final intgetCookTimeMultiplierInKiLn(IBlockAccess blockAccess, int i, int j, int k) Returns the CreativeTab to display the given block on.intgetDamageValue(World par1World, int par2, int par3, int par4) Get the block's damage value (for use with pick block).booleangetDoesFireDamageToEntities(World world, int i, int j, int k) booleangetDoesFireDamageToEntities(World world, int i, int j, int k, Entity entity) booleangetDoesStumpRemoverWorkOnBlock(IBlockAccess blockAccess, int i, int j, int k) intgetEfficientToolLevel(IBlockAccess blockAccess, int i, int j, int k) booleanReturn the state of blocks statistics flags - if the block is counted for mined and placed.floatgetExplosionResistance(Entity par1Entity) Returns how much this block can resist explosions from the passed in entity.floatgetExplosionResistance(Entity entity, World world, int i, int j, int k) intgetFacing(int iMetadata) intgetFacing(IBlockAccess blockAccess, int i, int j, int k) protected AxisAlignedBBstatic AxisAlignedBBgetFullBlockBoundingBoxFromPool(World world, int i, int j, int k) intgetFurnaceBurnTime(int iItemDamage) intgetHarvestToolLevel(IBlockAccess blockAccess, int i, int j, int k) intgetHerbivoreItemFoodValue(int iItemDamage) getIcon(int par1, int par2) From the specified side and block metadata retrieves the blocks texture.getIconByIndex(int iIndex) Called by geometric primitives that FCModelBlock uses, to reference textures not associated with a specific block side.booleangetIsBlockWarm(IBlockAccess blockAccess, int i, int j, int k) Returns true if the block is warm enough to melt nearby snow or icebooleangetIsFertilizedForPlantGrowth(World world, int i, int j, int k) booleangetIsProblemToRemove(ItemStack toolStack, IBlockAccess blockAccess, int i, int j, int k) The following is for stumps and such, which are a pain to remove regardless of whether their overall block has relevant tool effecienciesGets the icon name of the ItemBlock corresponding to this block.intgetLightValue(IBlockAccess blockAccess, int x, int y, int z) static intgetLightValueForBlock(IBlockAccess blockAccess, int x, int y, int z, Block block) Gets the localized name of this block.getMapColor(int meta) Gets the color used in map rendering for this block with the specified metadataintgetMechanicalPowerLevelProvidedToAxleAtFacing(World world, int i, int j, int k, int iFacing) intgetMetadataConversionForStrataLevel(int iLevel, int iMetadata) intgetMixedBrightnessForBlock(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) Goes straight to getLightBrightnessForSkyBlocks for Blocks, does some fancy computing for FluidsintReturns the mobility information of the block, 0 = free, 1 = can't push but can move over, 2 = total immobility and stop pistons // +++START EDIT+++ FCMOD: 3 = can be piston shoveled, but free otherwise // ---END EDIT---getModId()Mod ID (same as in fabric.mod.json) of mod that adds this item.floatgetMovementModifier(World world, int i, int j, int k) intgetNewMetadataRotatedAroundBlockOnTurntableToFacing(World world, int i, int j, int k, int iInitialFacing, int iRotatedFacing) static intgetOppositeFacing(int iFacing) final ItemStack[]getOutputsWhenCookedByKiln(IBlockAccess blockAccess, int i, int j, int k) intgetPigItemFoodValue(int iItemDamage) intgetPistonShovelEjectDirection(World world, int i, int j, int k, int iToFacing) returns the direction the shoveled block will go in if this block is moving towards iToFacing.final StringgetPlaceSoundName(World world, int meta) final StringgetPlaceSoundName(World world, int i, int j, int k) floatgetPlantGrowthOnMultiplier(World world, int i, int j, int k, Block plantBlock) This is used by old style non-daily plant growthfloatgetPlayerRelativeBlockHardness(EntityPlayer player, World world, int i, int j, int k) booleangetPreventsFluidFlow(World world, int i, int j, int k, Block fluidBlock) int// +++START EDIT+++ // ---END EDIT--- Returns which pass should this block be rendered on. 0 for solids and 1 for alphaintgetRenderColor(int par1) Returns the color this block should be rendered.intThe type of render function that is called for this blockgetSelectedBoundingBoxFromPool(World world, int i, int j, int k) getSelectedBoundingBoxFromPool(World world, MovingObjectPosition rayTraceHit) Replaces vanilla call in RenderGlobal to provide ray trace info so specific portions of the block can be highlighted as selectedgetStackRetrievedByBlockDispenser(World world, int i, int j, int k) If the stack returned is null, the block will not be retrievedfinal StepSoundgetStepSound(World world, int meta) final StepSoundgetStepSound(World world, int i, int j, int k) protected StepSoundgetStepSoundInternal(World world, int meta) final StringgetStepSoundName(World world, int meta) final StringgetStepSoundName(World world, int i, int j, int k) voidgetSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List) returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)protected StringbooleanReturns whether or not this block is of a type that needs random ticking.Returns the unlocalized name of this block.Returns the unlocalized name without the tile. prefix.intgetWeedsGrowthLevel(IBlockAccess blockAccess, int i, int j, int k) The growth level of weeds growing out of this block.intgetWeightOnPathBlocked(IBlockAccess blockAccess, int i, int j, int k) floatgroundCoverRestingOnVisualOffset(IBlockAccess blockAccess, int i, int j, int k) voidharvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6) Called when the player destroys a block with an item that can harvest it.booleanhasCenterHardPointToFacing(IBlockAccess blockAccess, int i, int j, int k, int iFacing) booleanhasCenterHardPointToFacing(IBlockAccess blockAccess, int i, int j, int k, int iFacing, boolean bIgnoreTransparency) medium sized attachment points like the top of fence posts (approx 1/4 block width)booleanIf this returns true, then comparators facing away from this block will use the value from getComparatorInputOverride instead of the actual redstone signal strength.booleanhasComparatorInputOverride(World world, int x, int y, int z, int direction) booleanhasContactPointToFullFace(IBlockAccess blockAccess, int i, int j, int k, int iFacing) booleanhasContactPointToSlabSideFace(IBlockAccess blockAccess, int i, int j, int k, int iFacing, boolean bIsSlabUpsideDown) booleanhasContactPointToStairNarrowVerticalFace(IBlockAccess blockAccess, int i, int j, int k, int iFacing, int iStairFacing) This method refers to the half-block shaped top or bottom of stair blocks.booleanhasContactPointToStairShapedFace(IBlockAccess blockAccess, int i, int j, int k, int iFacing) This method refers to the 'L' shaped sides of stair blocks.booleanhasFallingBlockRestingOn(IBlockAccess blockAccess, int i, int j, int k) booleanhasLargeCenterHardPointToFacing(IBlockAccess blockAccess, int i, int j, int k, int iFacing) booleanhasLargeCenterHardPointToFacing(IBlockAccess blockAccess, int i, int j, int k, int iFacing, boolean bIgnoreTransparency) large attachment points that can support a full block widthbooleanhasMortar(IBlockAccess blockAccess, int i, int j, int k) booleanhasNeighborWithMortarInContact(World world, int i, int j, int k) booleanhasSmallCenterHardPointToFacing(IBlockAccess blockAccess, int i, int j, int k, int iFacing) booleanhasSmallCenterHardPointToFacing(IBlockAccess blockAccess, int i, int j, int k, int iFacing, boolean bIgnoreTransparency) small attachment surfaces, like those required for the bottom of a torch (approx 1/8 block width)booleanhasStickySnowNeighborInContact(World world, int i, int j, int k) booleanbooleanbooleanhasWaterToSidesOrTop(World world, int i, int j, int k) Removes this block from the EMI sidebar.hideFromEMI(int metadata) intReturns the ID of the items to drop on destruction.intonly called by clickMiddleMouseButton , and passed to inventory.setCurrentItem (along with isCreative) // +++START EDIT+++ FCNOTE: Client only // ---END EDIT---voidinfestBlock(World world, EntityLiving entity, int x, int y, int z, int metadata) Basically set block but uses entity and metadata to pick blockIDprotected voidinitBlockBounds(double dMinX, double dMinY, double dMinZ, double dMaxX, double dMaxY, double dMaxZ) Should only ever be called once for a block.protected voidinitBlockBounds(AxisAlignedBB bounds) protected voidThis method is called on a block after all other blocks gets already created.static booleanbooleanbooleanisAssociatedBlockID(int par1) Returns true if the given block ID is equivalent to this one.static booleanisAssociatedBlockID(int par0, int par1) Static version of isAssociatedBlockID.booleanisBenchOrTable(int metadata) booleanisBlockAttachedToFacing(IBlockAccess blockAccess, int i, int j, int k, int iFacing) returns true if block is attached to a block in a particular direction.booleanisBlockClimbable(World world, int i, int j, int k) booleanisBlockDestroyedByBlockDispenser(int iMetadata) Whether a block is destroyed by the dispenser, even if no item is collectedbooleanisBlockHydratedForPlantGrowthOn(World world, int i, int j, int k) booleanisBlockInfestable(EntityLiving entity, int metadata) booleanisBlockInfestedBy(EntityLiving entity) If this block is infested by linked entity, used by silverfishbooleanisBlockRestingOnThatBelow(IBlockAccess blockAccess, int i, int j, int k) returns true if the block is sitting on the one below, like a torch resting on the groundbooleanisBlockSolid(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) Returns Returns true if the given side of this block type should be rendered (if it's solid or not), if the adjacent block is at the given coordinates.booleanisBreakableBarricade(World world, int i, int j, int k, boolean advancedBreaker) booleanisBreakableBarricadeOpen(IBlockAccess blockAccess, int i, int j, int k) booleanReturns if this block is collidable (only used by Fire).booleanisConsideredNeighbouringWaterForReedGrowthOn(World world, int i, int j, int k) booleanbooleanisFence(int metadata) booleanReturns true only if block is flowerPotbooleanbooleanbooleanisLeafBlock(IBlockAccess blockAccess, int x, int y, int z) booleanisLog(IBlockAccess blockAccess, int x, int y, int z) booleanisNaturalStone(IBlockAccess blockAccess, int i, int j, int k) Determines whether other stone will "connect" to this block for purposes of determing whether a stone block can be individually harvested without breaking apartstatic booleanisNormalCube(int par0) booleanisNormalCube(IBlockAccess blockAccess, int i, int j, int k) boolean// +++START EDIT+++ // ---END EDIT--- Is 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.booleanisRedstoneConductor(IBlockAccess blockAccess, int x, int y, int z) Indicate if a block should conduct redstone powerbooleanisReplaceableVegetation(World world, int i, int j, int k) booleanisSnowCoveringTopSurface(IBlockAccess blockAccess, int i, int j, int k) Used by blocks like grass and mycellium to determine if they should use a snow side texture.booleanUsed to determine if this is a stair block for purposes of connecting visually to othersbooleanisStickyToSnow(IBlockAccess blockAccess, int i, int j, int k) booleanisWall(int metadata) floatmobSpawnOnVerticalOffset(World world, int i, int j, int k) mouseOverRayTrace(World world, int i, int j, int k, Vec3 startRay, Vec3 endRay) voidnotifyNearbyAnimalsFinishedFalling(World world, int i, int j, int k) protected voidnotifyNeighborDirtDugWithImproperTool(World world, int i, int j, int k, int iToFacing) voidnotifyNeighborsBlockDisrupted(World world, int i, int j, int k) Used when pigs dig up dirt to let any attached neighbors know that they should break loosevoidnotifyOfFullStagePlantGrowthOn(World world, int i, int j, int k, Block plantBlock) Called when a plant hits a full growth stage, like wheat fully grown, or each full block of Hemp.voidnotifyOfPlantAboveRemoved(World world, int i, int j, int k, Block plantBlock) Called server only.voidonArrowCollide(World world, int i, int j, int k, EntityArrow arrow) voidonArrowImpact(World world, int i, int j, int k, EntityArrow arrow) 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.voidonBlockClicked(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer) Called when the block is clicked by a player.voidonBlockDestroyedByExplosion(World par1World, int par2, int par3, int par4, Explosion par5Explosion) // +++START EDIT+++ Called upon the block being destroyed by an explosion // ---END EDIT---voidonBlockDestroyedByMiningCharge(World world, int x, int y, int z) voidonBlockDestroyedByPlayer(World par1World, int par2, int par3, int par4, int par5) Called right before the block is destroyed by a player.voidonBlockDestroyedLandingFromFall(World world, int i, int j, int k, int iMetadata) Called on server onlyvoidonBlockDestroyedWithImproperTool(World world, EntityPlayer player, int i, int j, int k, int iMetadata) Called on server only, after the block is removed from the worldbooleanonBlockEventReceived(World par1World, int par2, int par3, int par4, int par5, int par6) Called when the block receives a BlockEvent - see World.addBlockEvent.voidonBlockHarvested(World par1World, int par2, int par3, int par4, int par5, EntityPlayer par6EntityPlayer) Called when the block is attempted to be harvestedintonBlockPlaced(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9) 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. // +++START EDIT+++ FCNOTE: Called AFTER the block is placed, unlike onBlockPlaced() // ---END EDIT---voidonBlockPreDestroy(World par1World, int par2, int par3, int par4, int par5) Called on server worlds only when the block is about to be replaced by a different block or the same block with a different metadata value.booleanonBlockSawed(World world, int i, int j, int k) booleanonBlockSawed(World world, int i, int j, int k, int iSawPosI, int iSawPosJ, int iSawPosK) voidonBrokenByPistonPush(World world, int i, int j, int k, int iMetadata) voidonCookedByKiLn(World world, int i, int j, int k) voidonCraftedOnTurntable(World world, int x, int y, int z) booleanonCreativeBonemealApplied(World world, int x, int y, int z) Called when bonemeal is applied in creative mode.voidonCrushedByFallingEntity(World world, int i, int j, int k, EntityFallingSand entity) voidonDestroyedByFire(World world, int i, int j, int k, int iFireAge, boolean bForcedFireSpread) protected voidonDirtDugWithImproperTool(World world, int i, int j, int k) Notifies neighbors of dirt blocks that they should be loosenedprotected voidonDirtSlabDugWithImproperTool(World world, int i, int j, int k, boolean bUpsideDown) voidonEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) Triggered whenever an entity collides with this block (enters into the block).voidonEntityStepsIn(World world, int x, int y, int z, Entity entity) Called whenever an entity is walking through this block. only works for entities that canTriggerWalking.voidonEntityWalking(World par1World, int par2, int par3, int par4, Entity par5Entity) Called whenever an entity is walking on top of this block.voidonFallenUpon(World par1World, int par2, int par3, int par4, Entity par5Entity, float par6) Block's chance to react to an entity falling on it.voidonFallingUpdate(EntityFallingSand entity) booleanonFinishedFalling(EntityFallingSand entity, float fFallDistance) returns true if the block still existsvoidonFinishFalling(World world, int i, int j, int k, int iMetadata) This is actually called when a block lands safely.voidonFluidFlowIntoBlock(World world, int i, int j, int k, BlockFluid fluidBlock) voidonGrazed(World world, int i, int j, int k, EntityAnimal animal) voidonInfested(World world, EntityLiving entity, int x, int y, int z, int metadata) handles all things that happen on infestation, including what should happen to the infectorbooleanonMortarApplied(World world, int i, int j, int k) Should return true if mortar has been successfully applied to block.voidonNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5) Lets the block know when one of its neighbor changes.protected voidonNeighborDirtDugWithImproperTool(World world, int i, int j, int k, int iToFacing) voidonNeighborDisrupted(World world, int i, int j, int k, int iToFacing) voidonPlayerWalksOnBlock(World world, int i, int j, int k, EntityPlayer player) voidonPostBlockPlaced(World par1World, int par2, int par3, int par4, int par5) Called after a block is placedintonPreBlockPlacedByPiston(World world, int i, int j, int k, int iMetadata, int iDirectionMoved) Returns the metadata that will be placedvoidonRemovedByBlockDispenser(World world, int i, int j, int k) booleanonRotatedAroundBlockOnTurntableToFacing(World world, int i, int j, int k, int iFacing) Returns false if the block was destroyed and should not be rotatedprotected voidonRotatedOnTurntable(World world, int x, int y, int z) protected voidonStartFalling(EntityFallingSand entity) Only called on servervoidonStruckByLightning(World world, int i, int j, int k) Called on server onlyvoidonVegetationAboveGrazed(World world, int i, int j, int k, EntityAnimal animal) voidpostBlockDestroyedByExplosion(World par1World, int par2, int par3, int par4, Explosion par5Explosion) voidpostBlockDestroyedByMiningCharge(World world, int x, int y, int z) intpreBlockPlacedBy(World world, int i, int j, int k, int iMetadata, EntityLivingBase entityBy) Similar to onBlockPlacedBy() but called before the block is placed rather than afterintquantityDropped(Random par1Random) Returns the quantity of items to drop on block destruction.intquantityDroppedWithBonus(int par1, Random par2Random) Returns the usual quantity dropped by the block plus a bonus of 1 to 'i' (inclusive).voidrandomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) A randomly called display update to be able to add particles or other items for displayvoidrandomUpdateTick(World world, int i, int j, int k, Random rand) Called on server onlyvoidregisterIcons(IconRegister par1IconRegister) When this method is called, your block should register all the icons it needs with the given IconRegister.voidremoveWeeds(World world, int i, int j, int k) 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) voidrenderBlockAsItem(RenderBlocks renderBlocks, int iItemDamage, float fBrightness) voidrenderBlockMovedByPiston(RenderBlocks renderBlocks, int i, int j, int k) voidrenderBlockSecondPass(RenderBlocks renderBlocks, int i, int j, int k, boolean bFirstPassResult) If the block has a second pass, like a kiln cooking overlay texture, it should Override this method.booleanrenderBlockWithTexture(RenderBlocks renderBlocks, int i, int j, int k, Icon texture) voidrenderCookingByKiLnOverlay(RenderBlocks renderBlocks, int i, int j, int k, boolean bFirstPassResult) voidrenderCrossHatch(RenderBlocks renderer, int i, int j, int k, Icon icon, double dBorderWidth, double dVerticalOffset) voidrenderFallingBlock(RenderBlocks renderBlocks, int i, int j, int k, int iMetadata) Applies both to falling blocks, and those pushed by pistonsbooleanrotateAroundJAxis(World world, int i, int j, int k, boolean bReverse) Returns true if the facing has actually changed as a result of this callstatic introtateFacingAroundY(int iFacing, boolean bReverse) introtateMetadataAroundYAxis(int iMetadata, boolean bReverse) introtateOnTurntable(World world, int x, int y, int z, boolean reverse, int craftingCounter) Returns the new crafting counter after rotation.voidscheduleCheckForFall(World world, int i, int j, int k) setAxesEffectiveOn(boolean bEffective) protected final voidsetBlockBounds(float par1, float par2, float par3, float par4, float par5, float par6) Deprecated.voidsetBlockBoundsBasedOnState(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) FCNOTE: DEPRECATEDvoidSets the block's bounds for rendering it as an itemvoidsetBlockMaterial(Material material) protected BlockThis method will make the hardness of the block equals to -1, and the block is indestructible.setBuoyancy(float fBuoyancy) voidsetChickenItemFoodValue(int iFoodValue) setChiselsCanHarvest(boolean bCanHarvest) setChiselsEffectiveOn(boolean bEffective) setCreativeTab(CreativeTabs par1CreativeTabs) Sets the CreativeTab to display this block on.intsetFacing(int iMetadata, int iFacing) voidsetFireProperties(int iChanceToEncourageFire, int iAbilityToCatchFire) setFireProperties(Flammability flammability) voidsetFurnaceBurnTime(int iBurnTime) voidsetFurnaceBurnTime(FurnaceBurnTime burnTime) setHardness(float par1) Sets how many hits it takes to break a block.voidsetHerbivoreItemFoodValue(int iFoodValue) setHoesEffectiveOn(boolean bEffective) protected BlocksetLightOpacity(int par1) Sets how much light is blocked going through this block.setLightValue(float par1) Sets the amount of light emitted by a block from 0.0f to 1.0f (converts internally to 0-15).setMapColorsForMetadata(MapColor[] mapColors) Set the array of map colors to use per metadata for this block.voidMod ID (same as in fabric.mod.json) of mod that adds this item.booleansetOnFireDirectly(World world, int i, int j, int k) setPicksEffectiveOn(boolean bEffective) voidsetPigItemFoodValue(int iFoodValue) setResistance(float par1) Sets the the blocks resistance to explosions.setShovelsEffectiveOn(boolean bEffective) setStepSound(StepSound par1StepSound) Sets the footstep sound for the block.setTextureName(String par1Str) protected BlocksetTickRandomly(boolean par1) Sets whether this block type will receive random update tickssetUnlocalizedName(String par1Str) booleanshouldDeleteTileEntityOnBlockChange(int iNewBlockID) booleanshouldFenceConnectToThisBlockToFacing(IBlockAccess blockAccess, int x, int y, int z, int facing) booleanshouldOffsetPositionIfPathingOutOf(IBlockAccess blockAccess, int i, int j, int k, Entity entity, PathFinder pathFinder) Used to determine if entities who start their pathing from within this block should instead start pathing from a neighbor block instead, to prevent getting stuck in this one.booleanshouldPaneConnectToThisBlockToFacing(IBlockAccess blockAccess, int x, int y, int z, int facing) booleanshouldPlayStandardConvertSound(World world, int x, int y, int z) booleanshouldRenderNeighborFullFaceSide(IBlockAccess blockAccess, int i, int j, int k, int iNeighborSide) booleanshouldRenderNeighborHalfSlabSide(IBlockAccess blockAccess, int i, int j, int k, int iNeighborSlabSide, boolean bNeighborUpsideDown) booleanshouldRenderWhileFalling(World world, EntityFallingSand entity) booleanshouldSideBeRendered(IBlockAccess blockAccess, int iNeighborI, int iNeighborJ, int iNeighborK, int iSide) booleanshouldSideBeRenderedOnFallingBlock(int iSide, int iMetadata) booleanshouldWallConnectToThisBlockToFacing(IBlockAccess blockAccess, int x, int y, int z, int facing) booleanshouldWallFormPostBelowThisBlock(IBlockAccess blockAccess, int x, int y, int z) booleanspreadGrassToBlock(World world, int i, int j, int k) booleanspreadMyceliumToBlock(World world, int i, int j, int k) booleanstartlesAnimalsWhenPlaced(World world, int x, int y, int z) intHow many world ticks before tickingbooleantoggleFacing(World world, int i, int j, int k, boolean bReverse) Cycle through all the possible facings for a block returns true if the facing has actually changed as a result of this callbooleanWhether or not the block sets off Buddy Blocks.protected intturntableCraftingRotation(World world, int x, int y, int z, boolean reverse, int craftingCounter) voidupdateTick(World par1World, int par2, int par3, int par4, Random par5Random) Ticks the block if it's been scheduled // +++START EDIT+++ FCNOTE: Called on server only // ---END EDIT---voidvelocityToAddToEntity(World par1World, int par2, int par3, int par4, Entity par5Entity, Vec3 par6Vec3) Can add to the passed in vector for a movement vector to be applied to the entity.
-
Field Details
-
textureName
-
modIDSetter
-
modID
-
soundPowderFootstep
-
soundWoodFootstep
-
soundGravelFootstep
-
soundGrassFootstep
-
soundStoneFootstep
-
soundMetalFootstep
-
soundGlassFootstep
-
soundClothFootstep
-
soundSandFootstep
-
soundSnowFootstep
-
soundLadderFootstep
-
soundAnvilFootstep
-
blocksList
List of ly/ff (BlockType) containing the already registered blocks. -
opaqueCubeLookup
public static final boolean[] opaqueCubeLookupAn array of 4096 booleans corresponding to the result of the isOpaqueCube() method for each block ID -
lightOpacity
public static final int[] lightOpacityHow much light is subtracted for going through this block -
hasKilnRecipe
public static final boolean[] hasKilnRecipe -
canBlockGrass
public static final boolean[] canBlockGrassArray of booleans that tells if a block can grass FCNOTE: Misleading name. This is actually wether grass can grow under the block -
lightValue
public static final int[] lightValueAmount of light emitted -
useNeighborBrightness
public static boolean[] useNeighborBrightnessFlag if block ID should use the brightest neighbor light value as its own // +++START EDIT+++ FCNOTE: Misleading name in that this does not apply to the neighbor below the block, only to sides and top // ---END EDIT--- -
stone
-
grass
-
dirt
-
cobblestone
-
planks
-
sapling
-
bedrock
-
waterMoving
-
waterStill
-
lavaMoving
-
lavaStill
-
sand
-
gravel
-
oreGold
-
oreIron
-
oreCoal
-
wood
-
leaves
-
sponge
-
glass
-
oreLapis
-
blockLapis
-
dispenser
-
sandStone
-
music
-
bed
-
railPowered
-
railDetector
-
pistonStickyBase
-
web
-
tallGrass
-
deadBush
-
pistonBase
-
pistonExtension
-
cloth
-
pistonMoving
-
plantYellow
-
plantRed
-
mushroomBrown
-
mushroomRed
-
blockGold
-
blockIron
-
stoneDoubleSlab
-
stoneSingleSlab
-
brick
-
tnt
-
bookShelf
-
cobblestoneMossy
-
obsidian
-
torchWood
-
fire
-
mobSpawner
-
stairsWoodOak
-
chest
-
redstoneWire
-
oreDiamond
-
blockDiamond
-
workbench
-
crops
-
tilledField
-
furnaceIdle
-
furnaceBurning
-
signPost
-
doorWood
-
ladder
-
rail
-
stairsCobblestone
-
signWall
-
lever
-
pressurePlateStone
-
doorIron
-
pressurePlatePlanks
-
oreRedstone
-
oreRedstoneGlowing
-
torchRedstoneIdle
-
torchRedstoneActive
-
stoneButton
-
snow
-
ice
-
blockSnow
-
cactus
-
blockClay
-
reed
-
jukebox
-
fence
-
pumpkin
-
netherrack
-
slowSand
-
glowStone
-
portal
-
pumpkinLantern
-
cake
-
redstoneRepeaterIdle
-
redstoneRepeaterActive
-
lockedChest
April fools secret locked chest, only spawns on new chunks on 1st April. -
trapdoor
-
silverfish
-
stoneBrick
-
mushroomCapBrown
-
mushroomCapRed
-
fenceIron
-
thinGlass
-
melon
-
pumpkinStem
-
melonStem
-
vine
-
fenceGate
-
stairsBrick
-
stairsStoneBrick
-
mycelium
-
waterlily
-
netherBrick
-
netherFence
-
stairsNetherBrick
-
netherStalk
-
enchantmentTable
-
brewingStand
-
cauldron
-
endPortal
-
endPortalFrame
-
whiteStone
-
dragonEgg
-
redstoneLampIdle
-
redstoneLampActive
-
woodDoubleSlab
-
woodSingleSlab
-
cocoaPlant
-
stairsSandStone
-
oreEmerald
-
enderChest
-
tripWireSource
-
tripWire
-
blockEmerald
-
stairsWoodSpruce
-
stairsWoodBirch
-
stairsWoodJungle
-
commandBlock
-
beacon
-
cobblestoneWall
-
flowerPot
-
carrot
-
potato
-
woodenButton
-
skull
-
anvil
-
chestTrapped
-
pressurePlateGold
-
pressurePlateIron
-
redstoneComparatorIdle
-
redstoneComparatorActive
-
daylightSensor
-
blockRedstone
-
oreNetherQuartz
-
hopperBlock
-
blockNetherQuartz
-
stairsNetherQuartz
-
railActivator
-
dropper
-
stainedClay
-
hay
-
carpet
-
hardenedClay
-
coalBlock
-
blockID
public final int blockIDID of the block. -
blockHardness
public float blockHardnessIndicates how many hits it takes to break a block. -
blockResistance
public float blockResistanceIndicates the blocks resistance to explosions. -
blockConstructorCalled
protected boolean blockConstructorCalledset to true when Block's constructor is called through the chain of super()'s. Note: Never used -
enableStats
protected boolean enableStatsIf this field is true, the block is counted for statistics (mined or placed) -
needsRandomTick
protected boolean needsRandomTickFlags whether or not this block is of a type that needs random ticking. Ref-counted by ExtendedBlockStorage in order to broadly cull a chunk from the random chunk update list for efficiency's sake. -
isBlockContainer
protected boolean isBlockContainertrue if the Block contains a Tile Entity -
minX
protected double minXFCNOTE: DEPRECATED -
minY
protected double minYFCNOTE: DEPRECATED -
minZ
protected double minZFCNOTE: DEPRECATED -
maxX
protected double maxXFCNOTE: DEPRECATED -
maxY
protected double maxYFCNOTE: DEPRECATED -
maxZ
protected double maxZFCNOTE: DEPRECATED -
stepSound
Sound of stepping on the block -
blockParticleGravity
public float blockParticleGravity -
blockMaterial
Block material definition. -
slipperiness
public float slipperinessDetermines how much velocity is maintained while moving on top of this block -
blockIcon
-
blockReplaced
public static final boolean[] blockReplaced -
blockReplacedBy
-
currentBlockRenderer
Mainly used by shouldSideBeRendered() so that it can access the current render bounds. NOTE: Does not apply to item rendering unless specifically set within RenderBlockAsItem()
-
-
Constructor Details
-
Block
-
-
Method Details
-
initializeBlock
protected void initializeBlock()This method is called on a block after all other blocks gets already created. You can use it to reference and configure something on the block that needs the others ones. -
setStepSound
Sets the footstep sound for the block. Returns the object for convenience in constructing. -
setLightOpacity
Sets how much light is blocked going through this block. Returns the object for convenience in constructing. -
setLightValue
Sets the amount of light emitted by a block from 0.0f to 1.0f (converts internally to 0-15). Returns the object for convenience in constructing. -
setResistance
Sets the the blocks resistance to explosions. Returns the object for convenience in constructing. -
isNormalCube
public static boolean isNormalCube(int par0) -
renderAsNormalBlock
public boolean renderAsNormalBlock()If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc) -
getBlocksMovement
FCNOTE: This is misnamed and returns true if the block *doesn't* block movement -
getRenderType
public int getRenderType()The type of render function that is called for this block -
setHardness
Sets how many hits it takes to break a block. -
setBlockUnbreakable
This method will make the hardness of the block equals to -1, and the block is indestructible. -
getBlockHardness
Returns the block hardness at a location. Args: world, x, y, z -
hideFromEMI
Removes this block from the EMI sidebar. Does not remove from recipes. -
hideFromEMI
-
setTickRandomly
Sets whether this block type will receive random update ticks -
getTickRandomly
public boolean getTickRandomly()Returns whether or not this block is of a type that needs random ticking. Called for ref-counting purposes by ExtendedBlockStorage in order to broadly cull a chunk from the random chunk update list for efficiency's sake. -
hasTileEntity
public boolean hasTileEntity() -
setBlockBounds
@Deprecated protected final void setBlockBounds(float par1, float par2, float par3, float par4, float par5, float par6) Deprecated. -
getBlockBrightness
How bright to render this block based on the light its receiving. Args: iBlockAccess, x, y, z -
getMixedBrightnessForBlock
Goes straight to getLightBrightnessForSkyBlocks for Blocks, does some fancy computing for Fluids -
isBlockSolid
Returns Returns true if the given side of this block type should be rendered (if it's solid or not), if the adjacent block is at the given coordinates. Args: blockAccess, x, y, z, side -
getBlockTexture
Retrieves the block texture to use based on the display side. Args: iBlockAccess, x, y, z, side -
getIcon
From the specified side and block metadata retrieves the blocks texture. Args: side, metadata -
getBlockTextureFromSide
Returns the block texture based on the side being looked at. Args: side -
addCollisionBoxesToList
public void addCollisionBoxesToList(World par1World, int par2, int par3, int par4, AxisAlignedBB par5AxisAlignedBB, List par6List, Entity par7Entity) Adds all intersecting collision boxes to a list. (Be sure to only add boxes to the list if they intersect the mask.) Parameters: World, X, Y, Z, mask, list, colliding entity // +++START EDIT+++ FCNOTE: The "mask" referred to above is just the bounding box to check for intersection with // ---END EDIT--- -
isOpaqueCube
public boolean isOpaqueCube()// +++START EDIT+++ // ---END EDIT--- 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. -
canCollideCheck
public boolean canCollideCheck(int par1, boolean par2) Returns whether this block is collideable based on the arguments passed in \n@param par1 block metaData \n@param par2 whether the player right-clicked while holding a boat -
isCollidable
public boolean isCollidable()Returns if this block is collidable (only used by Fire). Args: x, y, z -
updateTick
Ticks the block if it's been scheduled // +++START EDIT+++ FCNOTE: Called on server only // ---END EDIT--- -
randomDisplayTick
A randomly called display update to be able to add particles or other items for display -
onBlockDestroyedByPlayer
Called right before the block is destroyed by a player. Args: world, x, y, z, metaData // +++START EDIT+++ FCNOTE: Called AFTER block is set to air, not before // ---END EDIT--- -
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 // +++START EDIT+++ FCNOTE: Only called on server // ---END EDIT--- -
tickRate
How many world ticks before ticking -
onBlockAdded
Called whenever the block is added into the world. Args: world, x, y, z // +++START EDIT+++ FCNOTE: Called on server only // ---END EDIT--- -
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 ??ejects contained items into the world, and notifies neighbours of an update, as appropriate?? // +++START EDIT+++ FCNOTE: Called on server only. Called AFTER block is set, so it is no longer valid at pos. // ---END EDIT--- -
quantityDropped
Returns the quantity of items to drop on block destruction. -
idDropped
Returns the ID of the items to drop on destruction. -
dropBlockAsItem
public final void dropBlockAsItem(World par1World, int par2, int par3, int par4, int par5, int par6) // +++START EDIT+++ // ---END EDIT--- Drops the specified block items -
dropBlockAsItemWithChance
public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7) Drops the block items with a specified chance of dropping the specified items -
dropBlockAsItem_do
protected void dropBlockAsItem_do(World par1World, int par2, int par3, int par4, ItemStack par5ItemStack) Spawns EntityItem in the world for the given ItemStack if the world is not remote. -
dropXpOnBlockBreak
called by spawner, ore, redstoneOre blocks -
damageDropped
public int damageDropped(int par1) Determines the damage on the item the block drops. Used in cloth and wood. -
getExplosionResistance
Returns how much this block can resist explosions from the passed in entity. -
onBlockDestroyedByExplosion
public void onBlockDestroyedByExplosion(World par1World, int par2, int par3, int par4, Explosion par5Explosion) // +++START EDIT+++ Called upon the block being destroyed by an explosion // ---END EDIT--- -
postBlockDestroyedByExplosion
-
onBlockDestroyedByMiningCharge
-
postBlockDestroyedByMiningCharge
-
canWitherDestroyBlock
public boolean canWitherDestroyBlock() -
getRenderBlockPass
public int getRenderBlockPass()// +++START EDIT+++ // ---END EDIT--- Returns which pass should this block be rendered on. 0 for solids and 1 for alpha -
canPlaceBlockOnSide
-
canPlaceBlockOnSide
checks to see if you can place this block can be placed on that side of a block: BlockLever overrides -
canPlaceBlockAt
Checks to see if its valid to put this block at the specified coordinates. Args: world, x, y, z -
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.) -
onEntityWalking
Called whenever an entity is walking on top of this block. Args: world, x, y, z, entity -
onEntityStepsIn
Called whenever an entity is walking through this block. only works for entities that canTriggerWalking. -
onBlockPlaced
public int onBlockPlaced(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9) Called when a block is placed using its ItemBlock. Args: World, X, Y, Z, side, hitX, hitY, hitZ, block metadata -
onBlockClicked
public void onBlockClicked(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer) Called when the block is clicked by a player. Args: x, y, z, entityPlayer -
velocityToAddToEntity
public void velocityToAddToEntity(World par1World, int par2, int par3, int par4, Entity par5Entity, Vec3 par6Vec3) Can add to the passed in vector for a movement vector to be applied to the entity. Args: x, y, z, entity, vec3d -
setBlockBoundsBasedOnState
FCNOTE: DEPRECATED -
getBlockBoundsMinX
public final double getBlockBoundsMinX()returns the block bounderies minX value -
getBlockBoundsMaxX
public final double getBlockBoundsMaxX()returns the block bounderies maxX value -
getBlockBoundsMinY
public final double getBlockBoundsMinY()returns the block bounderies minY value -
getBlockBoundsMaxY
public final double getBlockBoundsMaxY()returns the block bounderies maxY value -
getBlockBoundsMinZ
public final double getBlockBoundsMinZ()returns the block bounderies minZ value -
getBlockBoundsMaxZ
public final double getBlockBoundsMaxZ()returns the block bounderies maxZ value -
getBlockColor
public int getBlockColor() -
getRenderColor
public int getRenderColor(int par1) Returns the color this block should be rendered. Used by leaves. -
colorMultiplier
Returns a integer with hex for 0xrrggbb with this color multiplied against the blocks color. Note only called when first determining what to render. -
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. -
canProvidePower
public boolean canProvidePower()Can this block provide power. Only wire currently seems to have this change based on its state. -
onEntityCollidedWithBlock
public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) Triggered whenever an entity collides with this block (enters into the block). Args: world, x, y, z, entity -
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. -
isRedstoneConductor
Indicate if a block should conduct redstone power -
canRedstoneConnectToSide
public boolean canRedstoneConnectToSide(IBlockAccess blockAccess, int x, int y, int z, int flatDirection) Should redstone dust redirect itself to this side of the block -
setBlockBoundsForItemRender
public void setBlockBoundsForItemRender()Sets the block's bounds for rendering it as an item -
harvestBlock
public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6) Called when the player destroys a block with an item that can harvest it. (i, j, k) are the coordinates of the block and l is the block's subtype/damage. // +++START EDIT+++ FCNOTE: Only called on server // ---END EDIT--- -
canSilkHarvest
protected boolean canSilkHarvest()Return true if a player with Silk Touch can harvest this block directly, and not its normal drops. -
createStackedBlock
Returns an item stack containing a single instance of the current block type. 'i' is the block's subtype/damage and is ignored for blocks which do not support subtypes. Blocks which cannot be harvested should return null. // +++START EDIT+++ FCNOTE: This is the function used to create the silk-touch drop // ---END EDIT--- -
quantityDroppedWithBonus
Returns the usual quantity dropped by the block plus a bonus of 1 to 'i' (inclusive). -
getUnlocalizedName2
Returns the unlocalized name without the tile. prefix. Caution: client-only. -
onBlockEventReceived
public boolean onBlockEventReceived(World par1World, int par2, int par3, int par4, int par5, int par6) Called when the block receives a BlockEvent - see World.addBlockEvent. By default, passes it on to the tile entity at this location. Args: world, x, y, z, blockID, EventID, event parameter -
getEnableStats
public boolean getEnableStats()Return the state of blocks statistics flags - if the block is counted for mined and placed. -
disableStats
Disable statistics for the block, the block will no count for mined or placed. -
getMobilityFlag
public int getMobilityFlag()Returns the mobility information of the block, 0 = free, 1 = can't push but can move over, 2 = total immobility and stop pistons // +++START EDIT+++ FCMOD: 3 = can be piston shoveled, but free otherwise // ---END EDIT--- -
getAmbientOcclusionLightValue
public float getAmbientOcclusionLightValue(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) Returns the default ambient occlusion value based on block opacity -
onFallenUpon
public void onFallenUpon(World par1World, int par2, int par3, int par4, Entity par5Entity, float par6) Block's chance to react to an entity falling on it. -
idPicked
only called by clickMiddleMouseButton , and passed to inventory.setCurrentItem (along with isCreative) // +++START EDIT+++ FCNOTE: Client only // ---END EDIT--- -
getDamageValue
Get the block's damage value (for use with pick block). -
getSubBlocks
returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks) -
getCreativeTabToDisplayOn
Returns the CreativeTab to display the given block on. -
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. // +++START EDIT+++ FCNOTE: Called AFTER the block is placed, unlike onBlockPlaced() // ---END EDIT--- -
canBlockStay
Can this block stay at this position. Similar to canPlaceBlockAt except gets checked often with plants. -
onPostBlockPlaced
Called after a block is placed -
setUnlocalizedName
-
getLocalizedName
Gets the localized name of this block. Used for the statistics page. -
getUnlocalizedName
Returns the unlocalized name of this block. -
setCreativeTab
Sets the CreativeTab to display this block on. -
getModId
Mod ID (same as in fabric.mod.json) of mod that adds this item. -
setModID
Mod ID (same as in fabric.mod.json) of mod that adds this item. -
onBlockHarvested
public void onBlockHarvested(World par1World, int par2, int par3, int par4, int par5, EntityPlayer par6EntityPlayer) Called when the block is attempted to be harvested -
fillWithRain
currently only used by BlockCauldron to incrament meta-data during rain -
isFlowerPot
public boolean isFlowerPot()Returns true only if block is flowerPot -
func_82506_l
public boolean func_82506_l() -
canDropFromExplosion
Return whether this block can drop from an explosion. -
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. -
isAssociatedBlockID
public static boolean isAssociatedBlockID(int par0, int par1) Static version of isAssociatedBlockID. -
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. -
hasComparatorInputOverride
-
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. -
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. -
getItemIconName
Gets the icon name of the ItemBlock corresponding to this block. Used by hoppers. -
isNormalCube
-
canBlockSuffocateEntity
-
preBlockPlacedBy
public int preBlockPlacedBy(World world, int i, int j, int k, int iMetadata, EntityLivingBase entityBy) Similar to onBlockPlacedBy() but called before the block is placed rather than after -
setBlockMaterial
-
randomUpdateTick
Called on server only -
clientNotificationOfMetadataChange
public void clientNotificationOfMetadataChange(World world, int i, int j, int k, int iOldMetadata, int iNewMetadata) -
onArrowImpact
-
onArrowCollide
-
getMovementModifier
-
onPlayerWalksOnBlock
-
doesBlockHopperEject
Applies to Hopper ejecting items into the world, not inserting into the block itself -
doesBlockHopperInsert
Applies to Hopper inserting items directly into the block's inventory. This does not ensure the block has a valid inventory, it's just a first-pass chance to block such behavior. -
getIsBlockWarm
Returns true if the block is warm enough to melt nearby snow or ice -
getStepSoundInternal
-
getStepSound
-
getStepSound
-
getStepSoundName
-
getBreakSoundName
-
getPlaceSoundName
-
getStepSoundName
-
getBreakSoundName
-
getPlaceSoundName
-
clientBreakBlock
-
clientBlockAdded
-
hasStrata
public boolean hasStrata() -
getMetadataConversionForStrataLevel
public int getMetadataConversionForStrataLevel(int iLevel, int iMetadata) -
getExplosionResistance
-
canBlockStayDuringGenerate
-
isStairBlock
public boolean isStairBlock()Used to determine if this is a stair block for purposes of connecting visually to others -
onBlockPreDestroy
Called on server worlds only when the block is about to be replaced by a different block or the same block with a different metadata value. Args: world, x, y, z, old metadata -
shouldDeleteTileEntityOnBlockChange
public boolean shouldDeleteTileEntityOnBlockChange(int iNewBlockID) -
isNaturalStone
Determines whether other stone will "connect" to this block for purposes of determing whether a stone block can be individually harvested without breaking apart -
getFullBlockBoundingBoxFromPool
-
canSpitWebReplaceBlock
-
isAirBlock
public boolean isAirBlock() -
isReplaceableVegetation
-
hasWaterToSidesOrTop
-
getPreventsFluidFlow
-
onFluidFlowIntoBlock
-
isBlockClimbable
-
triggersBuddy
public boolean triggersBuddy()Whether or not the block sets off Buddy Blocks. Set to false for stuff like redstone blocks that can cause feedback loops. -
canSilkHarvest
protected boolean canSilkHarvest(int iMetadata) -
onBlockDestroyedWithImproperTool
public void onBlockDestroyedWithImproperTool(World world, EntityPlayer player, int i, int j, int k, int iMetadata) Called on server only, after the block is removed from the world -
dropItemsIndividually
protected void dropItemsIndividually(World world, int i, int j, int k, int iIDDropped, int iPileCount, int iDamageDropped, float fChanceOfPileDrop) -
dropComponentItemsOnBadBreak
public boolean dropComponentItemsOnBadBreak(World world, int i, int j, int k, int iMetadata, float fChanceOfDrop) Called by explosions and improper tool use. Should return true if the block processes its own drops through this method, false otherwise Note that the block may no longer be at the specified position when this is called -
dropItemsOnDestroyedByExplosion
Explosion may be null if this is called by a mining charge -
dropItemsOnDestroyedByMiningCharge
-
onDirtDugWithImproperTool
Notifies neighbors of dirt blocks that they should be loosened -
onDirtSlabDugWithImproperTool
-
notifyNeighborDirtDugWithImproperTool
protected void notifyNeighborDirtDugWithImproperTool(World world, int i, int j, int k, int iToFacing) -
onNeighborDirtDugWithImproperTool
-
canBlocksBePlacedAgainstThisBlock
-
hasSmallCenterHardPointToFacing
public boolean hasSmallCenterHardPointToFacing(IBlockAccess blockAccess, int i, int j, int k, int iFacing, boolean bIgnoreTransparency) small attachment surfaces, like those required for the bottom of a torch (approx 1/8 block width) -
hasSmallCenterHardPointToFacing
public boolean hasSmallCenterHardPointToFacing(IBlockAccess blockAccess, int i, int j, int k, int iFacing) -
hasCenterHardPointToFacing
public boolean hasCenterHardPointToFacing(IBlockAccess blockAccess, int i, int j, int k, int iFacing, boolean bIgnoreTransparency) medium sized attachment points like the top of fence posts (approx 1/4 block width) -
hasCenterHardPointToFacing
public boolean hasCenterHardPointToFacing(IBlockAccess blockAccess, int i, int j, int k, int iFacing) -
hasLargeCenterHardPointToFacing
public boolean hasLargeCenterHardPointToFacing(IBlockAccess blockAccess, int i, int j, int k, int iFacing, boolean bIgnoreTransparency) large attachment points that can support a full block width -
hasLargeCenterHardPointToFacing
public boolean hasLargeCenterHardPointToFacing(IBlockAccess blockAccess, int i, int j, int k, int iFacing) -
isBlockRestingOnThatBelow
returns true if the block is sitting on the one below, like a torch resting on the ground -
isBlockAttachedToFacing
returns true if block is attached to a block in a particular direction. Example: pumpkins attached to stems -
attachToFacing
-
hasContactPointToFullFace
public boolean hasContactPointToFullFace(IBlockAccess blockAccess, int i, int j, int k, int iFacing) -
hasContactPointToSlabSideFace
public boolean hasContactPointToSlabSideFace(IBlockAccess blockAccess, int i, int j, int k, int iFacing, boolean bIsSlabUpsideDown) -
hasContactPointToStairShapedFace
public boolean hasContactPointToStairShapedFace(IBlockAccess blockAccess, int i, int j, int k, int iFacing) This method refers to the 'L' shaped sides of stair blocks. Other stair facings will refernce either the full face, stair top, or slab methods, depending on their shape -
hasContactPointToStairNarrowVerticalFace
public boolean hasContactPointToStairNarrowVerticalFace(IBlockAccess blockAccess, int i, int j, int k, int iFacing, int iStairFacing) This method refers to the half-block shaped top or bottom of stair blocks. -
onMortarApplied
Should return true if mortar has been successfully applied to block. -
hasMortar
-
hasNeighborWithMortarInContact
-
isStickyToSnow
-
hasStickySnowNeighborInContact
-
getFurnaceBurnTime
public int getFurnaceBurnTime(int iItemDamage) -
setFurnaceBurnTime
public void setFurnaceBurnTime(int iBurnTime) -
setFurnaceBurnTime
-
doesInfiniteBurnToFacing
-
doesExtinguishFireAbove
-
onDestroyedByFire
public void onDestroyedByFire(World world, int i, int j, int k, int iFireAge, boolean bForcedFireSpread) -
setFireProperties
-
setFireProperties
-
getCanBeSetOnFireDirectly
Whether the block itself can be set on fire, rather than a neighboring block being set to a fire block -
getCanBeSetOnFireDirectlyByItem
-
setOnFireDirectly
-
getChanceOfFireSpreadingDirectlyTo
-
getCanBlockLightItemOnFire
-
getDoesFireDamageToEntities
-
getDoesFireDamageToEntities
-
getCanBlockBeIncinerated
Used by Hibachi to determine if it can remove the block above it when lit -
getCanBlockBeReplacedByFire
Whether a fire block can be directly placed over this one, without first burning or catching fire, as if it were air. -
isIncineratedInCrucible
public boolean isIncineratedInCrucible() -
canPathThroughBlock
public boolean canPathThroughBlock(IBlockAccess blockAccess, int i, int j, int k, Entity entity, PathFinder pathFinder) -
shouldOffsetPositionIfPathingOutOf
public boolean shouldOffsetPositionIfPathingOutOf(IBlockAccess blockAccess, int i, int j, int k, Entity entity, PathFinder pathFinder) Used to determine if entities who start their pathing from within this block should instead start pathing from a neighbor block instead, to prevent getting stuck in this one. Mostly applies to stuff like chickens getting stuck in fences. -
getWeightOnPathBlocked
-
adjustPathWeightOnNotBlocked
public int adjustPathWeightOnNotBlocked(int iPreviousWeight) -
isBreakableBarricade
-
isBreakableBarricadeOpen
-
getCanBeCookedByKiLn
-
getCookTimeMultiplierInKiLn
-
getOutputsWhenCookedByKiln
-
onCookedByKiLn
-
doesBlockBreakSaw
-
onBlockSawed
public boolean onBlockSawed(World world, int i, int j, int k, int iSawPosI, int iSawPosJ, int iSawPosK) -
onBlockSawed
-
doesBlockDropAsItemOnSaw
-
getBlockIDOnInfest
-
onInfested
handles all things that happen on infestation, including what should happen to the infector -
infestBlock
Basically set block but uses entity and metadata to pick blockID -
isBlockInfestedBy
If this block is infested by linked entity, used by silverfish -
isBlockInfestable
- Parameters:
entity- for having hook for other infesting mobsmetadata- for having single blockID be infestable depending on metadata- Returns:
-
getMechanicalPowerLevelProvidedToAxleAtFacing
public int getMechanicalPowerLevelProvidedToAxleAtFacing(World world, int i, int j, int k, int iFacing) -
areShovelsEffectiveOn
public boolean areShovelsEffectiveOn() -
arePicksEffectiveOn
public boolean arePicksEffectiveOn() -
areAxesEffectiveOn
public boolean areAxesEffectiveOn() -
areHoesEffectiveOn
public boolean areHoesEffectiveOn() -
arechiselseffectiveon
public boolean arechiselseffectiveon() -
arechiselseffectiveon
-
canChiselsHarvest
public boolean canChiselsHarvest() -
setShovelsEffectiveOn
-
setShovelsEffectiveOn
-
setPicksEffectiveOn
-
setPicksEffectiveOn
-
setAxesEffectiveOn
-
setAxesEffectiveOn
-
setHoesEffectiveOn
-
setHoesEffectiveOn
-
setChiselsEffectiveOn
-
setChiselsEffectiveOn
-
setChiselsCanHarvest
-
setChiselsCanHarvest
-
getPlayerRelativeBlockHardness
-
canConvertBlock
-
convertBlock
Returns false if the block has not been replaced with another, and should be removed -
shouldPlayStandardConvertSound
-
getEfficientToolLevel
-
getHarvestToolLevel
-
getIsProblemToRemove
public boolean getIsProblemToRemove(ItemStack toolStack, IBlockAccess blockAccess, int i, int j, int k) The following is for stumps and such, which are a pain to remove regardless of whether their overall block has relevant tool effeciencies -
getDoesStumpRemoverWorkOnBlock
-
canToolsStickInBlock
-
canToolStickInBlockSpecialCase
-
setBuoyancy
-
setBuoyant
-
setNonBuoyant
-
setNeutralBuoyant
-
getBuoyancy
public float getBuoyancy(int iMetadata) -
canGroundCoverRestOnBlock
-
groundCoverRestingOnVisualOffset
-
isGroundCover
public boolean isGroundCover() -
getCanGrassSpreadToBlock
-
spreadGrassToBlock
-
getCanGrassGrowUnderBlock
public boolean getCanGrassGrowUnderBlock(World world, int i, int j, int k, boolean bGrassOnHalfSlab) -
getCanMyceliumSpreadToBlock
-
spreadMyceliumToBlock
-
getCanBlightSpreadToBlock
-
isSnowCoveringTopSurface
Used by blocks like grass and mycellium to determine if they should use a snow side texture. Note that this refers to the top visible surface, not just the top facing, which means that stuff like half-slabs should only return true if they have ground cover actually on the top surface halfway up the block vertically. -
onPreBlockPlacedByPiston
public int onPreBlockPlacedByPiston(World world, int i, int j, int k, int iMetadata, int iDirectionMoved) Returns the metadata that will be placed -
canBlockBePulledByPiston
-
canBlockBePushedByPiston
-
canBePistonShoveled
-
getPistonShovelEjectDirection
returns the direction the shoveled block will go in if this block is moving towards iToFacing. return -1 if it's no shoveling is taking place. -
getAsPistonMovingBoundingBox
-
adjustMetadataForPistonMove
public int adjustMetadataForPistonMove(int iMetadata) -
canContainPistonPackingToFacing
-
onBrokenByPistonPush
-
isFallingBlock
public boolean isFallingBlock() -
checkForFall
-
onStartFalling
Only called on server -
onFinishFalling
This is actually called when a block lands safely. Do not rename as BlockSand has a child method off of this -
onFallingUpdate
-
notifyNearbyAnimalsFinishedFalling
-
onFinishedFalling
returns true if the block still exists -
attemptToCombineWithFallingEntity
public boolean attemptToCombineWithFallingEntity(World world, int i, int j, int k, EntityFallingSand entity) returns true if the block has combined with the entity -
canBeCrushedByFallingEntity
public boolean canBeCrushedByFallingEntity(World world, int i, int j, int k, EntityFallingSand entity) -
onCrushedByFallingEntity
-
canFallIntoBlockAtPos
-
canSupportFallingBlocks
-
checkForUnstableGround
-
scheduleCheckForFall
-
onBlockDestroyedLandingFromFall
Called on server only -
hasFallingBlockRestingOn
-
getFacing
-
getFacing
public int getFacing(int iMetadata) -
setFacing
-
setFacing
public int setFacing(int iMetadata, int iFacing) -
toggleFacing
Cycle through all the possible facings for a block returns true if the facing has actually changed as a result of this call -
convertFacingToTopTextureRotation
public int convertFacingToTopTextureRotation(int iFacing) -
convertFacingToBottomTextureRotation
public int convertFacingToBottomTextureRotation(int iFacing) -
getOppositeFacing
public static int getOppositeFacing(int iFacing) -
rotateFacingAroundY
public static int rotateFacingAroundY(int iFacing, boolean bReverse) -
cycleFacing
public static int cycleFacing(int iFacing, boolean bReverse) -
canRotateOnTurntable
-
canTransmitRotationHorizontallyOnTurntable
public boolean canTransmitRotationHorizontallyOnTurntable(IBlockAccess blockAccess, int i, int j, int k) -
canTransmitRotationVerticallyOnTurntable
public boolean canTransmitRotationVerticallyOnTurntable(IBlockAccess blockAccess, int i, int j, int k) -
rotateOnTurntable
public int rotateOnTurntable(World world, int x, int y, int z, boolean reverse, int craftingCounter) Returns the new crafting counter after rotation. It is unmodified if no crafting has taken place, incremented or reset on completion if it has. -
onRotatedOnTurntable
-
turntableCraftingRotation
protected int turntableCraftingRotation(World world, int x, int y, int z, boolean reverse, int craftingCounter) -
onCraftedOnTurntable
-
rotateAroundJAxis
Returns true if the facing has actually changed as a result of this call -
rotateMetadataAroundYAxis
public int rotateMetadataAroundYAxis(int iMetadata, boolean bReverse) -
canRotateAroundBlockOnTurntableToFacing
public boolean canRotateAroundBlockOnTurntableToFacing(World world, int i, int j, int k, int iFacing) -
onRotatedAroundBlockOnTurntableToFacing
public boolean onRotatedAroundBlockOnTurntableToFacing(World world, int i, int j, int k, int iFacing) Returns false if the block was destroyed and should not be rotated -
getNewMetadataRotatedAroundBlockOnTurntableToFacing
public int getNewMetadataRotatedAroundBlockOnTurntableToFacing(World world, int i, int j, int k, int iInitialFacing, int iRotatedFacing) -
getStackRetrievedByBlockDispenser
If the stack returned is null, the block will not be retrieved -
isBlockDestroyedByBlockDispenser
public boolean isBlockDestroyedByBlockDispenser(int iMetadata) Whether a block is destroyed by the dispenser, even if no item is collected -
onRemovedByBlockDispenser
-
onStruckByLightning
Called on server only -
canMobsSpawnOn
This is only a first-pass indicator as to whether ANY mobs can spawn on top of the block, so stuff like leaves where only Jungle Spiders can spawn on them, should still return true. -
mobSpawnOnVerticalOffset
-
canEndermenPickUpBlock
-
doEndermenIgnoreNeighbors
-
blocksEndermanPickup
-
initBlockBounds
protected void initBlockBounds(double dMinX, double dMinY, double dMinZ, double dMaxX, double dMaxY, double dMaxZ) Should only ever be called once for a block. Repeated calls will silently fail without changing the bounds. -
initBlockBounds
-
getFixedBlockBoundsFromPool
-
getCollisionBoundingBoxFromPool
-
getBlockBoundsFromPoolBasedOnState
public AxisAlignedBB getBlockBoundsFromPoolBasedOnState(IBlockAccess blockAccess, int i, int j, int k) -
collisionRayTrace
public MovingObjectPosition collisionRayTrace(World world, int i, int j, int k, Vec3 startRay, Vec3 endRay) -
mouseOverRayTrace
public MovingObjectPosition mouseOverRayTrace(World world, int i, int j, int k, Vec3 startRay, Vec3 endRay) -
collisionRayTraceVsBlockBounds
public MovingObjectPosition collisionRayTraceVsBlockBounds(World world, int i, int j, int k, Vec3 startRay, Vec3 endRay) -
canBeGrazedOn
-
onGrazed
-
onVegetationAboveGrazed
-
notifyNeighborsBlockDisrupted
Used when pigs dig up dirt to let any attached neighbors know that they should break loose -
onNeighborDisrupted
-
getHerbivoreItemFoodValue
public int getHerbivoreItemFoodValue(int iItemDamage) -
setHerbivoreItemFoodValue
public void setHerbivoreItemFoodValue(int iFoodValue) -
getChickenItemFoodValue
public int getChickenItemFoodValue(int iItemDamage) -
setChickenItemFoodValue
public void setChickenItemFoodValue(int iFoodValue) -
getPigItemFoodValue
public int getPigItemFoodValue(int iItemDamage) -
setPigItemFoodValue
public void setPigItemFoodValue(int iFoodValue) -
setAlwaysStartlesAnimals
-
startlesAnimalsWhenPlaced
-
canDomesticatedCropsGrowOnBlock
-
canReedsGrowOnBlock
-
canSaplingsGrowOnBlock
-
canWildVegetationGrowOnBlock
Covers stuff like flowers and tall grass -
canNetherWartGrowOnBlock
-
canCactusGrowOnBlock
-
isBlockHydratedForPlantGrowthOn
-
isConsideredNeighbouringWaterForReedGrowthOn
-
getPlantGrowthOnMultiplier
This is used by old style non-daily plant growth -
getIsFertilizedForPlantGrowth
-
notifyOfFullStagePlantGrowthOn
Called when a plant hits a full growth stage, like wheat fully grown, or each full block of Hemp. Used to clear fertilizer. -
notifyOfPlantAboveRemoved
Called server only. Called AFTER the plant is removed, so it's no longer valid. -
canWeedsGrowInBlock
This determines whether weeds can share space with crop blocks, or grow within their own independent weed blocks -
getWeedsGrowthLevel
The growth level of weeds growing out of this block. Range of 0 to 7 -
removeWeeds
-
attemptToApplyFertilizerTo
-
onCreativeBonemealApplied
Called when bonemeal is applied in creative mode. -
getConvertsLegacySoil
-
getMapColor
Gets the color used in map rendering for this block with the specified metadata- Parameters:
meta-- Returns:
-
setMapColorsForMetadata
Set the array of map colors to use per metadata for this block. Make sure you include ALL possible metadata when using this method!- Parameters:
mapColors- Array of mapcolor objects which is referenced when rendering maps- Returns:
-
getLightValueForBlock
-
getLightValue
-
canBeConvertedByMobSpawner
-
convertBlockFromMobSpawner
-
shouldWallConnectToThisBlockToFacing
public boolean shouldWallConnectToThisBlockToFacing(IBlockAccess blockAccess, int x, int y, int z, int facing) -
shouldFenceConnectToThisBlockToFacing
public boolean shouldFenceConnectToThisBlockToFacing(IBlockAccess blockAccess, int x, int y, int z, int facing) -
shouldPaneConnectToThisBlockToFacing
public boolean shouldPaneConnectToThisBlockToFacing(IBlockAccess blockAccess, int x, int y, int z, int facing) -
isWall
public boolean isWall(int metadata) -
isFence
public boolean isFence(int metadata) -
isBenchOrTable
public boolean isBenchOrTable(int metadata) -
shouldWallFormPostBelowThisBlock
-
canLeashKnotOnBlock
-
isLog
-
canSupportLeaves
-
isLeafBlock
-
installationIntegrityTest
public static boolean installationIntegrityTest() -
attemptToAffectBlockWithSoul
-
shouldSideBeRendered
public boolean shouldSideBeRendered(IBlockAccess blockAccess, int iNeighborI, int iNeighborJ, int iNeighborK, int iSide) -
shouldRenderNeighborHalfSlabSide
@Environment(CLIENT) public boolean shouldRenderNeighborHalfSlabSide(IBlockAccess blockAccess, int i, int j, int k, int iNeighborSlabSide, boolean bNeighborUpsideDown) -
shouldRenderNeighborFullFaceSide
@Environment(CLIENT) public boolean shouldRenderNeighborFullFaceSide(IBlockAccess blockAccess, int i, int j, int k, int iNeighborSide) -
renderBlock
-
renderBlockSecondPass
@Environment(CLIENT) public void renderBlockSecondPass(RenderBlocks renderBlocks, int i, int j, int k, boolean bFirstPassResult) If the block has a second pass, like a kiln cooking overlay texture, it should Override this method. This method does not call the overlay by default to cut down on rendering time, since this function is called by every single loaded block. Note that this function is necessary to prevent potential recursion within RenderBlock, if it were to call its own overlays directly, and then potentially get called with a texture overlay itself through RenderBlockWithTexture. -
renderBlockWithTexture
@Environment(CLIENT) public boolean renderBlockWithTexture(RenderBlocks renderBlocks, int i, int j, int k, Icon texture) -
getBlockBoundsFromPoolForItemRender
-
renderBlockAsItem
@Environment(CLIENT) public void renderBlockAsItem(RenderBlocks renderBlocks, int iItemDamage, float fBrightness) -
doesItemRenderAsBlock
@Environment(CLIENT) public boolean doesItemRenderAsBlock(int iItemDamage) -
renderCookingByKiLnOverlay
@Environment(CLIENT) public void renderCookingByKiLnOverlay(RenderBlocks renderBlocks, int i, int j, int k, boolean bFirstPassResult) -
shouldRenderWhileFalling
-
renderFallingBlock
@Environment(CLIENT) public void renderFallingBlock(RenderBlocks renderBlocks, int i, int j, int k, int iMetadata) Applies both to falling blocks, and those pushed by pistons -
shouldSideBeRenderedOnFallingBlock
@Environment(CLIENT) public boolean shouldSideBeRenderedOnFallingBlock(int iSide, int iMetadata) -
renderBlockMovedByPiston
@Environment(CLIENT) public void renderBlockMovedByPiston(RenderBlocks renderBlocks, int i, int j, int k) -
setTextureName
-
getTextureName
-
getSelectedBoundingBoxFromPool
@Environment(CLIENT) public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int i, int j, int k) -
getSelectedBoundingBoxFromPool
@Environment(CLIENT) public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, MovingObjectPosition rayTraceHit) Replaces vanilla call in RenderGlobal to provide ray trace info so specific portions of the block can be highlighted as selected -
getIconByIndex
Called by geometric primitives that FCModelBlock uses, to reference textures not associated with a specific block side. -
getHopperFilterIcon
-
renderCrossHatch
@Environment(CLIENT) public void renderCrossHatch(RenderBlocks renderer, int i, int j, int k, Icon icon, double dBorderWidth, double dVerticalOffset)
-