public abstract class AbstractPressurePlateBlock extends Block
Block.OffsetType, Block.Properties, Block.RenderSideCacheKey| Modifier and Type | Field and Description |
|---|---|
protected static VoxelShape |
PRESSED_AABB |
protected static AxisAlignedBB |
PRESSURE_AABB |
protected static VoxelShape |
UNPRESSED_AABB |
BLOCK_STATE_IDS, blockHardness, blockResistance, blocksMovement, lightValue, LOGGER, material, materialColor, RANDOM, soundType, stateContainer, ticksRandomlydelegate| Modifier | Constructor and Description |
|---|---|
protected |
AbstractPressurePlateBlock(Block.Properties properties) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canProvidePower(BlockState state) |
boolean |
canSpawnInBlock() |
protected abstract int |
computeRedstoneStrength(World worldIn,
BlockPos pos) |
PushReaction |
getPushReaction(BlockState state) |
protected abstract int |
getRedstoneStrength(BlockState state) |
VoxelShape |
getShape(BlockState state,
IBlockReader worldIn,
BlockPos pos,
ISelectionContext context) |
int |
getStrongPower(BlockState blockState,
IBlockReader blockAccess,
BlockPos pos,
Direction side) |
int |
getWeakPower(BlockState blockState,
IBlockReader blockAccess,
BlockPos pos,
Direction side) |
boolean |
isValidPosition(BlockState state,
IWorldReader worldIn,
BlockPos pos) |
void |
onEntityCollision(BlockState state,
World worldIn,
BlockPos pos,
Entity entityIn) |
void |
onReplaced(BlockState state,
World worldIn,
BlockPos pos,
BlockState newState,
boolean isMoving) |
protected abstract void |
playClickOffSound(IWorld worldIn,
BlockPos pos) |
protected abstract void |
playClickOnSound(IWorld worldIn,
BlockPos pos) |
protected abstract BlockState |
setRedstoneStrength(BlockState state,
int strength) |
void |
tick(BlockState state,
World worldIn,
BlockPos pos,
java.util.Random random) |
int |
tickRate(IWorldReader worldIn) |
protected void |
updateNeighbors(World worldIn,
BlockPos pos) |
BlockState |
updatePostPlacement(BlockState stateIn,
Direction facing,
BlockState facingState,
IWorld worldIn,
BlockPos currentPos,
BlockPos facingPos) |
protected void |
updateState(World worldIn,
BlockPos pos,
BlockState state,
int oldRedstoneStrength) |
addInformation, allowsMovement, animateTick, asItem, canDropFromExplosion, canEntitySpawn, cannotAttach, canSustainPlant, causesSuffocation, doesSideFillSquare, dropXpOnBlockBreak, eventReceived, fillItemGroup, fillStateContainer, fillWithRain, func_220055_a, func_220064_c, func_220074_n, func_220080_a, getBlockFromItem, getBlockHardness, getCollisionShape, getComparatorInputOverride, getContainer, getDefaultState, getDrops, getDrops, getDrops, getExplosionResistance, getFluidState, getHarvestLevel, getHarvestTool, getItem, getLightValue, getLootTable, getMaterial, getMaterialColor, getNameTextComponent, getOffset, getOffsetType, getOpacity, getPackedLightmapCoords, getPlayerRelativeBlockHardness, getPositionRandom, getRaytraceShape, getRenderLayer, getRenderShape, getRenderType, getSlipperiness, getSlipperiness, getSoundType, getStateById, getStateContainer, getStateForPlacement, getStateId, getTags, getTranslationKey, getValidBlockForPosition, harvestBlock, hasComparatorInputOverride, hasCustomBreakingProgress, hasSolidSide, hasTileEntity, isAir, isDirt, isIn, isNormalCube, isOpaque, isOpaqueCube, isReplaceable, isRock, isSideInvisible, isSolid, isVariableOpacity, makeCuboidShape, mirror, needsPostProcessing, neighborChanged, nudgeEntitiesWithNewState, onBlockActivated, onBlockAdded, onBlockClicked, onBlockHarvested, onBlockPlacedBy, onEntityWalk, onExplosionDestroy, onFallenUpon, onLanded, onPlayerDestroy, onProjectileCollision, propagatesSkylightDown, randomTick, replaceBlock, rotate, setDefaultState, shouldSideBeRendered, spawnAdditionalDrops, spawnAsEntity, spawnDrops, spawnDrops, spawnDrops, spawnDrops, ticksRandomly, toString, updateDiagonalNeighbors, updateNeighborsgetRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddDestroyEffects, addHitEffects, addLandingEffects, addRunningEffects, beginLeaveDecay, canBeConnectedTo, canBeReplacedByLeaves, canBeReplacedByLogs, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canRenderInLayer, catchFire, collisionExtendsVertically, createTileEntity, doesSideBlockRendering, getAiPathNodeType, getBeaconColorMultiplier, getBedDirection, getBedSpawnPosition, getBlock, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getExtendedState, getFireSpreadSpeed, getFlammability, getFogColor, getLightValue, getPickBlock, getRayTraceResult, getSoundType, getStateAtViewpoint, getStateForPlacement, getValidRotations, getWeakChanges, hasTileEntity, isAir, isBeaconBase, isBed, isBedFoot, isBurning, isFertile, isFireSource, isFlammable, isFoliage, isLadder, isPortalFrame, isReplaceableOreGen, isStickyBlock, isToolEffective, observedNeighborChange, onBlockExploded, onNeighborChange, onPlantGrow, recolorBlock, removedByPlayer, rotate, setBedOccupied, shouldCheckWeakPowerprotected static final VoxelShape PRESSED_AABB
protected static final VoxelShape UNPRESSED_AABB
protected static final AxisAlignedBB PRESSURE_AABB
protected AbstractPressurePlateBlock(Block.Properties properties)
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context)
public int tickRate(IWorldReader worldIn)
public boolean canSpawnInBlock()
canSpawnInBlock in class Blockpublic BlockState updatePostPlacement(BlockState stateIn, Direction facing, BlockState facingState, IWorld worldIn, BlockPos currentPos, BlockPos facingPos)
updatePostPlacement in class Blockpublic boolean isValidPosition(BlockState state, IWorldReader worldIn, BlockPos pos)
isValidPosition in class Blockpublic void tick(BlockState state, World worldIn, BlockPos pos, java.util.Random random)
public void onEntityCollision(BlockState state, World worldIn, BlockPos pos, Entity entityIn)
onEntityCollision in class Blockprotected void updateState(World worldIn, BlockPos pos, BlockState state, int oldRedstoneStrength)
public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving)
onReplaced in class Blockpublic int getWeakPower(BlockState blockState, IBlockReader blockAccess, BlockPos pos, Direction side)
getWeakPower in class Blockpublic int getStrongPower(BlockState blockState, IBlockReader blockAccess, BlockPos pos, Direction side)
getStrongPower in class Blockpublic boolean canProvidePower(BlockState state)
canProvidePower in class Blockpublic PushReaction getPushReaction(BlockState state)
getPushReaction in class Blockprotected abstract int getRedstoneStrength(BlockState state)
protected abstract BlockState setRedstoneStrength(BlockState state, int strength)