yarn/mappings/net/minecraft/item/BlockPredicatesChecker.mapping

30 lines
1.3 KiB
Plaintext

CLASS net/minecraft/class_6538 net/minecraft/item/BlockPredicatesChecker
COMMENT Checks if a block predicate stored inside {@link ItemStack}'s NBT
COMMENT matches the block in a world. The predicate must be stored inside
COMMENT the {@code key} sub NBT of the item stack.
COMMENT
COMMENT <p>The result is cached to reduce cost for successive lookups
COMMENT on the same block.
COMMENT
COMMENT @apiNote This is used to implement checks for restrictions specified
COMMENT using {@code CanPlaceOn} or {@code CanDestroy}.
FIELD field_34448 BLOCK_PREDICATE Lnet/minecraft/class_2252;
FIELD field_34449 key Ljava/lang/String;
FIELD field_34450 cachedPos Lnet/minecraft/class_2694;
FIELD field_34451 lastResult Z
FIELD field_34452 nbtAware Z
METHOD <init> (Ljava/lang/String;)V
ARG 1 key
COMMENT the sub NBT key that stores the predicate, for
COMMENT example {@code "CanPlaceOn"}
METHOD method_38070 check (Lnet/minecraft/class_1799;Lnet/minecraft/class_2378;Lnet/minecraft/class_2694;)Z
COMMENT {@return true if any of the predicates in the {@code stack}'s NBT
COMMENT matched against the block at {@code pos}, false otherwise}
ARG 1 stack
ARG 2 blockRegistry
ARG 3 pos
METHOD method_38071 canUseCache (Lnet/minecraft/class_2694;Lnet/minecraft/class_2694;Z)Z
ARG 0 pos
ARG 1 cachedPos
ARG 2 nbtAware