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 class
Block.EnumOffsetType
static class
Block.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 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.static void
bootstrapStates()
void
breakBlock(World var1, BlockPos var2, IBlockState var3)
boolean
canCollideCheck(IBlockState var1, boolean var2)
boolean
canDropFromExplosion(Explosion explosionIn)
+ Return whether this block can drop from an explosion.boolean
canPlaceBlockAt(World world, BlockPos blockpos)
boolean
canPlaceBlockOnSide(World worldIn, BlockPos pos, EnumFacing side)
+ Check whether this Block can be placed on the given sideboolean
canProvidePower()
+ Can this block provide power.boolean
canReplace(World worldIn, BlockPos pos, EnumFacing side, ItemStack stack)
protected boolean
canSilkHarvest()
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.int
colorMultiplier(IBlockAccess worldIn, BlockPos pos)
int
colorMultiplier(IBlockAccess worldIn, BlockPos pos, int renderPass)
protected BlockState
createBlockState()
protected ItemStack
createStackedBlock(IBlockState state)
int
damageDropped(IBlockState var1)
+ Gets the metadata of the item this Block can drop.protected Block
disableStats()
void
dropBlockAsItem(World worldIn, BlockPos pos, IBlockState state, int forture)
+ Spawn this Block's drops into the World as EntityItemsvoid
dropBlockAsItemWithChance(World world, BlockPos blockpos, IBlockState iblockstate, float f, int i)
+ Spawns this Block's drops into the World as EntityItems.protected void
dropXpOnBlockBreak(World worldIn, BlockPos pos, int amount)
+ Spawns the given amount of experience into the World as XP orb entitiesvoid
fillWithRain(World worldIn, BlockPos pos)
+ Called similar to random ticks, but only when it is raining.boolean
func_181623_g()
IBlockState
getActualState(IBlockState iblockstate, IBlockAccess var2, BlockPos var3)
+ Get the actual Block state of this Block at the given position.float
getAmbientOcclusionLightValue()
+ Returns the default ambient occlusion value based on block opacitydouble
getBlockBoundsMaxX()
+ returns the block bounderies maxX valuedouble
getBlockBoundsMaxY()
+ returns the block bounderies maxY valuedouble
getBlockBoundsMaxZ()
+ returns the block bounderies maxZ valuedouble
getBlockBoundsMinX()
+ returns the block bounderies minX valuedouble
getBlockBoundsMinY()
+ returns the block bounderies minY valuedouble
getBlockBoundsMinZ()
+ returns the block bounderies minZ valuestatic Block
getBlockById(int id)
int
getBlockColor()
static Block
getBlockFromItem(Item itemIn)
static Block
getBlockFromName(java.lang.String name)
float
getBlockHardness(World worldIn, BlockPos pos)
EnumWorldBlockLayer
getBlockLayer()
BlockState
getBlockState()
AxisAlignedBB
getCollisionBoundingBox(World var1, BlockPos blockpos, IBlockState var3)
int
getComparatorInputOverride(World worldIn, BlockPos pos)
CreativeTabs
getCreativeTabToDisplayOn()
+ Returns the CreativeTab to display the given block on.int
getDamageValue(World worldIn, BlockPos pos)
IBlockState
getDefaultState()
boolean
getEnableStats()
+ Return the state of blocks statistics flags - if the block is counted for mined and placed.float
getExplosionResistance(Entity exploder)
+ Returns how much this block can resist explosions from the passed in entity.static int
getIdFromBlock(Block blockIn)
Item
getItem(World var1, BlockPos var2)
Item
getItemDropped(IBlockState var1, EaglercraftRandom var2, int var3)
+ Get the Item that this Block should drop when harvested.int
getLightOpacity()
int
getLightValue()
java.lang.String
getLocalizedName()
+ Gets the localized name of this block.MapColor
getMapColor(IBlockState state)
+ Get the MapColor for this Block and the given BlockStateMaterial
getMaterial()
+ Get a material of blockint
getMetaFromState(IBlockState iblockstate)
+ Convert the BlockState into the correct metadata valueint
getMixedBrightnessForBlock(IBlockAccess worldIn, BlockPos pos)
int
getMobilityFlag()
Block.EnumOffsetType
getOffsetType()
+ Get the OffsetType for this Block.float
getPlayerRelativeBlockHardness(EntityPlayer playerIn, World worldIn, BlockPos pos)
+ Get the hardness of this Block relative to the ability of the given playerint
getRenderColor(IBlockState state)
int
getRenderType()
+ The type of render function called.AxisAlignedBB
getSelectedBoundingBox(World var1, BlockPos blockpos)
static IBlockState
getStateById(int id)
+ Get a BlockState by it's ID (see getStateId)IBlockState
getStateForEntityRender(IBlockState iblockstate)
+ Possibly modify the given BlockState before rendering it on an Entity (Minecarts, Endermen, ...)IBlockState
getStateFromMeta(int var1)
+ Convert the given metadata into a BlockState for this Blockstatic int
getStateId(IBlockState state)
+ Get a unique ID for the given BlockState, containing both BlockID and metadataint
getStrongPower(IBlockAccess var1, BlockPos var2, IBlockState var3, EnumFacing var4)
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)boolean
getTickRandomly()
+ Returns whether or not this block is of a type that needs random ticking.java.lang.String
getUnlocalizedName()
+ Returns the unlocalized name of the block with "tile." appended to the front.boolean
getUseNeighborBrightness()
+ Should block use the brightest neighbor light value as its ownint
getWeakPower(IBlockAccess var1, BlockPos var2, IBlockState var3, EnumFacing var4)
void
harvestBlock(World world, EntityPlayer entityplayer, BlockPos blockpos, IBlockState iblockstate, TileEntity var5)
boolean
hasComparatorInputOverride()
boolean
hasTileEntity()
boolean
isAssociatedBlock(Block other)
boolean
isBlockNormalCube()
+ Indicate if a material is a normal solid opaque cubeboolean
isBlockSolid(IBlockAccess worldIn, BlockPos pos, EnumFacing side)
+ Whether this Block is solid on the given Sideboolean
isCollidable()
+ Returns if this block is collidable (only used by Fire).static boolean
isEqualTo(Block blockIn, Block other)
boolean
isFlowerPot()
+ Returns true only if block is flowerPotboolean
isFullBlock()
boolean
isFullCube()
boolean
isNormalCube()
+ Used for nearly all game logic (non-rendering) purposes.boolean
isOpaqueCube()
+ Used to determine ambient occlusion and culling when rebuilding chunks for renderboolean
isPassable(IBlockAccess var1, BlockPos var2)
boolean
isReplaceable(World var1, BlockPos var2)
+ Whether this Block can be replaced directly by other blocks (true for e.g.boolean
isTranslucent()
+ Used in the renderer to apply ambient occlusionboolean
isVisuallyOpaque()
void
loadPluginData(BaseData data)
PluginData
makePluginData()
Vec3
modifyAcceleration(World worldIn, BlockPos pos, Entity entityIn, Vec3 motion)
boolean
onBlockActivated(World var1, BlockPos var2, IBlockState var3, EntityPlayer var4, EnumFacing var5, float var6, float var7, float var8)
void
onBlockAdded(World var1, BlockPos var2, IBlockState var3)
void
onBlockClicked(World worldIn, BlockPos pos, EntityPlayer playerIn)
void
onBlockDestroyedByExplosion(World worldIn, BlockPos pos, Explosion explosionIn)
+ Called when this Block is destroyed by an Explosionvoid
onBlockDestroyedByPlayer(World worldIn, BlockPos pos, IBlockState state)
+ Called when a player destroys this Blockboolean
onBlockEventReceived(World var1, BlockPos var2, IBlockState var3, int var4, int var5)
+ Called on both Client and Server when World#addBlockEvent is calledvoid
onBlockHarvested(World var1, BlockPos var2, IBlockState var3, EntityPlayer var4)
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 IBlockstatevoid
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 logicvoid
onEntityCollidedWithBlock(World var1, BlockPos var2, IBlockState var3, Entity var4)
+ Called When an Entity Collided with the Blockvoid
onEntityCollidedWithBlock(World worldIn, BlockPos pos, Entity entityIn)
+ Called When an Entity Collided with the Blockvoid
onFallenUpon(World worldIn, BlockPos pos, Entity entityIn, float fallDistance)
+ Block's chance to react to a living entity falling on it.void
onLanded(World worldIn, Entity entityIn)
+ Called when an Entity lands on this Block.void
onNeighborBlockChange(World var1, BlockPos var2, IBlockState var3, Block var4)
+ Called when a neighboring block changes.int
quantityDropped(EaglercraftRandom random)
+ Returns the quantity of items to drop on block destruction.int
quantityDroppedWithBonus(int fortune, EaglercraftRandom random)
+ Get the quantity dropped based on the given fortune levelvoid
randomDisplayTick(World worldIn, BlockPos pos, IBlockState state, EaglercraftRandom rand)
void
randomTick(World world, BlockPos blockpos, IBlockState iblockstate, EaglercraftRandom random)
+ Called randomly when setTickRandomly is set to true (used by e.g.static void
registerBlocks()
boolean
requiresUpdates()
protected void
setBlockBounds(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)
void
setBlockBoundsBasedOnState(IBlockAccess var1, BlockPos var2)
void
setBlockBoundsForItemRender()
+ Sets the block's bounds for rendering it as an itemprotected Block
setBlockUnbreakable()
Block
setCreativeTab(CreativeTabs tab)
protected void
setDefaultState(IBlockState state)
protected Block
setHardness(float hardness)
+ Sets how many hits it takes to break a block.protected Block
setLightLevel(float value)
+ Sets the light value that the block emits.protected Block
setLightOpacity(int opacity)
+ Sets how much light is blocked going through this block.protected Block
setResistance(float resistance)
+ Sets the the blocks resistance to explosions.protected Block
setStepSound(Block.SoundType sound)
+ Sets the footstep sound for the block.protected Block
setTickRandomly(boolean shouldTick)
+ Sets whether this block type will receive random update ticksBlock
setUnlocalizedName(java.lang.String name)
boolean
shouldSideBeRendered(IBlockAccess iblockaccess, BlockPos blockpos, EnumFacing enumfacing)
static void
spawnAsEntity(World worldIn, BlockPos pos, ItemStack stack)
+ Spawns the given ItemStack as an EntityItem into the World at the given positionint
tickRate(World var1)
+ How many world ticks before tickingjava.lang.String
toString()
void
updateTick(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:
toString
in classjava.lang.Object
-
registerBlocks
public static void registerBlocks()
-
bootstrapStates
public static void bootstrapStates()
-
-