Package net.minecraft.block
Class Block
- java.lang.Object
-
- net.zxmushroom63.plugins.BaseData
-
- net.zxmushroom63.plugins.PluginData
-
- net.minecraft.block.Block
-
- All Implemented Interfaces:
org.teavm.jso.JSObject
- Direct Known Subclasses:
BlockAir,BlockBarrier,BlockBasePressurePlate,BlockBookshelf,BlockBreakable,BlockBush,BlockButton,BlockCactus,BlockCake,BlockCarpet,BlockCauldron,BlockClay,BlockColored,BlockCompressedPowered,BlockContainer,BlockDirectional,BlockDirt,BlockDoor,BlockDragonEgg,BlockEndPortalFrame,BlockFalling,BlockFarmland,BlockFence,BlockFire,BlockGlowstone,BlockGrass,BlockHardenedClay,BlockHugeMushroom,BlockLadder,BlockLeavesBase,BlockLever,BlockLiquid,BlockMelon,BlockMycelium,BlockNetherBrick,BlockNetherrack,BlockObsidian,BlockOre,BlockPackedIce,BlockPane,BlockPistonBase,BlockPistonExtension,BlockPlanks,BlockPrismarine,BlockQuartz,BlockRailBase,BlockRedSandstone,BlockRedstoneLight,BlockRedstoneOre,BlockRedstoneWire,BlockReed,BlockRotatedPillar,BlockSandStone,BlockSeaLantern,BlockSilverfish,BlockSlab,BlockSnow,BlockSnowBlock,BlockSoulSand,BlockSponge,BlockStairs,BlockStone,BlockStoneBrick,BlockTNT,BlockTorch,BlockTrapDoor,BlockTripWire,BlockTripWireHook,BlockVine,BlockWall,BlockWeb,BlockWorkbench
public class Block extends PluginData
+ This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!" Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team EaglercraftX 1.8 patch files are (c) 2022-2023 LAX1DUDE. All Rights Reserved. WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR. NOT FOR COMMERCIAL OR MALICIOUS USE (please read the 'LICENSE' file this repo's root directory for more info)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBlock.EnumOffsetTypestatic classBlock.SoundType-
Nested classes/interfaces inherited from class net.zxmushroom63.plugins.BaseData
BaseData.BooleanCallback, BaseData.BooleanCallbackArr, BaseData.DataBooleanCallback, BaseData.DataBooleanCallbackArr, BaseData.DataDoubleCallback, BaseData.DataDoubleCallbackArr, BaseData.DataFloatCallback, BaseData.DataFloatCallbackArr, BaseData.DataIntCallback, BaseData.DataIntCallbackArr, BaseData.DataObjectCallback, BaseData.DataObjectCallbackArr, BaseData.DataStringCallback, BaseData.DataStringCallbackArr, BaseData.DataVoidCallback, BaseData.DoubleCallback, BaseData.DoubleCallbackArr, BaseData.FloatCallback, BaseData.FloatCallbackArr, BaseData.IntCallback, BaseData.IntCallbackArr, BaseData.ObjectCallback, BaseData.ObjectCallbackArr, BaseData.StringCallback, BaseData.StringCallbackArr, BaseData.VoidCallback
-
-
Field Summary
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCollisionBoxesToList(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.static voidbootstrapStates()voidbreakBlock(World var1, BlockPos var2, IBlockState var3)booleancanCollideCheck(IBlockState var1, boolean var2)booleancanDropFromExplosion(Explosion explosionIn)+ Return whether this block can drop from an explosion.booleancanPlaceBlockAt(World world, BlockPos blockpos)booleancanPlaceBlockOnSide(World worldIn, BlockPos pos, EnumFacing side)+ Check whether this Block can be placed on the given sidebooleancanProvidePower()+ Can this block provide power.booleancanReplace(World worldIn, BlockPos pos, EnumFacing side, ItemStack stack)protected booleancanSilkHarvest()MovingObjectPositioncollisionRayTrace(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.intcolorMultiplier(IBlockAccess worldIn, BlockPos pos)intcolorMultiplier(IBlockAccess worldIn, BlockPos pos, int renderPass)protected BlockStatecreateBlockState()protected ItemStackcreateStackedBlock(IBlockState state)intdamageDropped(IBlockState var1)+ Gets the metadata of the item this Block can drop.protected BlockdisableStats()voiddropBlockAsItem(World worldIn, BlockPos pos, IBlockState state, int forture)+ Spawn this Block's drops into the World as EntityItemsvoiddropBlockAsItemWithChance(World world, BlockPos blockpos, IBlockState iblockstate, float f, int i)+ Spawns this Block's drops into the World as EntityItems.protected voiddropXpOnBlockBreak(World worldIn, BlockPos pos, int amount)+ Spawns the given amount of experience into the World as XP orb entitiesvoidfillWithRain(World worldIn, BlockPos pos)+ Called similar to random ticks, but only when it is raining.booleanfunc_181623_g()IBlockStategetActualState(IBlockState iblockstate, IBlockAccess var2, BlockPos var3)+ Get the actual Block state of this Block at the given position.floatgetAmbientOcclusionLightValue()+ Returns the default ambient occlusion value based on block opacitydoublegetBlockBoundsMaxX()+ returns the block bounderies maxX valuedoublegetBlockBoundsMaxY()+ returns the block bounderies maxY valuedoublegetBlockBoundsMaxZ()+ returns the block bounderies maxZ valuedoublegetBlockBoundsMinX()+ returns the block bounderies minX valuedoublegetBlockBoundsMinY()+ returns the block bounderies minY valuedoublegetBlockBoundsMinZ()+ returns the block bounderies minZ valuestatic BlockgetBlockById(int id)intgetBlockColor()static BlockgetBlockFromItem(Item itemIn)static BlockgetBlockFromName(java.lang.String name)floatgetBlockHardness(World worldIn, BlockPos pos)EnumWorldBlockLayergetBlockLayer()BlockStategetBlockState()AxisAlignedBBgetCollisionBoundingBox(World var1, BlockPos blockpos, IBlockState var3)intgetComparatorInputOverride(World worldIn, BlockPos pos)CreativeTabsgetCreativeTabToDisplayOn()+ Returns the CreativeTab to display the given block on.intgetDamageValue(World worldIn, BlockPos pos)IBlockStategetDefaultState()booleangetEnableStats()+ Return the state of blocks statistics flags - if the block is counted for mined and placed.floatgetExplosionResistance(Entity exploder)+ Returns how much this block can resist explosions from the passed in entity.static intgetIdFromBlock(Block blockIn)ItemgetItem(World var1, BlockPos var2)ItemgetItemDropped(IBlockState var1, EaglercraftRandom var2, int var3)+ Get the Item that this Block should drop when harvested.intgetLightOpacity()intgetLightValue()java.lang.StringgetLocalizedName()+ Gets the localized name of this block.MapColorgetMapColor(IBlockState state)+ Get the MapColor for this Block and the given BlockStateMaterialgetMaterial()+ Get a material of blockintgetMetaFromState(IBlockState iblockstate)+ Convert the BlockState into the correct metadata valueintgetMixedBrightnessForBlock(IBlockAccess worldIn, BlockPos pos)intgetMobilityFlag()Block.EnumOffsetTypegetOffsetType()+ Get the OffsetType for this Block.floatgetPlayerRelativeBlockHardness(EntityPlayer playerIn, World worldIn, BlockPos pos)+ Get the hardness of this Block relative to the ability of the given playerintgetRenderColor(IBlockState state)intgetRenderType()+ The type of render function called.AxisAlignedBBgetSelectedBoundingBox(World var1, BlockPos blockpos)static IBlockStategetStateById(int id)+ Get a BlockState by it's ID (see getStateId)IBlockStategetStateForEntityRender(IBlockState iblockstate)+ Possibly modify the given BlockState before rendering it on an Entity (Minecarts, Endermen, ...)IBlockStategetStateFromMeta(int var1)+ Convert the given metadata into a BlockState for this Blockstatic intgetStateId(IBlockState state)+ Get a unique ID for the given BlockState, containing both BlockID and metadataintgetStrongPower(IBlockAccess var1, BlockPos var2, IBlockState var3, EnumFacing var4)voidgetSubBlocks(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)booleangetTickRandomly()+ Returns whether or not this block is of a type that needs random ticking.java.lang.StringgetUnlocalizedName()+ Returns the unlocalized name of the block with "tile." appended to the front.booleangetUseNeighborBrightness()+ Should block use the brightest neighbor light value as its ownintgetWeakPower(IBlockAccess var1, BlockPos var2, IBlockState var3, EnumFacing var4)voidharvestBlock(World world, EntityPlayer entityplayer, BlockPos blockpos, IBlockState iblockstate, TileEntity var5)booleanhasComparatorInputOverride()booleanhasTileEntity()booleanisAssociatedBlock(Block other)booleanisBlockNormalCube()+ Indicate if a material is a normal solid opaque cubebooleanisBlockSolid(IBlockAccess worldIn, BlockPos pos, EnumFacing side)+ Whether this Block is solid on the given SidebooleanisCollidable()+ Returns if this block is collidable (only used by Fire).static booleanisEqualTo(Block blockIn, Block other)booleanisFlowerPot()+ Returns true only if block is flowerPotbooleanisFullBlock()booleanisFullCube()booleanisNormalCube()+ Used for nearly all game logic (non-rendering) purposes.booleanisOpaqueCube()+ Used to determine ambient occlusion and culling when rebuilding chunks for renderbooleanisPassable(IBlockAccess var1, BlockPos var2)booleanisReplaceable(World var1, BlockPos var2)+ Whether this Block can be replaced directly by other blocks (true for e.g.booleanisTranslucent()+ Used in the renderer to apply ambient occlusionbooleanisVisuallyOpaque()voidloadPluginData(BaseData data)PluginDatamakePluginData()Vec3modifyAcceleration(World worldIn, BlockPos pos, Entity entityIn, Vec3 motion)booleanonBlockActivated(World var1, BlockPos var2, IBlockState var3, EntityPlayer var4, EnumFacing var5, float var6, float var7, float var8)voidonBlockAdded(World var1, BlockPos var2, IBlockState var3)voidonBlockClicked(World worldIn, BlockPos pos, EntityPlayer playerIn)voidonBlockDestroyedByExplosion(World worldIn, BlockPos pos, Explosion explosionIn)+ Called when this Block is destroyed by an ExplosionvoidonBlockDestroyedByPlayer(World worldIn, BlockPos pos, IBlockState state)+ Called when a player destroys this BlockbooleanonBlockEventReceived(World var1, BlockPos var2, IBlockState var3, int var4, int var5)+ Called on both Client and Server when World#addBlockEvent is calledvoidonBlockHarvested(World var1, BlockPos var2, IBlockState var3, EntityPlayer var4)IBlockStateonBlockPlaced(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 IBlockstatevoidonBlockPlacedBy(World var1, BlockPos var2, IBlockState var3, EntityLivingBase var4, ItemStack var5)+ Called by ItemBlocks after a block is set in the world, to allow post-place logicvoidonEntityCollidedWithBlock(World var1, BlockPos var2, IBlockState var3, Entity var4)+ Called When an Entity Collided with the BlockvoidonEntityCollidedWithBlock(World worldIn, BlockPos pos, Entity entityIn)+ Called When an Entity Collided with the BlockvoidonFallenUpon(World worldIn, BlockPos pos, Entity entityIn, float fallDistance)+ Block's chance to react to a living entity falling on it.voidonLanded(World worldIn, Entity entityIn)+ Called when an Entity lands on this Block.voidonNeighborBlockChange(World var1, BlockPos var2, IBlockState var3, Block var4)+ Called when a neighboring block changes.intquantityDropped(EaglercraftRandom random)+ Returns the quantity of items to drop on block destruction.intquantityDroppedWithBonus(int fortune, EaglercraftRandom random)+ Get the quantity dropped based on the given fortune levelvoidrandomDisplayTick(World worldIn, BlockPos pos, IBlockState state, EaglercraftRandom rand)voidrandomTick(World world, BlockPos blockpos, IBlockState iblockstate, EaglercraftRandom random)+ Called randomly when setTickRandomly is set to true (used by e.g.static voidregisterBlocks()booleanrequiresUpdates()protected voidsetBlockBounds(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)voidsetBlockBoundsBasedOnState(IBlockAccess var1, BlockPos var2)voidsetBlockBoundsForItemRender()+ Sets the block's bounds for rendering it as an itemprotected BlocksetBlockUnbreakable()BlocksetCreativeTab(CreativeTabs tab)protected voidsetDefaultState(IBlockState state)protected BlocksetHardness(float hardness)+ Sets how many hits it takes to break a block.protected BlocksetLightLevel(float value)+ Sets the light value that the block emits.protected BlocksetLightOpacity(int opacity)+ Sets how much light is blocked going through this block.protected BlocksetResistance(float resistance)+ Sets the the blocks resistance to explosions.protected BlocksetStepSound(Block.SoundType sound)+ Sets the footstep sound for the block.protected BlocksetTickRandomly(boolean shouldTick)+ Sets whether this block type will receive random update ticksBlocksetUnlocalizedName(java.lang.String name)booleanshouldSideBeRendered(IBlockAccess iblockaccess, BlockPos blockpos, EnumFacing enumfacing)static voidspawnAsEntity(World worldIn, BlockPos pos, ItemStack stack)+ Spawns the given ItemStack as an EntityItem into the World at the given positioninttickRate(World var1)+ How many world ticks before tickingjava.lang.StringtoString()voidupdateTick(World var1, BlockPos var2, IBlockState var3, EaglercraftRandom var4)-
Methods inherited from class net.zxmushroom63.plugins.BaseData
execFuncBaseData, execFuncObject, execFuncString, getBaseData, getBaseDataArr, getBoolean, getBooleanArr, getByte, getByteArr, getChar, getCharArr, getDouble, getDoubleArr, getFloat, getFloatArr, getInt, getIntArr, getObject, getObjectArr, getShort, getShortArr, getString, getStringArr, has, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, set, setCallbackBoolean, setCallbackBooleanArr, setCallbackBooleanArrWithDataArg, setCallbackBooleanWithDataArg, setCallbackDouble, setCallbackDoubleArr, setCallbackDoubleArrWithDataArg, setCallbackDoubleWithDataArg, setCallbackFloat, setCallbackFloatArr, setCallbackFloatArrWithDataArg, setCallbackFloatWithDataArg, setCallbackInt, setCallbackIntArr, setCallbackIntArrWithDataArg, setCallbackIntWithDataArg, setCallbackObject, setCallbackObjectArr, setCallbackObjectArrWithDataArg, setCallbackObjectWithDataArg, setCallbackString, setCallbackStringArr, setCallbackStringArrWithDataArg, setCallbackStringWithDataArg, setCallbackVoid, setCallbackVoidWithDataArg, setNull
-
-
-
-
Field Detail
-
blockRegistry
public static final RegistryNamespacedDefaultedByKey<ResourceLocation,Block> blockRegistry
-
BLOCK_STATE_IDS
public static final ObjectIntIdentityMap<IBlockState> BLOCK_STATE_IDS
-
soundTypeStone
public static final Block.SoundType soundTypeStone
-
soundTypeWood
public static final Block.SoundType soundTypeWood
+ the wood sound type
-
soundTypeGravel
public static final Block.SoundType soundTypeGravel
+ the gravel sound type
-
soundTypeGrass
public static final Block.SoundType soundTypeGrass
-
soundTypePiston
public static final Block.SoundType soundTypePiston
-
soundTypeMetal
public static final Block.SoundType soundTypeMetal
-
soundTypeGlass
public static final Block.SoundType soundTypeGlass
-
soundTypeCloth
public static final Block.SoundType soundTypeCloth
-
soundTypeSand
public static final Block.SoundType soundTypeSand
-
soundTypeSnow
public static final Block.SoundType soundTypeSnow
-
soundTypeLadder
public static final Block.SoundType soundTypeLadder
-
soundTypeAnvil
public static final Block.SoundType soundTypeAnvil
-
SLIME_SOUND
public static final Block.SoundType SLIME_SOUND
-
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
-
stepSound
public Block.SoundType stepSound
-
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
-
-
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)
-
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()
-
isPassable
public boolean isPassable(IBlockAccess var1, BlockPos var2)
-
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()
-
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)
-
shouldSideBeRendered
public boolean shouldSideBeRendered(IBlockAccess iblockaccess, BlockPos blockpos, EnumFacing enumfacing)
-
isBlockSolid
public boolean isBlockSolid(IBlockAccess worldIn, BlockPos pos, EnumFacing side)
+ Whether this Block is solid on the given Side
-
getSelectedBoundingBox
public AxisAlignedBB getSelectedBoundingBox(World var1, BlockPos blockpos)
-
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.
-
getCollisionBoundingBox
public AxisAlignedBB getCollisionBoundingBox(World var1, BlockPos blockpos, IBlockState var3)
-
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.)
-
updateTick
public void updateTick(World var1, BlockPos var2, IBlockState var3, EaglercraftRandom var4)
-
randomDisplayTick
public void randomDisplayTick(World worldIn, BlockPos pos, IBlockState state, EaglercraftRandom rand)
-
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
-
onBlockAdded
public void onBlockAdded(World var1, BlockPos var2, IBlockState var3)
-
breakBlock
public void breakBlock(World var1, BlockPos var2, IBlockState var3)
-
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
-
getBlockLayer
public EnumWorldBlockLayer getBlockLayer()
-
canReplace
public boolean canReplace(World worldIn, BlockPos pos, EnumFacing side, ItemStack stack)
-
canPlaceBlockOnSide
public boolean canPlaceBlockOnSide(World worldIn, BlockPos pos, EnumFacing side)
+ Check whether this Block can be placed on the given side
-
onBlockActivated
public boolean onBlockActivated(World var1, BlockPos var2, IBlockState var3, EntityPlayer var4, EnumFacing var5, float var6, float var7, float var8)
-
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
-
onBlockClicked
public void onBlockClicked(World worldIn, BlockPos pos, EntityPlayer playerIn)
-
modifyAcceleration
public Vec3 modifyAcceleration(World worldIn, BlockPos pos, Entity entityIn, Vec3 motion)
-
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)
-
colorMultiplier
public final int colorMultiplier(IBlockAccess worldIn, BlockPos pos)
-
getWeakPower
public int getWeakPower(IBlockAccess var1, BlockPos var2, IBlockState var3, EnumFacing var4)
-
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
-
getStrongPower
public int getStrongPower(IBlockAccess var1, BlockPos var2, IBlockState var3, EnumFacing var4)
-
setBlockBoundsForItemRender
public void setBlockBoundsForItemRender()
+ Sets the block's bounds for rendering it as an item
-
harvestBlock
public void harvestBlock(World world, EntityPlayer entityplayer, BlockPos blockpos, IBlockState iblockstate, TileEntity var5)
-
canSilkHarvest
protected boolean canSilkHarvest()
-
createStackedBlock
protected ItemStack createStackedBlock(IBlockState state)
-
quantityDroppedWithBonus
public int quantityDroppedWithBonus(int fortune, EaglercraftRandom random)+ Get the quantity dropped based on the given fortune level
-
onBlockPlacedBy
public void onBlockPlacedBy(World var1, BlockPos var2, IBlockState var3, EntityLivingBase var4, ItemStack var5)
+ Called by ItemBlocks after a block is set in the world, to allow post-place logic
-
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
-
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.
-
setCreativeTab
public Block setCreativeTab(CreativeTabs tab)
-
onBlockHarvested
public void onBlockHarvested(World var1, BlockPos var2, IBlockState var3, EntityPlayer var4)
-
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)
-
hasComparatorInputOverride
public boolean hasComparatorInputOverride()
-
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:
toStringin classjava.lang.Object
-
registerBlocks
public static void registerBlocks()
-
bootstrapStates
public static void bootstrapStates()
-
-