Minor javadoc updates around unpick (#2200)

* Minor javadoc updates around unpick

Signed-off-by: liach <liach@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>

Co-authored-by: liach <liach@users.noreply.github.com>
Co-authored-by: Juuxel <6596629+Juuxel@users.noreply.github.com>
This commit is contained in:
liach 2021-03-29 02:33:12 +07:00 committed by GitHub
parent 19df3cdfbf
commit ccf403e01b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 47 additions and 24 deletions

View File

@ -12,4 +12,4 @@ jobs:
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- uses: gradle/wrapper-validation-action@v1 - uses: gradle/wrapper-validation-action@v1
- run: ./gradlew build javadocJar checkMappings mapNamedJar --stacktrace - run: ./gradlew build javadocJar checkMappings --stacktrace

1
HEADER Normal file
View File

@ -0,0 +1 @@
This file is free for everyone to use under the Creative Commons Zero license.

View File

@ -24,6 +24,7 @@ plugins {
id 'base' id 'base'
id 'maven-publish' id 'maven-publish'
id 'java' // for jd gen id 'java' // for jd gen
id 'org.cadixdev.licenser' version '0.5.1'
} }
def minecraft_version = "21w11a" def minecraft_version = "21w11a"
@ -745,6 +746,12 @@ sourceSets {
constants constants
} }
license {
header file("HEADER")
sourceSets = [sourceSets.constants]
include '**/*.java'
}
task constantsJar(type: Jar) { task constantsJar(type: Jar) {
from sourceSets.constants.output from sourceSets.constants.output
archiveClassifier = "constants" archiveClassifier = "constants"
@ -933,7 +940,7 @@ javadoc {
addBooleanOption 'Xdoclint:reference', true addBooleanOption 'Xdoclint:reference', true
addBooleanOption 'Xdoclint:accessibility', true addBooleanOption 'Xdoclint:accessibility', true
} }
source fakeSourceDir source fileTree(fakeSourceDir) + sourceSets.constants.allJava
classpath = configurations.javadocClasspath.plus downloadMcLibs.outputs.files.asFileTree classpath = configurations.javadocClasspath.plus downloadMcLibs.outputs.files.asFileTree
finalizedBy { finalizedBy {

View File

@ -50,7 +50,8 @@ CLASS net/minecraft/class_2609 net/minecraft/block/entity/AbstractFurnaceBlockEn
METHOD method_17763 dropExperienceForRecipesUsed (Lnet/minecraft/class_3222;)V METHOD method_17763 dropExperienceForRecipesUsed (Lnet/minecraft/class_3222;)V
ARG 1 player ARG 1 player
METHOD method_26395 isNonFlammableWood (Lnet/minecraft/class_1792;)Z METHOD method_26395 isNonFlammableWood (Lnet/minecraft/class_1792;)Z
COMMENT Returns whether the provided {@code item} is in the {@linkplain ItemTags#NON_FLAMMABLE_WOOD} tag. COMMENT Returns whether the provided {@code item} is in the {@link
COMMENT net.minecraft.tag.ItemTags#NON_FLAMMABLE_WOOD non_flammable_wood} tag.
ARG 0 item ARG 0 item
METHOD method_27354 getRecipesUsedAndDropExperience (Lnet/minecraft/class_3218;Lnet/minecraft/class_243;)Ljava/util/List; METHOD method_27354 getRecipesUsedAndDropExperience (Lnet/minecraft/class_3218;Lnet/minecraft/class_243;)Ljava/util/List;
ARG 1 world ARG 1 world

View File

@ -11,16 +11,9 @@ CLASS net/minecraft/class_1945 net/minecraft/world/ModifiableWorld
COMMENT change persisted across loads. It's recommended to check whether this world is client before COMMENT change persisted across loads. It's recommended to check whether this world is client before
COMMENT interacting with the world in this way.</p> COMMENT interacting with the world in this way.</p>
COMMENT COMMENT
COMMENT <p>Accepted values of the flags are a bitset combination of the following:</p> COMMENT <p>For the accepted values of the flags, see {@link net.fabricmc.yarn.constants.SetBlockStateFlags}.
COMMENT <ul> COMMENT
COMMENT <li>0b0000001 // 1 - PROPAGATE_CHANGE - Propagates a change event to surrounding blocks.</li> COMMENT @see net.fabricmc.yarn.constants.SetBlockStateFlags
COMMENT <li>0b0000010 // 2 - NOTIFY_LISTENERS - Notifies listeners and clients who need to react when the block changes</li>
COMMENT <li>0b0000100 // 4 - NO_REDRAW - Used in conjunction with NOTIFY_LISTENERS to suppress the render pass on clients.</li>
COMMENT <li>0b0001000 // 8 - REDRAW_ON_MAIN_THREAD - Forces a synchronous redraw on clients.</li>
COMMENT <li>0b0010000 // 16 - FORCE_STATE - Bypass virtual block state changes and forces the passed state to be stored as-is.</li>
COMMENT <li>0b0100000 // 32 - SKIP_DROPS - Prevents the previous block (container) from dropping items when destroyed.</li>
COMMENT <li>0b1000000 // 64 - MOVED - Signals that the current block is being moved to a different location, usually because of a piston.</li>
COMMENT </ul>
ARG 1 pos ARG 1 pos
COMMENT the target position COMMENT the target position
ARG 2 state ARG 2 state
@ -51,16 +44,10 @@ CLASS net/minecraft/class_1945 net/minecraft/world/ModifiableWorld
COMMENT change persisted across loads. It's recommended to check whether this world is client before COMMENT change persisted across loads. It's recommended to check whether this world is client before
COMMENT interacting with the world in this way.</p> COMMENT interacting with the world in this way.</p>
COMMENT COMMENT
COMMENT <p>Accepted values of the flags are a bitset combination of the following:</p> COMMENT <p>For the accepted values of the flags, see {@link net.fabricmc.yarn.constants.SetBlockStateFlags}.
COMMENT <ul> COMMENT
COMMENT <li>0b0000001 // 1 - PROPAGATE_CHANGE - Propagates a change event to surrounding blocks.</li> COMMENT @see #setBlockState(BlockPos, BlockState, int, int)
COMMENT <li>0b0000010 // 2 - NOTIFY_LISTENERS - Notifies listeners and clients who need to react when the block changes</li> COMMENT @see net.fabricmc.yarn.constants.SetBlockStateFlags
COMMENT <li>0b0000100 // 4 - NO_REDRAW - Used in conjunction with NOTIFY_LISTENERS to suppress the render pass on clients.</li>
COMMENT <li>0b0001000 // 8 - REDRAW_ON_MAIN_THREAD - Forces a synchronous redraw on clients.</li>
COMMENT <li>0b0010000 // 16 - FORCE_STATE - Bypass virtual block state changes and forces the passed state to be stored as-is.</li>
COMMENT <li>0b0100000 // 32 - SKIP_DROPS - Prevents the previous block (container) from dropping items when destroyed.</li>
COMMENT <li>0b1000000 // 64 - MOVED - Signals that the current block is being moved to a different location, usually because of a piston.</li>
COMMENT </ul>
ARG 1 pos ARG 1 pos
COMMENT the target position COMMENT the target position
ARG 2 state ARG 2 state

View File

@ -1,5 +1,19 @@
/*
* This file is free for everyone to use under the Creative Commons Zero license.
*/
package net.fabricmc.yarn.constants; package net.fabricmc.yarn.constants;
/**
* A few flag bits for the {@code flag} argument of {@code world.setBlockState(pos, state, flag)}
* and other related block state setting methods.
*
* <p>The accepted values of the {@code flag} argument is usually a bitset combination of the
* fields in this class.
*
* @see net.minecraft.world.ModifiableWorld#setBlockState(net.minecraft.util.math.BlockPos,
* net.minecraft.block.BlockState, int)
*/
public final class SetBlockStateFlags { public final class SetBlockStateFlags {
/** /**
* Propagates a change event to surrounding blocks. * Propagates a change event to surrounding blocks.
@ -17,7 +31,7 @@ public final class SetBlockStateFlags {
public static final int DEFAULT = PROPAGATE_CHANGE | NOTIFY_LISTENERS; public static final int DEFAULT = PROPAGATE_CHANGE | NOTIFY_LISTENERS;
/** /**
* Used in conjunction with {@link NOTIFY_LISTENERS} to suppress the render pass on clients. * Used in conjunction with {@link #NOTIFY_LISTENERS} to suppress the render pass on clients.
*/ */
public static final int NO_REDRAW = 4; public static final int NO_REDRAW = 4;

View File

@ -0,0 +1,13 @@
/*
* This file is free for everyone to use under the Creative Commons Zero license.
*/
/**
* Provides a few classes holding constants that possibly existed for better understanding
* of the Minecraft codebase.
*
* <p><strong>Warning:</strong> These classes are absent at runtime. They are exclusively
* for use during compile time, in which the Java Compiler will replace the field references
* with <a href="{@docRoot}/constant-values.html#net.fabricmc">constant values</a>.
*/
package net.fabricmc.yarn.constants;