Class Block

    • Field Detail

      • soundTypeWood

        public static final Block.SoundType soundTypeWood
        + the wood sound type
      • soundTypeGravel

        public static final Block.SoundType soundTypeGravel
        + the gravel sound type
      • fullBlock

        protected boolean fullBlock
      • lightOpacity

        protected int lightOpacity
      • translucent

        protected boolean translucent
      • lightValue

        protected int lightValue
      • useNeighborBrightness

        protected boolean useNeighborBrightness
      • blockHardness

        protected float blockHardness
      • blockResistance

        protected float blockResistance
      • enableStats

        protected boolean enableStats
      • needsRandomTick

        protected boolean needsRandomTick
      • isBlockContainer

        protected boolean isBlockContainer
      • minX

        protected double minX
      • minY

        protected double minY
      • minZ

        protected double minZ
      • maxX

        protected double maxX
      • maxY

        protected double maxY
      • maxZ

        protected double maxZ
      • blockParticleGravity

        public float blockParticleGravity
      • blockMaterial

        protected final Material blockMaterial
      • field_181083_K

        protected final MapColor field_181083_K
      • slipperiness

        public float slipperiness
      • blockState

        protected final BlockState blockState
      • noRender

        public boolean noRender
      • forceRender

        public boolean forceRender
    • Constructor Detail

      • Block

        protected Block​(Material materialIn)
    • Method Detail

      • loadPluginData

        public void loadPluginData​(BaseData data)
      • makePluginData

        public PluginData makePluginData()
      • getIdFromBlock

        public static int getIdFromBlock​(Block blockIn)
      • getStateId

        public static int getStateId​(IBlockState state)
        + Get a unique ID for the given BlockState, containing both BlockID and metadata
      • getBlockById

        public static Block getBlockById​(int id)
      • getStateById

        public static IBlockState getStateById​(int id)
        + Get a BlockState by it's ID (see getStateId)
      • getBlockFromItem

        public static Block getBlockFromItem​(Item itemIn)
      • getBlockFromName

        public static Block getBlockFromName​(java.lang.String name)
      • isFullBlock

        public boolean isFullBlock()
      • getLightOpacity

        public int getLightOpacity()
      • isTranslucent

        public boolean isTranslucent()
        + Used in the renderer to apply ambient occlusion
      • getLightValue

        public int getLightValue()
      • getUseNeighborBrightness

        public boolean getUseNeighborBrightness()
        + Should block use the brightest neighbor light value as its own
      • getMaterial

        public Material getMaterial()
        + Get a material of block
      • getMapColor

        public MapColor getMapColor​(IBlockState state)
        + Get the MapColor for this Block and the given BlockState
      • getStateFromMeta

        public IBlockState getStateFromMeta​(int var1)
        + Convert the given metadata into a BlockState for this Block
      • getMetaFromState

        public int getMetaFromState​(IBlockState iblockstate)
        + Convert the BlockState into the correct metadata value
      • getActualState

        public IBlockState getActualState​(IBlockState iblockstate,
                                          IBlockAccess var2,
                                          BlockPos var3)
        + Get the actual Block state of this Block at the given position. This applies properties not visible in the metadata, such as fence connections.
      • setStepSound

        protected Block setStepSound​(Block.SoundType sound)
        + Sets the footstep sound for the block. Returns the object for convenience in constructing.
      • setLightOpacity

        protected Block setLightOpacity​(int opacity)
        + Sets how much light is blocked going through this block. Returns the object for convenience in constructing.
      • setLightLevel

        protected Block setLightLevel​(float value)
        + Sets the light value that the block emits. Returns resulting block instance for constructing convenience. Args: level
      • setResistance

        protected Block setResistance​(float resistance)
        + Sets the the blocks resistance to explosions. Returns the object for convenience in constructing.
      • isBlockNormalCube

        public boolean isBlockNormalCube()
        + Indicate if a material is a normal solid opaque cube
      • isNormalCube

        public boolean isNormalCube()
        + Used for nearly all game logic (non-rendering) purposes. Use Forge-provided isNormalCube(IBlockAccess, BlockPos) instead.
      • isVisuallyOpaque

        public boolean isVisuallyOpaque()
      • isFullCube

        public boolean isFullCube()
      • getRenderType

        public int getRenderType()
        + The type of render function called. 3 for standard block models, 2 for TESR's, 1 for liquids, -1 is no render
      • isReplaceable

        public boolean isReplaceable​(World var1,
                                     BlockPos var2)
        + Whether this Block can be replaced directly by other blocks (true for e.g. tall grass)
      • setHardness

        protected Block setHardness​(float hardness)
        + Sets how many hits it takes to break a block.
      • setBlockUnbreakable

        protected Block setBlockUnbreakable()
      • getBlockHardness

        public float getBlockHardness​(World worldIn,
                                      BlockPos pos)
      • setTickRandomly

        protected Block setTickRandomly​(boolean shouldTick)
        + 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

        protected final void setBlockBounds​(float minX,
                                            float minY,
                                            float minZ,
                                            float maxX,
                                            float maxY,
                                            float maxZ)
      • getMixedBrightnessForBlock

        public int getMixedBrightnessForBlock​(IBlockAccess worldIn,
                                              BlockPos pos)
      • isBlockSolid

        public boolean isBlockSolid​(IBlockAccess worldIn,
                                    BlockPos pos,
                                    EnumFacing side)
        + Whether this Block is solid on the given Side
      • addCollisionBoxesToList

        public void addCollisionBoxesToList​(World worldIn,
                                            BlockPos pos,
                                            IBlockState state,
                                            AxisAlignedBB mask,
                                            java.util.List<AxisAlignedBB> list,
                                            Entity collidingEntity)
        + Add all collision boxes of this Block to the list that intersect with the given mask.
      • isOpaqueCube

        public boolean isOpaqueCube()
        + Used to determine ambient occlusion and culling when rebuilding chunks for render
      • canCollideCheck

        public boolean canCollideCheck​(IBlockState var1,
                                       boolean var2)
      • isCollidable

        public boolean isCollidable()
        + Returns if this block is collidable (only used by Fire). Args: x, y, z
      • randomTick

        public void randomTick​(World world,
                               BlockPos blockpos,
                               IBlockState iblockstate,
                               EaglercraftRandom random)
        + Called randomly when setTickRandomly is set to true (used by e.g. crops to grow, etc.)
      • onBlockDestroyedByPlayer

        public void onBlockDestroyedByPlayer​(World worldIn,
                                             BlockPos pos,
                                             IBlockState state)
        + Called when a player destroys this Block
      • onNeighborBlockChange

        public void onNeighborBlockChange​(World var1,
                                          BlockPos var2,
                                          IBlockState var3,
                                          Block var4)
        + Called when a neighboring block changes.
      • tickRate

        public int tickRate​(World var1)
        + How many world ticks before ticking
      • quantityDropped

        public int quantityDropped​(EaglercraftRandom random)
        + Returns the quantity of items to drop on block destruction.
      • getItemDropped

        public Item getItemDropped​(IBlockState var1,
                                   EaglercraftRandom var2,
                                   int var3)
        + Get the Item that this Block should drop when harvested.
      • getPlayerRelativeBlockHardness

        public float getPlayerRelativeBlockHardness​(EntityPlayer playerIn,
                                                    World worldIn,
                                                    BlockPos pos)
        + Get the hardness of this Block relative to the ability of the given player
      • dropBlockAsItem

        public final void dropBlockAsItem​(World worldIn,
                                          BlockPos pos,
                                          IBlockState state,
                                          int forture)
        + Spawn this Block's drops into the World as EntityItems
      • dropBlockAsItemWithChance

        public void dropBlockAsItemWithChance​(World world,
                                              BlockPos blockpos,
                                              IBlockState iblockstate,
                                              float f,
                                              int i)
        + Spawns this Block's drops into the World as EntityItems.
      • spawnAsEntity

        public static void spawnAsEntity​(World worldIn,
                                         BlockPos pos,
                                         ItemStack stack)
        + Spawns the given ItemStack as an EntityItem into the World at the given position
      • dropXpOnBlockBreak

        protected void dropXpOnBlockBreak​(World worldIn,
                                          BlockPos pos,
                                          int amount)
        + Spawns the given amount of experience into the World as XP orb entities
      • damageDropped

        public int damageDropped​(IBlockState var1)
        + Gets the metadata of the item this Block can drop. This method is called when the block gets destroyed. It returns the metadata of the dropped item based on the old metadata of the block.
      • getExplosionResistance

        public float getExplosionResistance​(Entity exploder)
        + Returns how much this block can resist explosions from the passed in entity.
      • collisionRayTrace

        public MovingObjectPosition collisionRayTrace​(World world,
                                                      BlockPos blockpos,
                                                      Vec3 vec3,
                                                      Vec3 vec31)
        + Ray traces through the blocks collision from start vector to end vector returning a ray trace hit.
      • onBlockDestroyedByExplosion

        public void onBlockDestroyedByExplosion​(World worldIn,
                                                BlockPos pos,
                                                Explosion explosionIn)
        + Called when this Block is destroyed by an Explosion
      • canPlaceBlockOnSide

        public boolean canPlaceBlockOnSide​(World worldIn,
                                           BlockPos pos,
                                           EnumFacing side)
        + Check whether this Block can be placed on the given side
      • canPlaceBlockAt

        public boolean canPlaceBlockAt​(World world,
                                       BlockPos blockpos)
      • onEntityCollidedWithBlock

        public void onEntityCollidedWithBlock​(World worldIn,
                                              BlockPos pos,
                                              Entity entityIn)
        + Called When an Entity Collided with the Block
      • onBlockPlaced

        public IBlockState onBlockPlaced​(World var1,
                                         BlockPos var2,
                                         EnumFacing var3,
                                         float var4,
                                         float var5,
                                         float var6,
                                         int i,
                                         EntityLivingBase var8)
        + Called by ItemBlocks just before a block is actually set in the world, to allow for adjustments to the IBlockstate
      • setBlockBoundsBasedOnState

        public void setBlockBoundsBasedOnState​(IBlockAccess var1,
                                               BlockPos var2)
      • 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​(IBlockState state)
      • colorMultiplier

        public int colorMultiplier​(IBlockAccess worldIn,
                                   BlockPos pos,
                                   int renderPass)
      • 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 var1,
                                              BlockPos var2,
                                              IBlockState var3,
                                              Entity var4)
        + Called When an Entity Collided with the Block
      • setBlockBoundsForItemRender

        public void setBlockBoundsForItemRender()
        + Sets the block's bounds for rendering it as an item
      • canSilkHarvest

        protected boolean canSilkHarvest()
      • quantityDroppedWithBonus

        public int quantityDroppedWithBonus​(int fortune,
                                            EaglercraftRandom random)
        + Get the quantity dropped based on the given fortune level
      • func_181623_g

        public boolean func_181623_g()
      • setUnlocalizedName

        public Block setUnlocalizedName​(java.lang.String name)
      • getLocalizedName

        public java.lang.String getLocalizedName()
        + Gets the localized name of this block. Used for the statistics page.
      • getUnlocalizedName

        public java.lang.String getUnlocalizedName()
        + Returns the unlocalized name of the block with "tile." appended to the front.
      • onBlockEventReceived

        public boolean onBlockEventReceived​(World var1,
                                            BlockPos var2,
                                            IBlockState var3,
                                            int var4,
                                            int var5)
        + Called on both Client and Server when World#addBlockEvent is called
      • getEnableStats

        public boolean getEnableStats()
        + Return the state of blocks statistics flags - if the block is counted for mined and placed.
      • disableStats

        protected Block disableStats()
      • getMobilityFlag

        public int getMobilityFlag()
      • getAmbientOcclusionLightValue

        public float getAmbientOcclusionLightValue()
        + Returns the default ambient occlusion value based on block opacity
      • onFallenUpon

        public void onFallenUpon​(World worldIn,
                                 BlockPos pos,
                                 Entity entityIn,
                                 float fallDistance)
        + Block's chance to react to a living entity falling on it.
      • onLanded

        public void onLanded​(World worldIn,
                             Entity entityIn)
        + Called when an Entity lands on this Block. This method *must* update motionY because the entity will not do that on its own
      • getDamageValue

        public int getDamageValue​(World worldIn,
                                  BlockPos pos)
      • getSubBlocks

        public void getSubBlocks​(Item item,
                                 CreativeTabs var2,
                                 java.util.List<ItemStack> list)
        + returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
      • getCreativeTabToDisplayOn

        public CreativeTabs getCreativeTabToDisplayOn()
        + Returns the CreativeTab to display the given block on.
      • fillWithRain

        public void fillWithRain​(World worldIn,
                                 BlockPos pos)
        + Called similar to random ticks, but only when it is raining.
      • isFlowerPot

        public boolean isFlowerPot()
        + Returns true only if block is flowerPot
      • requiresUpdates

        public boolean requiresUpdates()
      • canDropFromExplosion

        public boolean canDropFromExplosion​(Explosion explosionIn)
        + Return whether this block can drop from an explosion.
      • isAssociatedBlock

        public boolean isAssociatedBlock​(Block other)
      • isEqualTo

        public static boolean isEqualTo​(Block blockIn,
                                        Block other)
      • hasComparatorInputOverride

        public boolean hasComparatorInputOverride()
      • getComparatorInputOverride

        public int getComparatorInputOverride​(World worldIn,
                                              BlockPos pos)
      • getStateForEntityRender

        public IBlockState getStateForEntityRender​(IBlockState iblockstate)
        + Possibly modify the given BlockState before rendering it on an Entity (Minecarts, Endermen, ...)
      • createBlockState

        protected BlockState createBlockState()
      • getBlockState

        public BlockState getBlockState()
      • setDefaultState

        protected final void setDefaultState​(IBlockState state)
      • getDefaultState

        public final IBlockState getDefaultState()
      • getOffsetType

        public Block.EnumOffsetType getOffsetType()
        + Get the OffsetType for this Block. Determines if the model is rendered slightly offset.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • registerBlocks

        public static void registerBlocks()
      • bootstrapStates

        public static void bootstrapStates()