Add some block documentation (#2667)

This commit is contained in:
enbrain 2021-09-08 20:21:01 +09:00 committed by GitHub
parent be93b866e1
commit ea5508aff0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 0 deletions

View File

@ -1,4 +1,19 @@
CLASS net/minecraft/class_2248 net/minecraft/block/Block
COMMENT Represents a block that can be placed in a world.
COMMENT
COMMENT <p>There is exactly one instance for every type of block. Every stone
COMMENT block for example in a world shares the same block instance. Each block
COMMENT instance is registered under {@link net.minecraft.util.registry.Registry#BLOCK}.
COMMENT See {@link Blocks} for examples of block instances.
COMMENT
COMMENT <p>An item corresponding to a block is not automatically created. You
COMMENT may create your own {@link net.minecraft.item.BlockItem} and register it
COMMENT under {@link net.minecraft.util.registry.Registry#ITEM}.
COMMENT
COMMENT <p>The translation key for the block name is determined by {@link
COMMENT #getTranslationKey}.
COMMENT
COMMENT @see <a href="https://minecraft.fandom.com/wiki/Model">Model - Official Minecraft Wiki</a>
FIELD field_10638 LOGGER Lorg/apache/logging/log4j/Logger;
FIELD field_10642 translationKey Ljava/lang/String;
FIELD field_10646 defaultState Lnet/minecraft/class_2680;
@ -124,6 +139,12 @@ CLASS net/minecraft/class_2248 net/minecraft/block/Block
ARG 1 explosion
METHOD method_9538 canMobSpawnInside ()Z
METHOD method_9539 getTranslationKey ()Ljava/lang/String;
COMMENT {@return the translation key for the name of this block}
COMMENT
COMMENT <p>By default, it returns {@code block.namespace.path} where {@code
COMMENT namespace} and {@code path} are of the identifier used for registering
COMMENT this block, but {@code /} in {@code path} is replaced with {@code .}.
COMMENT If the block is not registered, it returns {@code block.unregistered_sadface}.
METHOD method_9541 createCuboidShape (DDDDDD)Lnet/minecraft/class_265;
ARG 0 minX
ARG 2 minY

View File

@ -1,4 +1,5 @@
CLASS net/minecraft/class_2246 net/minecraft/block/Blocks
COMMENT Contains all the minecraft blocks.
METHOD method_26104 (Lnet/minecraft/class_2680;)I
ARG 0 state
METHOD method_26105 (Lnet/minecraft/class_2680;)I

View File

@ -1,4 +1,6 @@
CLASS net/minecraft/class_1747 net/minecraft/item/BlockItem
COMMENT Represents an item corresponding to a block. Using this item places a
COMMENT block in the world.
FIELD field_30849 BLOCK_ENTITY_TAG_KEY Ljava/lang/String;
FIELD field_30850 BLOCK_STATE_TAG_KEY Ljava/lang/String;
FIELD field_7901 block Lnet/minecraft/class_2248;