Package net.minecraft.block
Class RespawnAnchorBlock
java.lang.Object
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.RespawnAnchorBlock
- All Implemented Interfaces:
ItemConvertible
public class RespawnAnchorBlock extends Block
-
Nested Class Summary
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 static IntPropertyCHARGESFields inherited from class net.minecraft.block.AbstractBlock
collidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier -
Constructor Summary
Constructors Constructor Description RespawnAnchorBlock(AbstractBlock.Settings settings) -
Method Summary
Modifier and Type Method Description protected voidappendProperties(StateManager.Builder<Block,BlockState> builder)private static booleancanCharge(BlockState state)booleancanPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type)static voidcharge(World world, BlockPos pos, BlockState state)private voidexplode(BlockState state, World world, BlockPos explodedPos)static Optional<Vec3d>findRespawnPosition(EntityType<?> entity, WorldView world, BlockPos pos)intgetComparatorOutput(BlockState state, World world, BlockPos pos)static intgetLightLevel(BlockState state, int maxLevel)booleanhasComparatorOutput(BlockState state)private static booleanhasStillWater(BlockPos pos, World world)private static booleanisChargeItem(ItemStack stack)static booleanisNether(World world)ActionResultonUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit)voidrandomDisplayTick(BlockState state, World world, BlockPos pos, Random random)Methods inherited from class net.minecraft.block.Block
addStacksForDisplay, afterBreak, asBlock, asItem, buildTooltip, 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, isSideSolidFullSquare, isTranslucent, method_30094, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, pushEntitiesUpBeforeBlockChange, rainTick, replaceBlock, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toStringMethods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPlaceAt, canReplace, createScreenHandlerFactory, emitsRedstonePower, getAmbientOcclusionLightLevel, getCollisionShape, getCullingShape, getDefaultMaterialColor, getDroppedStacks, getFluidState, getLootTableId, getOffsetType, getOpacity, getOutlineShape, getPistonBehavior, getRayTraceShape, getRenderingSeed, getRenderType, getSidesShape, getStateForNeighborUpdate, getStrongRedstonePower, getVisualShape, getWeakRedstonePower, hasBlockEntity, hasSidedTransparency, isSideInvisible, mirror, neighborUpdate, onBlockAdded, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onStateReplaced, onSyncedBlockEvent, prepare, randomTick, rotate, scheduledTick
-
Field Details
-
Constructor Details
-
Method Details
-
onUse
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit)- Overrides:
onUsein classAbstractBlock
-
isChargeItem
-
canCharge
-
hasStillWater
-
explode
-
isNether
-
charge
-
randomDisplayTick
@Environment(CLIENT) public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random)- Overrides:
randomDisplayTickin classBlock
-
appendProperties
- Overrides:
appendPropertiesin classBlock
-
hasComparatorOutput
- Overrides:
hasComparatorOutputin classAbstractBlock
-
getLightLevel
-
getComparatorOutput
- Overrides:
getComparatorOutputin classAbstractBlock
-
findRespawnPosition
public static Optional<Vec3d> findRespawnPosition(EntityType<?> entity, WorldView world, BlockPos pos) -
canPathfindThrough
public boolean canPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type)- Overrides:
canPathfindThroughin classAbstractBlock
-