public abstract class BlockBasePressurePlate extends Block
Block.EnumOffsetTypeIForgeRegistryEntry.Impl<T extends IForgeRegistryEntry<T>>| Modifier and Type | Field and Description |
|---|---|
protected static AxisAlignedBB |
PRESSED_AABB
The bounding box for the pressure plate pressed state
|
protected static AxisAlignedBB |
PRESSURE_AABB
This bounding box is used to check for entities in a certain area and then determine the pressed state.
|
protected static AxisAlignedBB |
UNPRESSED_AABB |
BLOCK_STATE_IDS, blockHardness, blockMapColor, blockMaterial, blockParticleGravity, blockResistance, blockSoundType, blockState, capturedDrops, captureDrops, enableStats, FULL_BLOCK_AABB, fullBlock, harvesters, isBlockContainer, lightOpacity, lightValue, needsRandomTick, NULL_AABB, RANDOM, REGISTRY, slipperiness, translucent, useNeighborBrightnessdelegate| Modifier | Constructor and Description |
|---|---|
protected |
BlockBasePressurePlate(Material materialIn) |
protected |
BlockBasePressurePlate(Material materialIn,
MapColor mapColorIn) |
| Modifier and Type | Method and Description |
|---|---|
void |
breakBlock(World worldIn,
BlockPos pos,
IBlockState state)
Called serverside after this block is replaced with another in Chunk, but before the Tile Entity is updated
|
boolean |
canPlaceBlockAt(World worldIn,
BlockPos pos) |
boolean |
canProvidePower(IBlockState state)
Can this block provide power.
|
boolean |
canSpawnInBlock()
Return true if an entity can be spawned inside the block (used to get the player's bed spawn location)
|
protected abstract int |
computeRedstoneStrength(World worldIn,
BlockPos pos) |
AxisAlignedBB |
getBoundingBox(IBlockState state,
IBlockAccess source,
BlockPos pos) |
AxisAlignedBB |
getCollisionBoundingBox(IBlockState blockState,
IBlockAccess worldIn,
BlockPos pos) |
EnumPushReaction |
getMobilityFlag(IBlockState state) |
protected abstract int |
getRedstoneStrength(IBlockState state) |
int |
getStrongPower(IBlockState blockState,
IBlockAccess blockAccess,
BlockPos pos,
EnumFacing side) |
int |
getWeakPower(IBlockState blockState,
IBlockAccess blockAccess,
BlockPos pos,
EnumFacing side) |
boolean |
isFullCube(IBlockState state) |
boolean |
isOpaqueCube(IBlockState state)
Used to determine ambient occlusion and culling when rebuilding chunks for render
|
boolean |
isPassable(IBlockAccess worldIn,
BlockPos pos) |
void |
neighborChanged(IBlockState state,
World worldIn,
BlockPos pos,
Block blockIn,
BlockPos fromPos)
Called when a neighboring block was changed and marks that this state should perform any checks during a neighbor
change.
|
void |
onEntityCollidedWithBlock(World worldIn,
BlockPos pos,
IBlockState state,
Entity entityIn)
Called When an Entity Collided with the Block
|
protected abstract void |
playClickOffSound(World worldIn,
BlockPos pos) |
protected abstract void |
playClickOnSound(World worldIn,
BlockPos color) |
void |
randomTick(World worldIn,
BlockPos pos,
IBlockState state,
java.util.Random random)
Called randomly when setTickRandomly is set to true (used by e.g.
|
protected abstract IBlockState |
setRedstoneStrength(IBlockState state,
int strength) |
int |
tickRate(World worldIn)
How many world ticks before ticking
|
protected void |
updateNeighbors(World worldIn,
BlockPos pos)
Notify block and block below of changes
|
protected void |
updateState(World worldIn,
BlockPos pos,
IBlockState state,
int oldRedstoneStrength)
Updates the pressure plate when stepped on
|
void |
updateTick(World worldIn,
BlockPos pos,
IBlockState state,
java.util.Random rand) |
addCollisionBoxToList, addCollisionBoxToList, addDestroyEffects, addHitEffects, addInformation, addLandingEffects, beginLeavesDecay, canBeConnectedTo, canBeReplacedByLeaves, canCollideCheck, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canEntitySpawn, canHarvestBlock, canPlaceBlockOnSide, canPlaceTorchOnTop, canRenderInLayer, canSilkHarvest, canSilkHarvest, canSustainLeaves, canSustainPlant, captureDrops, causesSuffocation, collisionRayTrace, createBlockState, createTileEntity, damageDropped, disableStats, doesSideBlockRendering, dropBlockAsItem, dropBlockAsItemWithChance, dropXpOnBlockBreak, eventReceived, fillWithRain, getActualState, getAiPathNodeType, getAmbientOcclusionLightValue, getBeaconColorMultiplier, getBedDirection, getBedSpawnPosition, getBlockById, getBlockFromItem, getBlockFromName, getBlockHardness, getBlockLayer, getBlockState, getComparatorInputOverride, getCreativeTabToDisplayOn, getDefaultState, getDrops, getEnableStats, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getExplosionResistance, getExtendedState, getFireSpreadSpeed, getFlammability, getHarvestLevel, getHarvestTool, getIdFromBlock, getItem, getItemDropped, getLightOpacity, getLightOpacity, getLightValue, getLightValue, getLocalizedName, getMapColor, getMaterial, getMetaFromState, getOffset, getOffsetType, getPackedLightmapCoords, getPickBlock, getPlayerRelativeBlockHardness, getRenderType, getSelectedBoundingBox, getSilkTouchDrop, getSoundType, getSoundType, getStateById, getStateForPlacement, getStateForPlacement, getStateFromMeta, getStateId, getSubBlocks, getTickRandomly, getUnlocalizedName, getUseNeighborBrightness, getValidRotations, getWeakChanges, harvestBlock, hasComparatorInputOverride, hasCustomBreakingProgress, hasTileEntity, hasTileEntity, isAABBInsideMaterial, isAir, isAssociatedBlock, isBeaconBase, isBed, isBedFoot, isBlockNormalCube, isBlockSolid, isBurning, isCollidable, isEntityInsideMaterial, isEqualTo, isFertile, isFireSource, isFlammable, isFoliage, isFullBlock, isFullyOpaque, isLadder, isLeaves, isNormalCube, isNormalCube, isReplaceable, isReplaceableOreGen, isSideSolid, isToolEffective, isTranslucent, isWood, modifyAcceleration, observedNeighborChange, onBlockActivated, onBlockAdded, onBlockClicked, onBlockDestroyedByExplosion, onBlockDestroyedByPlayer, onBlockExploded, onBlockHarvested, onBlockPlacedBy, onEntityWalk, onFallenUpon, onLanded, onNeighborChange, onPlantGrow, quantityDropped, quantityDropped, quantityDroppedWithBonus, randomDisplayTick, rayTrace, recolorBlock, registerBlocks, removedByPlayer, requiresUpdates, rotateBlock, setBedOccupied, setBlockUnbreakable, setCreativeTab, setDefaultState, setHardness, setHarvestLevel, setHarvestLevel, setLightLevel, setLightOpacity, setResistance, setSoundType, setTickRandomly, setUnlocalizedName, shouldCheckWeakPower, shouldSideBeRendered, spawnAsEntity, toString, withMirror, withRotationgetRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNameprotected static final AxisAlignedBB PRESSED_AABB
protected static final AxisAlignedBB UNPRESSED_AABB
protected static final AxisAlignedBB PRESSURE_AABB
protected BlockBasePressurePlate(Material materialIn)
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)
getBoundingBox in class Blockpublic int tickRate(World worldIn)
public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, IBlockAccess worldIn, BlockPos pos)
getCollisionBoundingBox in class Blockpublic boolean isOpaqueCube(IBlockState state)
isOpaqueCube in class Blockpublic boolean isFullCube(IBlockState state)
isFullCube in class Blockpublic boolean isPassable(IBlockAccess worldIn, BlockPos pos)
isPassable in class Blockpublic boolean canSpawnInBlock()
canSpawnInBlock in class Blockpublic boolean canPlaceBlockAt(World worldIn, BlockPos pos)
canPlaceBlockAt in class Blockpublic void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos)
neighborChanged in class Blockpublic void randomTick(World worldIn, BlockPos pos, IBlockState state, java.util.Random random)
randomTick in class Blockpublic void updateTick(World worldIn, BlockPos pos, IBlockState state, java.util.Random rand)
updateTick in class Blockpublic void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn)
onEntityCollidedWithBlock in class Blockprotected void updateState(World worldIn, BlockPos pos, IBlockState state, int oldRedstoneStrength)
public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
breakBlock in class Blockprotected void updateNeighbors(World worldIn, BlockPos pos)
public int getWeakPower(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
getWeakPower in class Blockpublic int getStrongPower(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
getStrongPower in class Blockpublic boolean canProvidePower(IBlockState state)
canProvidePower in class Blockpublic EnumPushReaction getMobilityFlag(IBlockState state)
getMobilityFlag in class Blockprotected abstract int getRedstoneStrength(IBlockState state)
protected abstract IBlockState setRedstoneStrength(IBlockState state, int strength)