public class TripWireHookBlock extends Block
Block.OffsetType, Block.Properties, Block.RenderSideCacheKey
Modifier and Type | Field and Description |
---|---|
static BooleanProperty |
ATTACHED |
static DirectionProperty |
FACING |
protected static VoxelShape |
HOOK_EAST_AABB |
protected static VoxelShape |
HOOK_NORTH_AABB |
protected static VoxelShape |
HOOK_SOUTH_AABB |
protected static VoxelShape |
HOOK_WEST_AABB |
static BooleanProperty |
POWERED |
BLOCK_STATE_IDS, blockHardness, blockResistance, blocksMovement, lightValue, LOGGER, material, materialColor, RANDOM, soundType, stateContainer, ticksRandomly
delegate
Constructor and Description |
---|
TripWireHookBlock(Block.Properties properties) |
Modifier and Type | Method and Description |
---|---|
void |
calculateState(World worldIn,
BlockPos pos,
BlockState hookState,
boolean p_176260_4_,
boolean p_176260_5_,
int p_176260_6_,
BlockState p_176260_7_) |
boolean |
canProvidePower(BlockState state) |
protected void |
fillStateContainer(StateContainer.Builder<Block,BlockState> builder) |
VoxelShape |
getShape(BlockState state,
IBlockReader worldIn,
BlockPos pos,
ISelectionContext context) |
BlockState |
getStateForPlacement(BlockItemUseContext 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) |
BlockState |
mirror(BlockState state,
Mirror mirrorIn) |
private void |
notifyNeighbors(World worldIn,
BlockPos pos,
Direction side) |
void |
onBlockPlacedBy(World worldIn,
BlockPos pos,
BlockState state,
LivingEntity placer,
ItemStack stack) |
void |
onReplaced(BlockState state,
World worldIn,
BlockPos pos,
BlockState newState,
boolean isMoving) |
private void |
playSound(World worldIn,
BlockPos pos,
boolean p_180694_3_,
boolean p_180694_4_,
boolean p_180694_5_,
boolean p_180694_6_) |
BlockState |
rotate(BlockState state,
Rotation rot) |
void |
tick(BlockState state,
ServerWorld worldIn,
BlockPos pos,
java.util.Random rand) |
BlockState |
updatePostPlacement(BlockState stateIn,
Direction facing,
BlockState facingState,
IWorld worldIn,
BlockPos currentPos,
BlockPos facingPos) |
addInformation, allowsMovement, animateTick, asItem, canDropFromExplosion, canEntitySpawn, cannotAttach, canSpawnInBlock, canSustainPlant, causesSuffocation, doesSideFillSquare, dropXpOnBlockBreak, eventReceived, fillItemGroup, fillWithRain, getAmbientOcclusionLightValue, getBlockFromItem, getBlockHardness, getCollisionShape, getComparatorInputOverride, getContainer, getDefaultState, getDrops, getDrops, getDrops, getExplosionResistance, getFluidState, getHarvestLevel, getHarvestTool, getItem, getJumpFactor, getLightValue, getLootTable, getMaterial, getMaterialColor, getNameTextComponent, getOffset, getOffsetType, getOpacity, getPlayerRelativeBlockHardness, getPositionRandom, getPushReaction, getRaytraceShape, getRenderShape, getRenderType, getSlipperiness, getSlipperiness, getSoundType, getSpeedFactor, getStateById, getStateContainer, getStateId, getTags, getTranslationKey, getValidBlockForPosition, harvestBlock, hasComparatorInputOverride, hasEnoughSolidSide, hasSolidSide, hasSolidSideOnTop, hasTileEntity, isAir, isEmissiveRendering, isIn, isNormalCube, isOpaque, isOpaqueCube, isReplaceable, isReplaceable, isSideInvisible, isSolid, isTransparent, isVariableOpacity, isViewBlocking, makeCuboidShape, needsPostProcessing, neighborChanged, nudgeEntitiesWithNewState, onBlockActivated, onBlockAdded, onBlockClicked, onBlockHarvested, onEntityCollision, onEntityWalk, onExplosionDestroy, onFallenUpon, onLanded, onPlayerDestroy, onProjectileCollision, propagatesSkylightDown, randomTick, replaceBlock, setDefaultState, shouldSideBeRendered, spawnAdditionalDrops, spawnAsEntity, spawnDrops, spawnDrops, spawnDrops, tickRate, ticksRandomly, toString, updateDiagonalNeighbors, updateNeighbors
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addDestroyEffects, addHitEffects, addLandingEffects, addRunningEffects, beginLeaveDecay, canBeConnectedTo, canBeReplacedByLeaves, canBeReplacedByLogs, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, catchFire, collisionExtendsVertically, createTileEntity, 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, isConduitFrame, isFertile, isFireSource, isFlammable, isFoliage, isLadder, isPortalFrame, isReplaceableOreGen, isSlimeBlock, isStickyBlock, isToolEffective, observedNeighborChange, onBlockExploded, onNeighborChange, onPlantGrow, recolorBlock, removedByPlayer, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay
public static final DirectionProperty FACING
public static final BooleanProperty POWERED
public static final BooleanProperty ATTACHED
protected static final VoxelShape HOOK_NORTH_AABB
protected static final VoxelShape HOOK_SOUTH_AABB
protected static final VoxelShape HOOK_WEST_AABB
protected static final VoxelShape HOOK_EAST_AABB
public TripWireHookBlock(Block.Properties properties)
public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context)
public boolean isValidPosition(BlockState state, IWorldReader worldIn, BlockPos pos)
isValidPosition
in class Block
public BlockState updatePostPlacement(BlockState stateIn, Direction facing, BlockState facingState, IWorld worldIn, BlockPos currentPos, BlockPos facingPos)
updatePostPlacement
in class Block
@Nullable public BlockState getStateForPlacement(BlockItemUseContext context)
getStateForPlacement
in class Block
public void onBlockPlacedBy(World worldIn, BlockPos pos, BlockState state, LivingEntity placer, ItemStack stack)
onBlockPlacedBy
in class Block
public void calculateState(World worldIn, BlockPos pos, BlockState hookState, boolean p_176260_4_, boolean p_176260_5_, int p_176260_6_, @Nullable BlockState p_176260_7_)
public void tick(BlockState state, ServerWorld worldIn, BlockPos pos, java.util.Random rand)
private void playSound(World worldIn, BlockPos pos, boolean p_180694_3_, boolean p_180694_4_, boolean p_180694_5_, boolean p_180694_6_)
public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving)
onReplaced
in class Block
public int getWeakPower(BlockState blockState, IBlockReader blockAccess, BlockPos pos, Direction side)
getWeakPower
in class Block
public int getStrongPower(BlockState blockState, IBlockReader blockAccess, BlockPos pos, Direction side)
getStrongPower
in class Block
public boolean canProvidePower(BlockState state)
canProvidePower
in class Block
public BlockState rotate(BlockState state, Rotation rot)
public BlockState mirror(BlockState state, Mirror mirrorIn)
protected void fillStateContainer(StateContainer.Builder<Block,BlockState> builder)
fillStateContainer
in class Block