Javadocs, bug fixes, etc

This commit is contained in:
apple502j 2024-01-19 22:55:19 +09:00
parent 18c6d1e9e0
commit f4898111b9
No known key found for this signature in database
GPG Key ID: 2A69798565A099A9
12 changed files with 68 additions and 43 deletions

View File

@ -384,8 +384,8 @@ CLASS net/minecraft/class_4970 net/minecraft/block/AbstractBlock
ARG 1 state
METHOD method_9514 randomTick (Lnet/minecraft/class_2680;Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;Lnet/minecraft/class_5819;)V
COMMENT Called server-side when a block gets ticked randomly. This can be overridden to implement
COMMENT various logics, most commonly plant growth. Default implementation calls
COMMENT {@link #scheduledTick}. To control the rate of the action, use {@code random}.
COMMENT various logics, most commonly plant growth. Default implementation does
COMMENT nothing. To control the rate of the action, use {@code random}.
COMMENT
COMMENT <p>Random tick speed is controlled by the game rule {@link
COMMENT net.minecraft.world.GameRules#RANDOM_TICK_SPEED randomTickSpeed} and can be disabled.
@ -693,16 +693,14 @@ CLASS net/minecraft/class_4970 net/minecraft/block/AbstractBlock
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 @see @link AbstractBlockState#getRaycastShape
COMMENT @see AbstractBlockState#getRaycastShape
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;Lnet/minecraft/class_5819;)V
COMMENT Called server-side when a block receives a scheduled tick. This can be used like a timer.
COMMENT Scheduled ticks are added using {@link
COMMENT WorldAccess#scheduleBlockTick(BlockPos, Block, int)}. Additionally, {@link
COMMENT #randomTick} by default calls this method; override {@link #randomTick} to disable this
COMMENT behavior.
COMMENT WorldAccess#scheduleBlockTick(BlockPos, Block, int)}.
COMMENT
COMMENT <p>Scheduled ticks are often used inside {@link #getStateForNeighborUpdate}.
COMMENT

View File

@ -129,7 +129,7 @@ CLASS net/minecraft/class_5620 net/minecraft/block/cauldron/CauldronBehavior
METHOD method_32210 emptyCauldron (Lnet/minecraft/class_2680;Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_1657;Lnet/minecraft/class_1268;Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;Ljava/util/function/Predicate;Lnet/minecraft/class_3414;)Lnet/minecraft/class_9062;
COMMENT Empties a cauldron if it's full.
COMMENT
COMMENT @return a {@linkplain ItemActionResult#isAccepted successful} action result if emptied, {@link ItemActionResult#ASS_TO_DEFAULT_BLOCK_INTERACTION} otherwise
COMMENT @return a {@linkplain ItemActionResult#isAccepted successful} action result if emptied, {@link ItemActionResult#PASS_TO_DEFAULT_BLOCK_INTERACTION} otherwise
ARG 0 state
COMMENT the cauldron block state
ARG 1 world

View File

@ -17,7 +17,7 @@ CLASS net/minecraft/class_2306 net/minecraft/command/EntitySelectorOptions
METHOD method_9919 (Lnet/minecraft/class_1299;ZLnet/minecraft/class_1297;)Z
ARG 2 entity
METHOD method_9920 (Ljava/lang/String;ZLnet/minecraft/class_1297;)Z
ARG 2 readerx
ARG 2 entity
METHOD method_9921 (Lnet/minecraft/class_2303;Lcom/mojang/brigadier/suggestion/SuggestionsBuilder;Ljava/util/function/Consumer;)Ljava/util/concurrent/CompletableFuture;
ARG 1 builder
ARG 2 consumer

View File

@ -690,7 +690,7 @@ CLASS net/minecraft/class_1297 net/minecraft/entity/Entity
METHOD method_32876 emitGameEvent (Lnet/minecraft/class_6880;)V
COMMENT Emits a game event originating from this entity at this entity's position.
COMMENT
COMMENT @see #emitGameEvent(GameEvent, Entity)
COMMENT @see #emitGameEvent(RegistryEntry, Entity)
ARG 1 event
METHOD method_33189 occludeVibrationSignals ()Z
COMMENT {@return whether the entity should not emit vibrations}

View File

@ -41,7 +41,7 @@ CLASS net/minecraft/class_1291 net/minecraft/entity/effect/StatusEffect
METHOD method_55651 (Ljava/util/function/BiConsumer;ILnet/minecraft/class_6880;Lnet/minecraft/class_1291$class_8634;)V
ARG 3 attribute
ARG 4 modifier
METHOD method_55652 getFadeOutTicks ()I
METHOD method_55652 getFadeTicks ()I
METHOD method_5566 addAttributeModifier (Lnet/minecraft/class_6880;Ljava/lang/String;DLnet/minecraft/class_1322$class_1323;)Lnet/minecraft/class_1291;
ARG 1 attribute
ARG 2 uuid

View File

@ -63,8 +63,13 @@ CLASS net/minecraft/class_1657 net/minecraft/entity/player/PlayerEntity
ARG 6 refreshable
METHOD method_17355 openHandledScreen (Lnet/minecraft/class_3908;)Ljava/util/OptionalInt;
ARG 1 factory
METHOD method_17356 playSound (Lnet/minecraft/class_3414;Lnet/minecraft/class_3419;FF)V
ARG 1 event
METHOD method_17356 playSoundToPlayer (Lnet/minecraft/class_3414;Lnet/minecraft/class_3419;FF)V
COMMENT Plays {@code sound} to this player <strong>only</strong>.
COMMENT
COMMENT <p>Use {@link #playSound(SoundEvent, float, float)} to play sound that can be heard by
COMMENT nearby players. Unlike that method, this method should be called on only one side
COMMENT (i.e. either the server or the client, alone).
ARG 1 sound
ARG 2 category
ARG 3 volume
ARG 4 pitch
@ -140,14 +145,26 @@ CLASS net/minecraft/class_1657 net/minecraft/entity/player/PlayerEntity
METHOD method_55754 getBlockInteractionRange ()D
METHOD method_55755 getEntityInteractionRange ()D
METHOD method_56092 canInteractWithEntityIn (Lnet/minecraft/class_238;D)Z
COMMENT {@return whether the player can interact with entity whose bounding box
COMMENT is {@code box}}
ARG 1 box
ARG 2 range
ARG 2 additionalRange
COMMENT the player's additional interaction range added to {@linkplain
COMMENT #getEntityInteractionRange the default range}
METHOD method_56093 canInteractWithBlockAt (Lnet/minecraft/class_2338;D)Z
COMMENT {@return whether the player can interact with block at {@code pos}}
ARG 1 pos
ARG 2 range
ARG 2 additionalRange
COMMENT the player's additional interaction range added to {@linkplain
COMMENT #getBlockInteractionRange the default range}
METHOD method_56094 canInteractWithEntity (Lnet/minecraft/class_1297;D)Z
COMMENT {@return whether the player can interact with {@code entity}}
COMMENT
COMMENT <p>This returns {@code false} for {@linkplain Entity#isRemoved removed} entities.
ARG 1 entity
ARG 2 range
ARG 2 additionalRange
COMMENT the player's additional interaction range added to {@linkplain
COMMENT #getEntityInteractionRange the default range}
METHOD method_7254 unlockRecipes (Ljava/util/Collection;)I
ARG 1 recipes
METHOD method_7255 addExperience (I)V

View File

@ -323,7 +323,7 @@ CLASS net/minecraft/class_1792 net/minecraft/item/Item
COMMENT <p>Tools and melee weapons should override this to damage the stack.
COMMENT
COMMENT @return whether the item's use stat should be incremented
COMMENT @see ItemStack#damage(int, LivingEntity, java.util.function.Consumer)
COMMENT @see ItemStack#damage(int, LivingEntity, EquipmentSlot)
ARG 1 stack
ARG 2 target
ARG 3 attacker
@ -347,7 +347,7 @@ CLASS net/minecraft/class_1792 net/minecraft/item/Item
COMMENT
COMMENT @return whether the item's use stat should be incremented
COMMENT @see net.minecraft.block.AbstractBlock.AbstractBlockState#getHardness
COMMENT @see ItemStack#damage(int, LivingEntity, java.util.function.Consumer)
COMMENT @see ItemStack#damage(int, LivingEntity, EquipmentSlot)
ARG 1 stack
ARG 2 world
ARG 3 state

View File

@ -259,6 +259,14 @@ CLASS net/minecraft/class_1799 net/minecraft/item/ItemStack
METHOD method_55067 (Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/kinds/App;
ARG 0 instance
METHOD method_56098 isUnbreakable ()Z
COMMENT {@return whether the item stack can never be broken}
COMMENT
COMMENT <p>Item stacks with {@value #UNBREAKABLE_KEY} NBT set to {@code 1b} cannot be damaged.
COMMENT
COMMENT @see Item#getMaxDamage
COMMENT @see #isDamaged
COMMENT @see #getDamage
COMMENT @see #isDamageable
METHOD method_7909 getItem ()Lnet/minecraft/class_1792;
COMMENT {@return the item of this stack}
COMMENT
@ -454,24 +462,23 @@ CLASS net/minecraft/class_1799 net/minecraft/item/ItemStack
COMMENT {@return a text consisting of the bracketed {@linkplain #getName stack name} that
COMMENT can be hovered to show the item stack's tooltip}
METHOD method_7956 damage (ILnet/minecraft/class_5819;Lnet/minecraft/class_3222;Ljava/lang/Runnable;)V
COMMENT Damages this item stack. This method should be used when an entity, including a player,
COMMENT damages the stack. This does not damage {@linkplain #isDamageable non-damageable}
COMMENT Damages this item stack. This method should be used when a non-entity, such as a
COMMENT dispenser, damages the stack. This does not damage {@linkplain #isDamageable non-damageable}
COMMENT stacks, and the {@linkplain net.minecraft.enchantment.UnbreakingEnchantment
COMMENT unbreaking enchantment} is applied to {@code amount} before damaging. Additionally,
COMMENT if {@code entity} is a player in creative mode, the stack will not be damaged.
COMMENT unbreaking enchantment} is applied to {@code amount} before damaging.
COMMENT
COMMENT <p>If {@code entity} is a player, this triggers {@link
COMMENT <p>If {@code player} is not {@code null}, this triggers {@link
COMMENT net.minecraft.advancement.criterion.Criteria#ITEM_DURABILITY_CHANGED}.
COMMENT
COMMENT <p>If the stack's damage is equal to or above {@linkplain Item#getMaxDamage the maximum
COMMENT damage} (i.e. the item is "broken"), this will call {@code breakCallback}, decrement the
COMMENT stack, and increment {@link net.minecraft.stat.Stats#BROKEN} if the stack is held
COMMENT by a player. The callback should call {@link LivingEntity#sendEquipmentBreakStatus}
COMMENT or {@link LivingEntity#sendToolBreakStatus}.
COMMENT <p>When the item "breaks", that is, the stack's damage is equal to or above
COMMENT {@linkplain Item#getMaxDamage the maximum damage}, {@code breakCallback} is run.
COMMENT Callers should decrement the stack size inside the callback.
ARG 1 amount
ARG 2 random
ARG 3 entity
ARG 3 player
COMMENT the player that damaged the stack, or {@code null} if no player is involved
ARG 4 breakCallback
COMMENT a callback run when the item "breaks"
METHOD method_7958 hasGlint ()Z
METHOD method_7959 setSubNbt (Ljava/lang/String;Lnet/minecraft/class_2520;)V
COMMENT Sets the given NBT element in the item stack's custom NBT at the specified key.
@ -498,6 +505,7 @@ CLASS net/minecraft/class_1799 net/minecraft/item/ItemStack
COMMENT @see Item#getMaxDamage
COMMENT @see #isDamaged
COMMENT @see #getDamage
COMMENT @see #isUnbreakable
METHOD method_7964 getName ()Lnet/minecraft/class_2561;
COMMENT {@return the custom name of the stack if it exists, or the item's name}
METHOD method_7965 getBobbingAnimationTime ()I
@ -509,22 +517,24 @@ CLASS net/minecraft/class_1799 net/minecraft/item/ItemStack
COMMENT
COMMENT @see <a href="#nbt-operations">Item Stack NBT Operations</a>
METHOD method_7970 damage (ILnet/minecraft/class_1309;Lnet/minecraft/class_1304;)V
COMMENT Damages this item stack. This method should be used when a non-entity, such as a
COMMENT dispenser, damages the stack. This does not damage {@linkplain #isDamageable non-damageable}
COMMENT Damages this item stack. This method should be used when an entity, including a player,
COMMENT damages the stack. This does not damage {@linkplain #isDamageable non-damageable}
COMMENT stacks, and the {@linkplain net.minecraft.enchantment.UnbreakingEnchantment
COMMENT unbreaking enchantment} is applied to {@code amount} before damaging.
COMMENT unbreaking enchantment} is applied to {@code amount} before damaging. Additionally,
COMMENT if {@code entity} is a player in creative mode, the stack will not be damaged.
COMMENT
COMMENT <p>If {@code player} is not {@code null}, this triggers {@link
COMMENT <p>If {@code entity} is a player, this triggers {@link
COMMENT net.minecraft.advancement.criterion.Criteria#ITEM_DURABILITY_CHANGED}.
COMMENT
COMMENT <p>This method does not decrement the item count when the item "breaks". Callers should
COMMENT check the returned value and decrement themselves.
COMMENT
COMMENT @return whether the stack's damage is equal to or above {@linkplain Item#getMaxDamage
COMMENT the maximum damage} (i.e. whether the item is "broken")
COMMENT <p>If the stack's damage is equal to or above {@linkplain Item#getMaxDamage the maximum
COMMENT damage} (i.e. the item is "broken"), this will {@linkplain
COMMENT LivingEntity#sendEquipmentBreakStatus send the equipment break status}, decrement the
COMMENT stack, and increment {@link net.minecraft.stat.Stats#BROKEN} if the stack is held
COMMENT by a player.
ARG 1 amount
ARG 2 entity
ARG 3 slot
COMMENT the slot in which the stack is held
METHOD method_7971 split (I)Lnet/minecraft/class_1799;
COMMENT {@return the copy of the stack "split" from the current stack with item count
COMMENT being at most {@code amount}}
@ -558,11 +568,11 @@ CLASS net/minecraft/class_1799 net/minecraft/item/ItemStack
COMMENT Sets the stack's damage to {@code damage}.
COMMENT
COMMENT <p>This does not break the item if the damage reaches {@linkplain Item#getMaxDamage
COMMENT the maximum}, unlike {@link #damage(int, LivingEntity, Consumer)}.
COMMENT the maximum}, unlike {@link #damage(int, LivingEntity, EquipmentSlot)}.
COMMENT
COMMENT @see #getDamage
COMMENT @see #damage(int, Random, ServerPlayerEntity)
COMMENT @see #damage(int, LivingEntity, Consumer)
COMMENT @see #damage(int, Random, ServerPlayerEntity, Runnable)
COMMENT @see #damage(int, LivingEntity, EquipmentSlot)
ARG 1 damage
METHOD method_7976 getUseAction ()Lnet/minecraft/class_1839;
METHOD method_7977 setCustomName (Lnet/minecraft/class_2561;)Lnet/minecraft/class_1799;

View File

@ -21,7 +21,6 @@ CLASS net/minecraft/class_1863 net/minecraft/recipe/RecipeManager
COMMENT
COMMENT @throws com.google.gson.JsonParseException if the recipe JSON is invalid
COMMENT @return the read recipe
COMMENT @see RecipeSerializer#read
ARG 0 id
COMMENT the recipe's ID
ARG 1 json

View File

@ -285,6 +285,8 @@ CLASS net/minecraft/class_2378 net/minecraft/registry/Registry
METHOD method_55841 getEntry (Lnet/minecraft/class_2960;)Ljava/util/Optional;
ARG 1 id
METHOD method_56159 getRandomEntry (Lnet/minecraft/class_6862;Lnet/minecraft/class_5819;)Ljava/util/Optional;
COMMENT {@return a random entry from {@code tag}, or an empty {@link Optional} if the
COMMENT tag is empty}
ARG 1 tag
ARG 2 random
METHOD method_56160 (Lnet/minecraft/class_5819;Lnet/minecraft/class_6885$class_6888;)Ljava/util/Optional;

View File

@ -102,7 +102,7 @@ CLASS net/minecraft/class_6088 net/minecraft/world/WorldEvents
COMMENT An item is composted in a composter.
COMMENT <br>Plays the appropriate composting sound event and spawns composter particles.
COMMENT <p>A {@code 1} should be passed as extra data if the use of the composter added to the level of compost inside.
COMMENT <p>Called by {@link net.minecraft.block.ComposterBlock#onUse(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.entity.player.PlayerEntity, net.minecraft.util.Hand, net.minecraft.util.hit.BlockHitResult) ComposterBlock#onUse},
COMMENT <p>Called by {@link net.minecraft.block.ComposterBlock#onUse(net.minecraft.block.BlockState, net.minecraft.world.World, net.minecraft.util.math.BlockPos, net.minecraft.entity.player.PlayerEntity, net.minecraft.util.hit.BlockHitResult) ComposterBlock#onUse},
COMMENT {@link net.minecraft.block.ComposterBlock.ComposterInventory#markDirty() ComposterBlock.ComposterInventory#markDirty},
COMMENT and {@link net.minecraft.entity.ai.brain.task.FarmerWorkTask#syncComposterEvent(net.minecraft.server.world.ServerWorld, net.minecraft.block.BlockState, net.minecraft.util.math.BlockPos, net.minecraft.block.BlockState) FarmerWorkTask#syncComposterEvent}
FIELD field_31138 LAVA_EXTINGUISHED I

View File

@ -68,7 +68,6 @@ constant world_events net/minecraft/world/WorldEvents SNIFFER_EGG_CRACKS
constant world_events net/minecraft/world/WorldEvents CRAFTER_CRAFTS
constant world_events net/minecraft/world/WorldEvents CRAFTER_FAILS
constant world_events net/minecraft/world/WorldEvents CRAFTER_SHOOTS
constant world_events net/minecraft/world/WorldEvents GUST_DUST
constant world_events net/minecraft/world/WorldEvents TRIAL_SPAWNER_SPAWNS_MOB
constant world_events net/minecraft/world/WorldEvents TRIAL_SPAWNER_SPAWNS_MOB_AT_SPAWN_POS
constant world_events net/minecraft/world/WorldEvents TRIAL_SPAWNER_DETECTS_PLAYER