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.NeighborGroupNested 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 IntPropertyPOWERFields inherited from class net.minecraft.block.Block
LOGGER, STATE_IDS, stateManagerFields 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 voidappendProperties(StateManager.Builder<Block,BlockState> builder)private static intcalculatePower(BlockHitResult hitResult, Vec3d pos)booleanemitsRedstonePower(BlockState state)intgetWeakRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction)voidonBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify)voidonProjectileHit(World world, BlockState state, BlockHitResult hit, ProjectileEntity projectile)voidscheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random)private static voidsetPower(WorldAccess world, BlockState state, int power, BlockPos pos, int delay)private static inttrigger(WorldAccess world, BlockState state, BlockHitResult hitResult, 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, isFaceFullSquare, isShapeFullCube, isTranslucent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, randomDisplayTick, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toStringMethods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPathfindThrough, canPlaceAt, canReplace, createScreenHandlerFactory, getAmbientOcclusionLightLevel, getCollisionShape, getComparatorOutput, getCullingShape, getDefaultMapColor, getDroppedStacks, getFluidState, getLootTableId, getMaxModelOffset, getOffsetType, getOpacity, getOutlineShape, getPistonBehavior, getRaycastShape, getRenderingSeed, getRenderType, getSidesShape, getStateForNeighborUpdate, getStrongRedstonePower, getVisualShape, 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:
onProjectileHitin classAbstractBlock
-
trigger
private static int trigger(WorldAccess world, BlockState state, BlockHitResult hitResult, Entity entity) -
calculatePower
-
setPower
private static void setPower(WorldAccess world, BlockState state, int power, BlockPos pos, int delay) -
scheduledTick
- Overrides:
scheduledTickin classAbstractBlock
-
getWeakRedstonePower
public int getWeakRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction)- Overrides:
getWeakRedstonePowerin classAbstractBlock
-
emitsRedstonePower
- Overrides:
emitsRedstonePowerin classAbstractBlock
-
appendProperties
- Overrides:
appendPropertiesin classBlock
-
onBlockAdded
public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify)- Overrides:
onBlockAddedin classAbstractBlock
-