Block.replaced/replaceBlock -> replace (#1528)

* Block.replaced -> replaceBlock for consistency

It just delegates to replaceBlock with one constant parameter,
making it an overload. In addition, the method with the same signature
in 1.15 was called replaceBlock, so this matches that.

* Block.replaceBlock -> replace, add docs
This commit is contained in:
Juuxel 2020-07-03 15:21:03 +03:00 committed by GitHub
parent e9a00990e5
commit f17244efd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 25 additions and 2 deletions

View File

@ -25,12 +25,23 @@ CLASS net/minecraft/class_2248 net/minecraft/block/Block
METHOD method_23350 getJumpVelocityMultiplier ()F
METHOD method_27839 is (Lnet/minecraft/class_2248;)Z
ARG 1 block
METHOD method_30094 replaced (Lnet/minecraft/class_2680;Lnet/minecraft/class_2680;Lnet/minecraft/class_1936;Lnet/minecraft/class_2338;I)V
METHOD method_30094 replace (Lnet/minecraft/class_2680;Lnet/minecraft/class_2680;Lnet/minecraft/class_1936;Lnet/minecraft/class_2338;I)V
COMMENT Replaces the {@code state} with the {@code newState} at the {@code pos}.
COMMENT
COMMENT <p>If the two state objects are identical, this method does nothing.
COMMENT
COMMENT <p>If the new state {@linkplain BlockState#isAir() is air},
COMMENT breaks the block at the position instead.
ARG 0 state
COMMENT the existing block state
ARG 1 newState
COMMENT the new block state
ARG 2 world
COMMENT the world
ARG 3 pos
COMMENT the position of the replaced block state
ARG 4 flags
COMMENT the bitwise flags for {@link net.minecraft.world.ModifiableWorld#setBlockState(BlockPos, BlockState, int, int)}
METHOD method_9496 randomDisplayTick (Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Ljava/util/Random;)V
ARG 1 state
ARG 2 world
@ -185,13 +196,25 @@ CLASS net/minecraft/class_2248 net/minecraft/block/Block
ARG 0 state
ARG 2 pos
ARG 3 blockEntity
METHOD method_9611 replaceBlock (Lnet/minecraft/class_2680;Lnet/minecraft/class_2680;Lnet/minecraft/class_1936;Lnet/minecraft/class_2338;II)V
METHOD method_9611 replace (Lnet/minecraft/class_2680;Lnet/minecraft/class_2680;Lnet/minecraft/class_1936;Lnet/minecraft/class_2338;II)V
COMMENT Replaces the {@code state} with the {@code newState} at the {@code pos}.
COMMENT
COMMENT <p>If the two state objects are identical, this method does nothing.
COMMENT
COMMENT <p>If the new state {@linkplain BlockState#isAir() is air},
COMMENT breaks the block at the position instead.
ARG 0 state
COMMENT the existing block state
ARG 1 newState
COMMENT the new block state
ARG 2 world
COMMENT the world
ARG 3 pos
COMMENT the position of the replaced block state
ARG 4 flags
COMMENT the bitwise flags for {@link net.minecraft.world.ModifiableWorld#setBlockState(BlockPos, BlockState, int, int)}
ARG 5 maxUpdateDepth
COMMENT the limit for the cascading block updates
METHOD method_9614 isShapeFullCube (Lnet/minecraft/class_265;)Z
ARG 0 shape
CLASS 1