public class TargetBlock extends Block
Block.NeighborGroupAbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>| Modifier and Type | Field and Description |
|---|---|
private static IntProperty |
POWER |
LOGGER, STATE_IDS, stateManagercollidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier| Constructor and Description |
|---|
TargetBlock(AbstractBlock.Settings settings) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendProperties(StateManager.Builder<Block,BlockState> builder) |
private static int |
calculatePower(BlockHitResult blockHitResult,
Vec3d pos) |
boolean |
emitsRedstonePower(BlockState state) |
int |
getWeakRedstonePower(BlockState state,
BlockView world,
BlockPos pos,
Direction direction) |
void |
onBlockAdded(BlockState state,
World world,
BlockPos pos,
BlockState oldState,
boolean notify) |
void |
onProjectileHit(World world,
BlockState state,
BlockHitResult hit,
ProjectileEntity projectile) |
void |
scheduledTick(BlockState state,
ServerWorld world,
BlockPos pos,
Random random) |
private static void |
setPower(WorldAccess world,
BlockState state,
int power,
BlockPos pos,
int delay) |
private static int |
trigger(WorldAccess world,
BlockState state,
BlockHitResult blockHitResult,
Entity entity) |
addStacksForDisplay, afterBreak, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getPlacementState, getRawIdFromState, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, is, isFaceFullSquare, isIn, isShapeFullCube, isTranslucent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toStringcalcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canPlaceAt, canReplace, createScreenHandlerFactory, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMaterialColor, getDroppedStacks, getFluidState, getLootTableId, getOffsetType, getOpacity, getOutlineShape, getPistonBehavior, getRaycastShape, getRenderingSeed, getRenderType, getSidesShape, getStateForNeighborUpdate, getStrongRedstonePower, getVisualShape, hasBlockEntity, hasComparatorOutput, hasSidedTransparency, isSideInvisible, mirror, neighborUpdate, onBlockBreakStart, onEntityCollision, onStacksDropped, onStateReplaced, onSyncedBlockEvent, onUse, prepare, randomTick, rotateprivate static final IntProperty POWER
public TargetBlock(AbstractBlock.Settings settings)
public void onProjectileHit(World world, BlockState state, BlockHitResult hit, ProjectileEntity projectile)
onProjectileHit in class AbstractBlockprivate static int trigger(WorldAccess world, BlockState state, BlockHitResult blockHitResult, Entity entity)
private static int calculatePower(BlockHitResult blockHitResult, Vec3d pos)
private static void setPower(WorldAccess world, BlockState state, int power, BlockPos pos, int delay)
public void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random)
scheduledTick in class AbstractBlockpublic int getWeakRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction)
getWeakRedstonePower in class AbstractBlockpublic boolean emitsRedstonePower(BlockState state)
emitsRedstonePower in class AbstractBlockprotected void appendProperties(StateManager.Builder<Block,BlockState> builder)
appendProperties in class Blockpublic void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify)
onBlockAdded in class AbstractBlock