public class TripwireBlock extends Block
Block.NeighborGroup
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>
Modifier and Type | Field and Description |
---|---|
static BooleanProperty |
ATTACHED |
protected static VoxelShape |
ATTACHED_SHAPE |
protected static VoxelShape |
DETACHED_SHAPE |
static BooleanProperty |
DISARMED |
static BooleanProperty |
EAST |
private static Map<Direction,BooleanProperty> |
FACING_PROPERTIES |
private TripwireHookBlock |
hookBlock |
static BooleanProperty |
NORTH |
static BooleanProperty |
POWERED |
static BooleanProperty |
SOUTH |
static BooleanProperty |
WEST |
LOGGER, STATE_IDS, stateManager
collidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier
Constructor and Description |
---|
TripwireBlock(TripwireHookBlock hookBlock,
AbstractBlock.Settings settings) |
addStacksForDisplay, afterBreak, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, is, isFaceFullSquare, isIn, isShapeFullCube, isTranslucent, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toString
calcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canPlaceAt, canReplace, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMaterialColor, getDroppedStacks, getFluidState, getLootTableId, getOffsetType, getOpacity, getPistonBehavior, getRaycastShape, getRenderingSeed, getRenderType, getSidesShape, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasBlockEntity, hasComparatorOutput, hasSidedTransparency, isSideInvisible, neighborUpdate, onBlockBreakStart, onProjectileHit, onStacksDropped, onSyncedBlockEvent, onUse, prepare, randomTick
public static final BooleanProperty POWERED
public static final BooleanProperty ATTACHED
public static final BooleanProperty DISARMED
public static final BooleanProperty NORTH
public static final BooleanProperty EAST
public static final BooleanProperty SOUTH
public static final BooleanProperty WEST
private static final Map<Direction,BooleanProperty> FACING_PROPERTIES
protected static final VoxelShape ATTACHED_SHAPE
protected static final VoxelShape DETACHED_SHAPE
private final TripwireHookBlock hookBlock
public TripwireBlock(TripwireHookBlock hookBlock, AbstractBlock.Settings settings)
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)
getOutlineShape
in class AbstractBlock
public BlockState getPlacementState(ItemPlacementContext ctx)
getPlacementState
in class Block
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom)
getStateForNeighborUpdate
in class AbstractBlock
public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify)
onBlockAdded
in class AbstractBlock
public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved)
WorldChunk.setBlockState(BlockPos, BlockState, boolean)
if newState
is different from state
. Vanilla blocks perform removal cleanups here.onStateReplaced
in class AbstractBlock
public void onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player)
private void update(World world, BlockPos pos, BlockState state)
public void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity)
onEntityCollision
in class AbstractBlock
public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random)
scheduledTick
in class AbstractBlock
public boolean shouldConnectTo(BlockState state, Direction facing)
public BlockState rotate(BlockState state, BlockRotation rotation)
By default, this returns the provided block state.
rotate
in class AbstractBlock
public BlockState mirror(BlockState state, BlockMirror mirror)
mirror
in class AbstractBlock
protected void appendProperties(StateManager.Builder<Block,BlockState> builder)
appendProperties
in class Block