Package net.minecraft.block
Class TargetBlock
java.lang.Object
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.TargetBlock
- All Implemented Interfaces:
ItemConvertible
public class TargetBlock extends Block
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.NeighborGroup
Nested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>
-
Field Summary
Fields Modifier and Type Field Description private static IntProperty
POWER
Fields inherited from class net.minecraft.block.Block
LOGGER, STATE_IDS, stateManager
Fields inherited from class net.minecraft.block.AbstractBlock
collidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier
-
Constructor Summary
Constructors Constructor Description TargetBlock(AbstractBlock.Settings settings)
-
Method Summary
Modifier and Type Method 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)
Methods inherited from class net.minecraft.block.Block
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, toString
Methods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, 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, rotate
-
Field Details
-
POWER
-
-
Constructor Details
-
TargetBlock
-
-
Method Details
-
onProjectileHit
public void onProjectileHit(World world, BlockState state, BlockHitResult hit, ProjectileEntity projectile)- Overrides:
onProjectileHit
in classAbstractBlock
-
trigger
private static int trigger(WorldAccess world, BlockState state, BlockHitResult blockHitResult, Entity entity) -
calculatePower
-
setPower
private static void setPower(WorldAccess world, BlockState state, int power, BlockPos pos, int delay) -
scheduledTick
- Overrides:
scheduledTick
in classAbstractBlock
-
getWeakRedstonePower
public int getWeakRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction)- Overrides:
getWeakRedstonePower
in classAbstractBlock
-
emitsRedstonePower
- Overrides:
emitsRedstonePower
in classAbstractBlock
-
appendProperties
- Overrides:
appendProperties
in classBlock
-
onBlockAdded
public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify)- Overrides:
onBlockAdded
in classAbstractBlock
-