public abstract class BlockBasePressurePlate extends Block
Block.EnumOffsetType
IForgeRegistryEntry.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, useNeighborBrightness
delegate
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, withRotation
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
protected 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 Block
public int tickRate(World worldIn)
public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, IBlockAccess worldIn, BlockPos pos)
getCollisionBoundingBox
in class Block
public boolean isOpaqueCube(IBlockState state)
isOpaqueCube
in class Block
public boolean isFullCube(IBlockState state)
isFullCube
in class Block
public boolean isPassable(IBlockAccess worldIn, BlockPos pos)
isPassable
in class Block
public boolean canSpawnInBlock()
canSpawnInBlock
in class Block
public boolean canPlaceBlockAt(World worldIn, BlockPos pos)
canPlaceBlockAt
in class Block
public void neighborChanged(IBlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos)
neighborChanged
in class Block
public void randomTick(World worldIn, BlockPos pos, IBlockState state, java.util.Random random)
randomTick
in class Block
public void updateTick(World worldIn, BlockPos pos, IBlockState state, java.util.Random rand)
updateTick
in class Block
public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn)
onEntityCollidedWithBlock
in class Block
protected void updateState(World worldIn, BlockPos pos, IBlockState state, int oldRedstoneStrength)
public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
breakBlock
in class Block
protected void updateNeighbors(World worldIn, BlockPos pos)
public int getWeakPower(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
getWeakPower
in class Block
public int getStrongPower(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
getStrongPower
in class Block
public boolean canProvidePower(IBlockState state)
canProvidePower
in class Block
public EnumPushReaction getMobilityFlag(IBlockState state)
getMobilityFlag
in class Block
protected abstract int getRedstoneStrength(IBlockState state)
protected abstract IBlockState setRedstoneStrength(IBlockState state, int strength)