Package net.minecraft.component.type
Record Class ToolComponent.Rule
java.lang.Object
java.lang.Record
net.minecraft.component.type.ToolComponent.Rule
- Record Components:
blocks-speed-correctForDrops-
- Enclosing class:
ToolComponent
public static record ToolComponent.Rule(RegistryEntryList<Block> blocks, Optional<Float> speed, Optional<Boolean> correctForDrops)
extends Record
- Mappings:
Namespace Name named net/minecraft/component/type/ToolComponent$Ruleintermediary net/minecraft/class_9424$class_9425official cxx$anamed blocksintermediary comp_2501official cnamed speedintermediary comp_2502official dnamed correctForDropsintermediary comp_2503official e
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final RegistryEntryList<Block> The field for theblocksrecord component.static final com.mojang.serialization.Codec<ToolComponent.Rule> The field for thecorrectForDropsrecord component.static final PacketCodec<RegistryByteBuf, ToolComponent.Rule> The field for thespeedrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionblocks()Returns the value of theblocksrecord component.Returns the value of thecorrectForDropsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static ToolComponent.Ruleprivate static ToolComponent.Rulestatic ToolComponent.Ruleprivate static ToolComponent.Rulestatic ToolComponent.RuleofAlwaysDropping(List<Block> blocks, float speed) static ToolComponent.RuleofAlwaysDropping(TagKey<Block> blocks, float speed) static ToolComponent.RuleofNeverDropping(TagKey<Block> tag) speed()Returns the value of thespeedrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
blocks
The field for theblocksrecord component. -
speed
The field for thespeedrecord component. -
correctForDrops
The field for thecorrectForDropsrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/component/type/ToolComponent$Rule;CODEC:Lcom/mojang/serialization/Codec;intermediary field_50011Lnet/minecraft/class_9424$class_9425;field_50011:Lcom/mojang/serialization/Codec;official aLcxx$a;a:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/component/type/ToolComponent$Rule;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_50012Lnet/minecraft/class_9424$class_9425;field_50012:Lnet/minecraft/class_9139;official bLcxx$a;b:Lyx;
-
-
Constructor Details
-
Rule
-
-
Method Details
-
ofAlwaysDropping
- Mappings:
Namespace Name Mixin selector named ofAlwaysDroppingLnet/minecraft/component/type/ToolComponent$Rule;ofAlwaysDropping(Ljava/util/List;F)Lnet/minecraft/component/type/ToolComponent$Rule;intermediary method_58431Lnet/minecraft/class_9424$class_9425;method_58431(Ljava/util/List;F)Lnet/minecraft/class_9424$class_9425;official aLcxx$a;a(Ljava/util/List;F)Lcxx$a;
-
ofAlwaysDropping
- Mappings:
Namespace Name Mixin selector named ofAlwaysDroppingLnet/minecraft/component/type/ToolComponent$Rule;ofAlwaysDropping(Lnet/minecraft/registry/tag/TagKey;F)Lnet/minecraft/component/type/ToolComponent$Rule;intermediary method_58428Lnet/minecraft/class_9424$class_9425;method_58428(Lnet/minecraft/class_6862;F)Lnet/minecraft/class_9424$class_9425;official aLcxx$a;a(Lawu;F)Lcxx$a;
-
ofNeverDropping
- Mappings:
Namespace Name Mixin selector named ofNeverDroppingLnet/minecraft/component/type/ToolComponent$Rule;ofNeverDropping(Lnet/minecraft/registry/tag/TagKey;)Lnet/minecraft/component/type/ToolComponent$Rule;intermediary method_58427Lnet/minecraft/class_9424$class_9425;method_58427(Lnet/minecraft/class_6862;)Lnet/minecraft/class_9424$class_9425;official aLcxx$a;a(Lawu;)Lcxx$a;
-
of
- Mappings:
Namespace Name Mixin selector named ofLnet/minecraft/component/type/ToolComponent$Rule;of(Lnet/minecraft/registry/tag/TagKey;F)Lnet/minecraft/component/type/ToolComponent$Rule;intermediary method_58433Lnet/minecraft/class_9424$class_9425;method_58433(Lnet/minecraft/class_6862;F)Lnet/minecraft/class_9424$class_9425;official bLcxx$a;b(Lawu;F)Lcxx$a;
-
of
- Mappings:
Namespace Name Mixin selector named ofLnet/minecraft/component/type/ToolComponent$Rule;of(Ljava/util/List;F)Lnet/minecraft/component/type/ToolComponent$Rule;intermediary method_58434Lnet/minecraft/class_9424$class_9425;method_58434(Ljava/util/List;F)Lnet/minecraft/class_9424$class_9425;official bLcxx$a;b(Ljava/util/List;F)Lcxx$a;
-
of
private static ToolComponent.Rule of(TagKey<Block> tag, Optional<Float> speed, Optional<Boolean> correctForDrops) - Mappings:
Namespace Name Mixin selector named ofLnet/minecraft/component/type/ToolComponent$Rule;of(Lnet/minecraft/registry/tag/TagKey;Ljava/util/Optional;Ljava/util/Optional;)Lnet/minecraft/component/type/ToolComponent$Rule;intermediary method_58429Lnet/minecraft/class_9424$class_9425;method_58429(Lnet/minecraft/class_6862;Ljava/util/Optional;Ljava/util/Optional;)Lnet/minecraft/class_9424$class_9425;official aLcxx$a;a(Lawu;Ljava/util/Optional;Ljava/util/Optional;)Lcxx$a;
-
of
private static ToolComponent.Rule of(List<Block> blocks, Optional<Float> speed, Optional<Boolean> correctForDrops) - Mappings:
Namespace Name Mixin selector named ofLnet/minecraft/component/type/ToolComponent$Rule;of(Ljava/util/List;Ljava/util/Optional;Ljava/util/Optional;)Lnet/minecraft/component/type/ToolComponent$Rule;intermediary method_58432Lnet/minecraft/class_9424$class_9425;method_58432(Ljava/util/List;Ljava/util/Optional;Ljava/util/Optional;)Lnet/minecraft/class_9424$class_9425;official aLcxx$a;a(Ljava/util/List;Ljava/util/Optional;Ljava/util/Optional;)Lcxx$a;
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
blocks
Returns the value of theblocksrecord component.- Returns:
- the value of the
blocksrecord component
-
speed
Returns the value of thespeedrecord component.- Returns:
- the value of the
speedrecord component
-
correctForDrops
Returns the value of thecorrectForDropsrecord component.- Returns:
- the value of the
correctForDropsrecord component
-