class Rosegold::DataComponents::BlockPredicates

Overview

BlockPredicates - used by can_place_on, can_break. Per BlockPredicate.STREAM_CODEC (1.21.8/1.21.11): Optional<HolderSet> blocks Optional properties Optional nbt DataComponentMatchers components (exact + partial predicate maps)

DataComponentMatchers holds an exact map (recursive Slot-component parsing) and a partial map. Partial entries are uniform on the wire regardless of predicate type: an Either type-ref (bool + VarInt registry id) followed by the predicate value encoded as a single network NBT tag (ByteBufCodecs.fromCodecWithRegistries), so the value is self-terminating and can be skipped without a per-type codec.

Defined in:

rosegold/inventory/slot.cr

Constructors

Instance Method Summary

Instance methods inherited from class Rosegold::DataComponent

write(io) : Nil write

Constructor methods inherited from class Rosegold::DataComponent

create_component(component_type : UInt32, io) : DataComponent create_component, create_component_by_name(name : String | Nil, component_type : UInt32, io) : DataComponent create_component_by_name

Constructor Detail

def self.new #

[View source]
def self.read(io) : self #

[View source]

Instance Method Detail

def raw_bytes : Bytes #

[View source]
def raw_bytes=(raw_bytes : Bytes) #

[View source]
def write(io) : Nil #

[View source]