Package net.minecraft.block
Class BlockButton
- java.lang.Object
-
- net.zxmushroom63.plugins.BaseData
-
- net.zxmushroom63.plugins.PluginData
-
- net.minecraft.block.Block
-
- net.minecraft.block.BlockButton
-
- All Implemented Interfaces:
org.teavm.jso.JSObject
- Direct Known Subclasses:
BlockButtonStone
,BlockButtonWood
public abstract class BlockButton extends Block
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.EnumOffsetType, 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
Fields Modifier and Type Field Description static PropertyDirection
FACING
static PropertyBool
POWERED
-
Fields inherited from class net.minecraft.block.Block
BLOCK_STATE_IDS, blockHardness, blockMaterial, blockParticleGravity, blockRegistry, blockResistance, blockState, enableStats, field_181083_K, forceRender, fullBlock, isBlockContainer, lightOpacity, lightValue, maxX, maxY, maxZ, minX, minY, minZ, needsRandomTick, noRender, SLIME_SOUND, slipperiness, soundTypeAnvil, soundTypeCloth, soundTypeGlass, soundTypeGrass, soundTypeGravel, soundTypeLadder, soundTypeMetal, soundTypePiston, soundTypeSand, soundTypeSnow, soundTypeStone, soundTypeWood, stepSound, translucent, useNeighborBrightness
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BlockButton(boolean wooden)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
breakBlock(World world, BlockPos blockpos, IBlockState iblockstate)
boolean
canPlaceBlockAt(World world, BlockPos blockpos)
boolean
canPlaceBlockOnSide(World world, BlockPos blockpos, EnumFacing enumfacing)
+ Check whether this Block can be placed on the given sideboolean
canProvidePower()
+ Can this block provide power.protected BlockState
createBlockState()
protected static boolean
func_181088_a(World parWorld, BlockPos parBlockPos, EnumFacing parEnumFacing)
AxisAlignedBB
getCollisionBoundingBox(World var1, BlockPos var2, IBlockState var3)
int
getMetaFromState(IBlockState iblockstate)
+ Convert the BlockState into the correct metadata valueIBlockState
getStateFromMeta(int i)
+ Convert the given metadata into a BlockState for this Blockint
getStrongPower(IBlockAccess var1, BlockPos var2, IBlockState iblockstate, EnumFacing enumfacing)
int
getWeakPower(IBlockAccess var1, BlockPos var2, IBlockState iblockstate, EnumFacing var4)
boolean
isFullCube()
boolean
isOpaqueCube()
+ Used to determine ambient occlusion and culling when rebuilding chunks for renderboolean
onBlockActivated(World world, BlockPos blockpos, IBlockState iblockstate, EntityPlayer var4, EnumFacing var5, float var6, float var7, float var8)
IBlockState
onBlockPlaced(World world, BlockPos blockpos, EnumFacing enumfacing, float var4, float var5, float var6, int var7, EntityLivingBase var8)
+ Called by ItemBlocks just before a block is actually set in the world, to allow for adjustments to the IBlockstatevoid
onNeighborBlockChange(World world, BlockPos blockpos, IBlockState iblockstate, Block var4)
+ Called when a neighboring block changes.void
setBlockBoundsBasedOnState(IBlockAccess iblockaccess, BlockPos blockpos)
void
setBlockBoundsForItemRender()
+ Sets the block's bounds for rendering it as an itemint
tickRate(World var1)
+ How many world ticks before ticking-
Methods inherited from class net.minecraft.block.Block
addCollisionBoxesToList, bootstrapStates, canCollideCheck, canDropFromExplosion, canReplace, canSilkHarvest, collisionRayTrace, colorMultiplier, colorMultiplier, createStackedBlock, damageDropped, disableStats, dropBlockAsItem, dropBlockAsItemWithChance, dropXpOnBlockBreak, fillWithRain, func_181623_g, getActualState, getAmbientOcclusionLightValue, getBlockBoundsMaxX, getBlockBoundsMaxY, getBlockBoundsMaxZ, getBlockBoundsMinX, getBlockBoundsMinY, getBlockBoundsMinZ, getBlockById, getBlockColor, getBlockFromItem, getBlockFromName, getBlockHardness, getBlockLayer, getBlockState, getComparatorInputOverride, getCreativeTabToDisplayOn, getDamageValue, getDefaultState, getEnableStats, getExplosionResistance, getIdFromBlock, getItem, getItemDropped, getLightOpacity, getLightValue, getLocalizedName, getMapColor, getMaterial, getMixedBrightnessForBlock, getMobilityFlag, getOffsetType, getPlayerRelativeBlockHardness, getRenderColor, getRenderType, getSelectedBoundingBox, getStateById, getStateForEntityRender, getStateId, getSubBlocks, getTickRandomly, getUnlocalizedName, getUseNeighborBrightness, harvestBlock, hasComparatorInputOverride, hasTileEntity, isAssociatedBlock, isBlockNormalCube, isBlockSolid, isCollidable, isEqualTo, isFlowerPot, isFullBlock, isNormalCube, isPassable, isReplaceable, isTranslucent, isVisuallyOpaque, loadPluginData, makePluginData, modifyAcceleration, onBlockAdded, onBlockClicked, onBlockDestroyedByExplosion, onBlockDestroyedByPlayer, onBlockEventReceived, onBlockHarvested, onBlockPlacedBy, onEntityCollidedWithBlock, onEntityCollidedWithBlock, onFallenUpon, onLanded, quantityDropped, quantityDroppedWithBonus, randomDisplayTick, randomTick, registerBlocks, requiresUpdates, setBlockBounds, setBlockUnbreakable, setCreativeTab, setDefaultState, setHardness, setLightLevel, setLightOpacity, setResistance, setStepSound, setTickRandomly, setUnlocalizedName, shouldSideBeRendered, spawnAsEntity, toString, updateTick
-
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
-
FACING
public static final PropertyDirection FACING
-
POWERED
public static final PropertyBool POWERED
-
-
Method Detail
-
getCollisionBoundingBox
public AxisAlignedBB getCollisionBoundingBox(World var1, BlockPos var2, IBlockState var3)
- Overrides:
getCollisionBoundingBox
in classBlock
-
tickRate
public int tickRate(World var1)
+ How many world ticks before ticking
-
isOpaqueCube
public boolean isOpaqueCube()
+ Used to determine ambient occlusion and culling when rebuilding chunks for render- Overrides:
isOpaqueCube
in classBlock
-
isFullCube
public boolean isFullCube()
- Overrides:
isFullCube
in classBlock
-
canPlaceBlockOnSide
public boolean canPlaceBlockOnSide(World world, BlockPos blockpos, EnumFacing enumfacing)
+ Check whether this Block can be placed on the given side- Overrides:
canPlaceBlockOnSide
in classBlock
-
canPlaceBlockAt
public boolean canPlaceBlockAt(World world, BlockPos blockpos)
- Overrides:
canPlaceBlockAt
in classBlock
-
func_181088_a
protected static boolean func_181088_a(World parWorld, BlockPos parBlockPos, EnumFacing parEnumFacing)
-
onBlockPlaced
public IBlockState onBlockPlaced(World world, BlockPos blockpos, EnumFacing enumfacing, float var4, float var5, float var6, int var7, EntityLivingBase var8)
+ Called by ItemBlocks just before a block is actually set in the world, to allow for adjustments to the IBlockstate- Overrides:
onBlockPlaced
in classBlock
-
onNeighborBlockChange
public void onNeighborBlockChange(World world, BlockPos blockpos, IBlockState iblockstate, Block var4)
+ Called when a neighboring block changes.- Overrides:
onNeighborBlockChange
in classBlock
-
setBlockBoundsBasedOnState
public void setBlockBoundsBasedOnState(IBlockAccess iblockaccess, BlockPos blockpos)
- Overrides:
setBlockBoundsBasedOnState
in classBlock
-
onBlockActivated
public boolean onBlockActivated(World world, BlockPos blockpos, IBlockState iblockstate, EntityPlayer var4, EnumFacing var5, float var6, float var7, float var8)
- Overrides:
onBlockActivated
in classBlock
-
breakBlock
public void breakBlock(World world, BlockPos blockpos, IBlockState iblockstate)
- Overrides:
breakBlock
in classBlock
-
getWeakPower
public int getWeakPower(IBlockAccess var1, BlockPos var2, IBlockState iblockstate, EnumFacing var4)
- Overrides:
getWeakPower
in classBlock
-
getStrongPower
public int getStrongPower(IBlockAccess var1, BlockPos var2, IBlockState iblockstate, EnumFacing enumfacing)
- Overrides:
getStrongPower
in classBlock
-
canProvidePower
public boolean canProvidePower()
+ Can this block provide power. Only wire currently seems to have this change based on its state.- Overrides:
canProvidePower
in classBlock
-
setBlockBoundsForItemRender
public void setBlockBoundsForItemRender()
+ Sets the block's bounds for rendering it as an item- Overrides:
setBlockBoundsForItemRender
in classBlock
-
getStateFromMeta
public IBlockState getStateFromMeta(int i)
+ Convert the given metadata into a BlockState for this Block- Overrides:
getStateFromMeta
in classBlock
-
getMetaFromState
public int getMetaFromState(IBlockState iblockstate)
+ Convert the BlockState into the correct metadata value- Overrides:
getMetaFromState
in classBlock
-
createBlockState
protected BlockState createBlockState()
- Overrides:
createBlockState
in classBlock
-
-