Document what deprecated means in AbstractBlock (#2952)

* Document what deprecated means in AbstractBlock

* Link to the exact part we need

Co-authored-by: liach <7806504+liach@users.noreply.github.com>

Co-authored-by: liach <7806504+liach@users.noreply.github.com>
This commit is contained in:
enbrain 2022-01-03 03:54:35 +09:00 committed by GitHub
parent e5c08239d1
commit 204202f752
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 56 additions and 0 deletions

View File

@ -1,4 +1,14 @@
CLASS net/minecraft/class_4970 net/minecraft/block/AbstractBlock
COMMENT An abstract class that defines some logic for {@link Block blocks}.
COMMENT
COMMENT <p id="deprecated-methods">Deprecated methods in this class mean they
COMMENT should only be called from the corresponding method in {@link
COMMENT AbstractBlockState} or subclasses of this class. In vanilla subclasses,
COMMENT these methods are called either to do the default behavior (e.g.
COMMENT {@code super.onUse(...)}) or to delegate logic to other blocks (e.g.
COMMENT {@link net.minecraft.block.StairsBlock#randomTick
COMMENT StairsBlock#randomTick} calls {@code randomTick} of its base block).
COMMENT It's fine to override them, as they are overridden by vanilla blocks.
FIELD field_23154 dynamicBounds Z
FIELD field_23155 settings Lnet/minecraft/class_4970$class_2251;
FIELD field_23156 lootTableId Lnet/minecraft/class_2960;
@ -15,22 +25,27 @@ CLASS net/minecraft/class_4970 net/minecraft/block/AbstractBlock
ARG 1 settings
METHOD method_16841 getOffsetType ()Lnet/minecraft/class_4970$class_2250;
METHOD method_17454 createScreenHandlerFactory (Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Lnet/minecraft/class_3908;
COMMENT @deprecated Consider calling {@link AbstractBlockState#createScreenHandlerFactory} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 world
ARG 3 pos
METHOD method_19286 onProjectileHit (Lnet/minecraft/class_1937;Lnet/minecraft/class_2680;Lnet/minecraft/class_3965;Lnet/minecraft/class_1676;)V
COMMENT @deprecated Consider calling {@link AbstractBlockState#onProjectileHit} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 world
ARG 2 state
ARG 3 hit
ARG 4 projectile
METHOD method_22358 canBucketPlace (Lnet/minecraft/class_2680;Lnet/minecraft/class_3611;)Z
COMMENT @deprecated Consider calling {@link AbstractBlockState#canBucketPlace} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 fluid
METHOD method_25959 getSidesShape (Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)Lnet/minecraft/class_265;
COMMENT @deprecated Consider calling {@link AbstractBlockState#getSidesShape} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 world
ARG 3 pos
METHOD method_26159 getCameraCollisionShape (Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_3726;)Lnet/minecraft/class_265;
COMMENT @deprecated Consider calling {@link AbstractBlockState#getCameraCollisionShape} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 world
ARG 3 pos
@ -42,48 +57,60 @@ CLASS net/minecraft/class_4970 net/minecraft/block/AbstractBlock
METHOD method_36555 getHardness ()F
METHOD method_37247 getVerticalModelOffsetMultiplier ()F
METHOD method_37403 isShapeFullCube (Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)Z
COMMENT @deprecated Consider calling {@link AbstractBlockState#isFullCube} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 world
ARG 3 pos
METHOD method_8389 asItem ()Lnet/minecraft/class_1792;
METHOD method_9498 hasComparatorOutput (Lnet/minecraft/class_2680;)Z
COMMENT @deprecated Consider calling {@link AbstractBlockState#hasComparatorOutput} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
METHOD method_9505 getOpacity (Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)I
COMMENT @deprecated Consider calling {@link AbstractBlockState#getOpacity} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 world
ARG 3 pos
METHOD method_9506 emitsRedstonePower (Lnet/minecraft/class_2680;)Z
COMMENT @deprecated Consider calling {@link AbstractBlockState#emitsRedstonePower} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
METHOD method_9514 randomTick (Lnet/minecraft/class_2680;Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Ljava/util/Random;)V
COMMENT @deprecated Consider calling {@link AbstractBlockState#randomTick} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 world
ARG 3 pos
ARG 4 random
METHOD method_9516 canPathfindThrough (Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_10;)Z
COMMENT @deprecated Consider calling {@link AbstractBlockState#canPathfindThrough} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 world
ARG 3 pos
ARG 4 type
METHOD method_9517 prepare (Lnet/minecraft/class_2680;Lnet/minecraft/class_1936;Lnet/minecraft/class_2338;II)V
COMMENT @deprecated Consider calling {@link AbstractBlockState#prepare(WorldAccess, BlockPos, int, int)} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 world
ARG 3 pos
ARG 4 flags
ARG 5 maxUpdateDepth
METHOD method_9522 isSideInvisible (Lnet/minecraft/class_2680;Lnet/minecraft/class_2680;Lnet/minecraft/class_2350;)Z
COMMENT @deprecated Consider calling {@link AbstractBlockState#isSideInvisible} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 stateFrom
ARG 3 direction
METHOD method_9524 getWeakRedstonePower (Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;)I
COMMENT @deprecated Consider calling {@link AbstractBlockState#getWeakRedstonePower} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 world
ARG 3 pos
ARG 4 direction
METHOD method_9526 hasSidedTransparency (Lnet/minecraft/class_2680;)Z
COMMENT @deprecated Consider calling {@link AbstractBlockState#hasSidedTransparency} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
METHOD method_9527 getPistonBehavior (Lnet/minecraft/class_2680;)Lnet/minecraft/class_3619;
COMMENT @deprecated Consider calling {@link AbstractBlockState#getPistonBehavior} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
METHOD method_9530 getOutlineShape (Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_3726;)Lnet/minecraft/class_265;
COMMENT @deprecated Consider calling {@link AbstractBlockState#getOutlineShape(BlockView, BlockPos, ShapeContext)} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 world
ARG 3 pos
@ -98,6 +125,8 @@ CLASS net/minecraft/class_4970 net/minecraft/block/AbstractBlock
COMMENT <p>If the action result is successful on a logical client, then the action will be sent to the logical server for processing.
COMMENT
COMMENT @return an action result that specifies if using the block was successful.
COMMENT
COMMENT @deprecated Consider calling {@link AbstractBlockState#onUse} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 world
ARG 3 pos
@ -105,28 +134,35 @@ CLASS net/minecraft/class_4970 net/minecraft/block/AbstractBlock
ARG 5 hand
ARG 6 hit
METHOD method_9535 getRenderingSeed (Lnet/minecraft/class_2680;Lnet/minecraft/class_2338;)J
COMMENT @deprecated Consider calling {@link AbstractBlockState#getRenderingSeed} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 pos
METHOD method_9536 onStateReplaced (Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Z)V
COMMENT Called in {@link net.minecraft.world.chunk.WorldChunk#setBlockState(BlockPos, BlockState, boolean)} if {@code newState} is different from {@code state}. Vanilla blocks perform removal cleanups here.
COMMENT
COMMENT @deprecated Consider calling {@link AbstractBlockState#onStateReplaced} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 world
ARG 3 pos
ARG 4 newState
ARG 5 moved
METHOD method_9545 getFluidState (Lnet/minecraft/class_2680;)Lnet/minecraft/class_3610;
COMMENT @deprecated Consider calling {@link AbstractBlockState#getFluidState} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
METHOD method_9548 onEntityCollision (Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1297;)V
COMMENT @deprecated Consider calling {@link AbstractBlockState#onEntityCollision} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 world
ARG 3 pos
ARG 4 entity
METHOD method_9549 getCollisionShape (Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_3726;)Lnet/minecraft/class_265;
COMMENT @deprecated Consider calling {@link AbstractBlockState#getCollisionShape(BlockView, BlockPos, ShapeContext)} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 world
ARG 3 pos
ARG 4 context
METHOD method_9558 canPlaceAt (Lnet/minecraft/class_2680;Lnet/minecraft/class_4538;Lnet/minecraft/class_2338;)Z
COMMENT @deprecated Consider calling {@link AbstractBlockState#canPlaceAt} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 world
ARG 3 pos
@ -134,6 +170,8 @@ CLASS net/minecraft/class_4970 net/minecraft/block/AbstractBlock
COMMENT Gets the possibly updated block state of this block when a neighboring block is updated.
COMMENT
COMMENT @return the new state of this block
COMMENT
COMMENT @deprecated Consider calling {@link AbstractBlockState#getStateForNeighborUpdate} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
COMMENT the state of this block
ARG 2 direction
@ -147,44 +185,54 @@ CLASS net/minecraft/class_4970 net/minecraft/block/AbstractBlock
ARG 6 neighborPos
COMMENT the position of the neighbor block
METHOD method_9560 getDroppedStacks (Lnet/minecraft/class_2680;Lnet/minecraft/class_47$class_48;)Ljava/util/List;
COMMENT @deprecated Consider calling {@link AbstractBlockState#getDroppedStacks} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 builder
METHOD method_9565 onStacksDropped (Lnet/minecraft/class_2680;Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Lnet/minecraft/class_1799;)V
COMMENT @deprecated Consider calling {@link AbstractBlockState#onStacksDropped} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 world
ARG 3 pos
ARG 4 stack
METHOD method_9569 mirror (Lnet/minecraft/class_2680;Lnet/minecraft/class_2415;)Lnet/minecraft/class_2680;
COMMENT @deprecated Consider calling {@link AbstractBlockState#mirror} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 mirror
METHOD method_9571 getCullingShape (Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)Lnet/minecraft/class_265;
COMMENT @deprecated Consider calling {@link AbstractBlockState#getCullingShape} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 world
ARG 3 pos
METHOD method_9572 getComparatorOutput (Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)I
COMMENT @deprecated Consider calling {@link AbstractBlockState#getComparatorOutput} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 world
ARG 3 pos
METHOD method_9575 getAmbientOcclusionLightLevel (Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)F
COMMENT @deprecated Consider calling {@link AbstractBlockState#getAmbientOcclusionLightLevel} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 world
ARG 3 pos
METHOD method_9584 getRaycastShape (Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)Lnet/minecraft/class_265;
COMMENT @deprecated Consider calling {@link AbstractBlockState#getRaycastShape} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 world
ARG 3 pos
METHOD method_9588 scheduledTick (Lnet/minecraft/class_2680;Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Ljava/util/Random;)V
COMMENT @deprecated Consider calling {@link AbstractBlockState#scheduledTick} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 world
ARG 3 pos
ARG 4 random
METHOD method_9592 onSyncedBlockEvent (Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;II)Z
COMMENT @deprecated Consider calling {@link AbstractBlockState#onSyncedBlockEvent} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 world
ARG 3 pos
ARG 4 type
ARG 5 data
METHOD method_9594 calcBlockBreakingDelta (Lnet/minecraft/class_2680;Lnet/minecraft/class_1657;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;)F
COMMENT @deprecated Consider calling {@link AbstractBlockState#calcBlockBreakingDelta} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 player
ARG 3 world
@ -195,21 +243,27 @@ CLASS net/minecraft/class_4970 net/minecraft/block/AbstractBlock
COMMENT <p>By default, this returns the provided block state.
COMMENT
COMMENT @return the rotated block state
COMMENT
COMMENT @deprecated Consider calling {@link AbstractBlockState#rotate} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 rotation
METHOD method_9603 getStrongRedstonePower (Lnet/minecraft/class_2680;Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_2350;)I
COMMENT @deprecated Consider calling {@link AbstractBlockState#getStrongRedstonePower} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 world
ARG 3 pos
ARG 4 direction
METHOD method_9604 getRenderType (Lnet/minecraft/class_2680;)Lnet/minecraft/class_2464;
COMMENT @deprecated Consider calling {@link AbstractBlockState#getRenderType} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
METHOD method_9606 onBlockBreakStart (Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;)V
COMMENT @deprecated Consider calling {@link AbstractBlockState#onBlockBreakStart} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 world
ARG 3 pos
ARG 4 player
METHOD method_9612 neighborUpdate (Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2248;Lnet/minecraft/class_2338;Z)V
COMMENT @deprecated Consider calling {@link AbstractBlockState#neighborUpdate} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 world
ARG 3 pos
@ -217,12 +271,14 @@ CLASS net/minecraft/class_4970 net/minecraft/block/AbstractBlock
ARG 5 fromPos
ARG 6 notify
METHOD method_9615 onBlockAdded (Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Z)V
COMMENT @deprecated Consider calling {@link AbstractBlockState#onBlockAdded} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 world
ARG 3 pos
ARG 4 oldState
ARG 5 notify
METHOD method_9616 canReplace (Lnet/minecraft/class_2680;Lnet/minecraft/class_1750;)Z
COMMENT @deprecated Consider calling {@link AbstractBlockState#canReplace} instead. See <a href="#deprecated-methods">the class javadoc</a>.
ARG 1 state
ARG 2 context
CLASS class_2250 OffsetType