Package net.minecraft.component.type
Record Class BlockStateComponent
java.lang.Object
java.lang.Record
net.minecraft.component.type.BlockStateComponent
- Record Components:
properties-
- Mappings:
Namespace Name official ctzintermediary net/minecraft/class_9275named net/minecraft/component/type/BlockStateComponentofficial dintermediary comp_2381named properties
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<BlockStateComponent> static final BlockStateComponentprivate static final PacketCodec<ByteBuf, Map<String, String>> static final PacketCodec<ByteBuf, BlockStateComponent> The field for thepropertiesrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapplyToState(BlockState state) private static <T extends Comparable<T>>
BlockStateapplyToState(BlockState state, Property<T> property, String value) final booleanIndicates whether some other object is "equal to" this one.<T extends Comparable<T>>
Tfinal inthashCode()Returns a hash code value for this object.booleanisEmpty()Returns the value of thepropertiesrecord component.final StringtoString()Returns a string representation of this record class.<T extends Comparable<T>>
BlockStateComponentwith(Property<T> property, BlockState fromState) <T extends Comparable<T>>
BlockStateComponent
-
Field Details
-
properties
The field for thepropertiesrecord component. -
DEFAULT
- Mappings:
Namespace Name Mixin selector official aLctz;a:Lctz;intermediary field_49284Lnet/minecraft/class_9275;field_49284:Lnet/minecraft/class_9275;named DEFAULTLnet/minecraft/component/type/BlockStateComponent;DEFAULT:Lnet/minecraft/component/type/BlockStateComponent;
-
CODEC
- Mappings:
Namespace Name Mixin selector official bLctz;b:Lcom/mojang/serialization/Codec;intermediary field_49285Lnet/minecraft/class_9275;field_49285:Lcom/mojang/serialization/Codec;named CODECLnet/minecraft/component/type/BlockStateComponent;CODEC:Lcom/mojang/serialization/Codec;
-
MAP_PACKET_CODEC
- Mappings:
Namespace Name Mixin selector official eLctz;e:Lyg;intermediary field_49287Lnet/minecraft/class_9275;field_49287:Lnet/minecraft/class_9139;named MAP_PACKET_CODECLnet/minecraft/component/type/BlockStateComponent;MAP_PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector official cLctz;c:Lyg;intermediary field_49286Lnet/minecraft/class_9275;field_49286:Lnet/minecraft/class_9139;named PACKET_CODECLnet/minecraft/component/type/BlockStateComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
-
-
Constructor Details
-
BlockStateComponent
-
-
Method Details
-
with
- Mappings:
Namespace Name Mixin selector official aLctz;a(Ldql;Ljava/lang/Comparable;)Lctz;intermediary method_57420Lnet/minecraft/class_9275;method_57420(Lnet/minecraft/class_2769;Ljava/lang/Comparable;)Lnet/minecraft/class_9275;named withLnet/minecraft/component/type/BlockStateComponent;with(Lnet/minecraft/state/property/Property;Ljava/lang/Comparable;)Lnet/minecraft/component/type/BlockStateComponent;
-
with
public <T extends Comparable<T>> BlockStateComponent with(Property<T> property, BlockState fromState) - Mappings:
Namespace Name Mixin selector official aLctz;a(Ldql;Ldpi;)Lctz;intermediary method_57419Lnet/minecraft/class_9275;method_57419(Lnet/minecraft/class_2769;Lnet/minecraft/class_2680;)Lnet/minecraft/class_9275;named withLnet/minecraft/component/type/BlockStateComponent;with(Lnet/minecraft/state/property/Property;Lnet/minecraft/block/BlockState;)Lnet/minecraft/component/type/BlockStateComponent;
-
getValue
- Mappings:
Namespace Name Mixin selector official aLctz;a(Ldql;)Ljava/lang/Comparable;intermediary method_57418Lnet/minecraft/class_9275;method_57418(Lnet/minecraft/class_2769;)Ljava/lang/Comparable;named getValueLnet/minecraft/component/type/BlockStateComponent;getValue(Lnet/minecraft/state/property/Property;)Ljava/lang/Comparable;
-
applyToState
- Mappings:
Namespace Name Mixin selector official aLctz;a(Ldpi;)Ldpi;intermediary method_57415Lnet/minecraft/class_9275;method_57415(Lnet/minecraft/class_2680;)Lnet/minecraft/class_2680;named applyToStateLnet/minecraft/component/type/BlockStateComponent;applyToState(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/BlockState;
-
applyToState
private static <T extends Comparable<T>> BlockState applyToState(BlockState state, Property<T> property, String value) - Mappings:
Namespace Name Mixin selector official aLctz;a(Ldpi;Ldql;Ljava/lang/String;)Ldpi;intermediary method_57417Lnet/minecraft/class_9275;method_57417(Lnet/minecraft/class_2680;Lnet/minecraft/class_2769;Ljava/lang/String;)Lnet/minecraft/class_2680;named applyToStateLnet/minecraft/component/type/BlockStateComponent;applyToState(Lnet/minecraft/block/BlockState;Lnet/minecraft/state/property/Property;Ljava/lang/String;)Lnet/minecraft/block/BlockState;
-
isEmpty
public boolean isEmpty()- Mappings:
Namespace Name Mixin selector official aLctz;a()Zintermediary method_57414Lnet/minecraft/class_9275;method_57414()Znamed isEmptyLnet/minecraft/component/type/BlockStateComponent;isEmpty()Z
-
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). -
properties
Returns the value of thepropertiesrecord component.- Returns:
- the value of the
propertiesrecord component
-