Record Class BlockStateComponent

java.lang.Object
java.lang.Record
net.minecraft.component.type.BlockStateComponent
Record Components:
properties -

public record BlockStateComponent(Map<String,String> properties) extends Record
Mappings:
Namespace Name
named net/minecraft/component/type/BlockStateComponent
intermediary net/minecraft/class_9275
official cxc
named properties
intermediary comp_2381
official d
  • Field Details

    • properties

      private final Map<String,String> properties
      The field for the properties record component.
    • DEFAULT

      public static final BlockStateComponent DEFAULT
      Mappings:
      Namespace Name Mixin selector
      named DEFAULT Lnet/minecraft/component/type/BlockStateComponent;DEFAULT:Lnet/minecraft/component/type/BlockStateComponent;
      intermediary field_49284 Lnet/minecraft/class_9275;field_49284:Lnet/minecraft/class_9275;
      official a Lcxc;a:Lcxc;
    • CODEC

      public static final com.mojang.serialization.Codec<BlockStateComponent> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/component/type/BlockStateComponent;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_49285 Lnet/minecraft/class_9275;field_49285:Lcom/mojang/serialization/Codec;
      official b Lcxc;b:Lcom/mojang/serialization/Codec;
    • MAP_PACKET_CODEC

      private static final PacketCodec<ByteBuf,Map<String,String>> MAP_PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named MAP_PACKET_CODEC Lnet/minecraft/component/type/BlockStateComponent;MAP_PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_49287 Lnet/minecraft/class_9275;field_49287:Lnet/minecraft/class_9139;
      official e Lcxc;e:Lzn;
    • PACKET_CODEC

      public static final PacketCodec<ByteBuf,BlockStateComponent> PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named PACKET_CODEC Lnet/minecraft/component/type/BlockStateComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_49286 Lnet/minecraft/class_9275;field_49286:Lnet/minecraft/class_9139;
      official c Lcxc;c:Lzn;
  • Constructor Details

  • Method Details

    • with

      public <T extends Comparable<T>> BlockStateComponent with(Property<T> property, T value)
      Mappings:
      Namespace Name Mixin selector
      named with Lnet/minecraft/component/type/BlockStateComponent;with(Lnet/minecraft/state/property/Property;Ljava/lang/Comparable;)Lnet/minecraft/component/type/BlockStateComponent;
      intermediary method_57420 Lnet/minecraft/class_9275;method_57420(Lnet/minecraft/class_2769;Ljava/lang/Comparable;)Lnet/minecraft/class_9275;
      official a Lcxc;a(Ldth;Ljava/lang/Comparable;)Lcxc;
    • with

      public <T extends Comparable<T>> BlockStateComponent with(Property<T> property, BlockState fromState)
      Mappings:
      Namespace Name Mixin selector
      named with Lnet/minecraft/component/type/BlockStateComponent;with(Lnet/minecraft/state/property/Property;Lnet/minecraft/block/BlockState;)Lnet/minecraft/component/type/BlockStateComponent;
      intermediary method_57419 Lnet/minecraft/class_9275;method_57419(Lnet/minecraft/class_2769;Lnet/minecraft/class_2680;)Lnet/minecraft/class_9275;
      official a Lcxc;a(Ldth;Ldse;)Lcxc;
    • getValue

      @Nullable public <T extends Comparable<T>> T getValue(Property<T> property)
      Mappings:
      Namespace Name Mixin selector
      named getValue Lnet/minecraft/component/type/BlockStateComponent;getValue(Lnet/minecraft/state/property/Property;)Ljava/lang/Comparable;
      intermediary method_57418 Lnet/minecraft/class_9275;method_57418(Lnet/minecraft/class_2769;)Ljava/lang/Comparable;
      official a Lcxc;a(Ldth;)Ljava/lang/Comparable;
    • applyToState

      public BlockState applyToState(BlockState state)
      Mappings:
      Namespace Name Mixin selector
      named applyToState Lnet/minecraft/component/type/BlockStateComponent;applyToState(Lnet/minecraft/block/BlockState;)Lnet/minecraft/block/BlockState;
      intermediary method_57415 Lnet/minecraft/class_9275;method_57415(Lnet/minecraft/class_2680;)Lnet/minecraft/class_2680;
      official a Lcxc;a(Ldse;)Ldse;
    • applyToState

      private static <T extends Comparable<T>> BlockState applyToState(BlockState state, Property<T> property, String value)
      Mappings:
      Namespace Name Mixin selector
      named applyToState Lnet/minecraft/component/type/BlockStateComponent;applyToState(Lnet/minecraft/block/BlockState;Lnet/minecraft/state/property/Property;Ljava/lang/String;)Lnet/minecraft/block/BlockState;
      intermediary method_57417 Lnet/minecraft/class_9275;method_57417(Lnet/minecraft/class_2680;Lnet/minecraft/class_2769;Ljava/lang/String;)Lnet/minecraft/class_2680;
      official a Lcxc;a(Ldse;Ldth;Ljava/lang/String;)Ldse;
    • isEmpty

      public boolean isEmpty()
      Mappings:
      Namespace Name Mixin selector
      named isEmpty Lnet/minecraft/component/type/BlockStateComponent;isEmpty()Z
      intermediary method_57414 Lnet/minecraft/class_9275;method_57414()Z
      official a Lcxc;a()Z
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • properties

      public Map<String,String> properties()
      Returns the value of the properties record component.
      Returns:
      the value of the properties record component