Class CustomData
java.lang.Object
net.minecraft.world.item.component.CustomData
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<CustomData> static final com.mojang.serialization.Codec
<CustomData> static final CustomData
private static final org.slf4j.Logger
static final StreamCodec
<io.netty.buffer.ByteBuf, CustomData> Deprecated.private final CompoundTag
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
copyTag()
boolean
Deprecated.int
hashCode()
boolean
isEmpty()
itemMatcher
(DataComponentType<CustomData> p_329049_, CompoundTag p_330570_) void
boolean
loadInto
(BlockEntity p_335855_, HolderLookup.Provider p_331192_) boolean
matchedBy
(CompoundTag p_328523_) static CustomData
of
(CompoundTag p_334177_) <T> com.mojang.serialization.DataResult
<T> read
(com.mojang.serialization.DynamicOps<Tag> p_345359_, com.mojang.serialization.MapDecoder<T> p_342176_) <T> com.mojang.serialization.DataResult
<T> read
(com.mojang.serialization.MapDecoder<T> p_333786_) static void
set
(DataComponentType<CustomData> p_327973_, ItemStack p_332195_, CompoundTag p_330130_) int
size()
toString()
<T> com.mojang.serialization.DataResult
<CustomData> update
(com.mojang.serialization.DynamicOps<Tag> p_342271_, com.mojang.serialization.MapEncoder<T> p_328479_, T p_328689_) update
(Consumer<CompoundTag> p_336344_) static void
update
(DataComponentType<CustomData> p_336008_, ItemStack p_335562_, Consumer<CompoundTag> p_332401_)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
EMPTY
-
CODEC
-
CODEC_WITH_ID
-
STREAM_CODEC
Deprecated. -
tag
-
-
Constructor Details
-
CustomData
-
-
Method Details
-
of
-
itemMatcher
public static Predicate<ItemStack> itemMatcher(DataComponentType<CustomData> p_329049_, CompoundTag p_330570_) -
matchedBy
-
update
public static void update(DataComponentType<CustomData> p_336008_, ItemStack p_335562_, Consumer<CompoundTag> p_332401_) -
set
public static void set(DataComponentType<CustomData> p_327973_, ItemStack p_332195_, CompoundTag p_330130_) -
update
-
loadInto
-
loadInto
-
update
public <T> com.mojang.serialization.DataResult<CustomData> update(com.mojang.serialization.DynamicOps<Tag> p_342271_, com.mojang.serialization.MapEncoder<T> p_328479_, T p_328689_) -
read
public <T> com.mojang.serialization.DataResult<T> read(com.mojang.serialization.MapDecoder<T> p_333786_) -
read
public <T> com.mojang.serialization.DataResult<T> read(com.mojang.serialization.DynamicOps<Tag> p_345359_, com.mojang.serialization.MapDecoder<T> p_342176_) -
size
public int size() -
isEmpty
public boolean isEmpty() -
copyTag
-
contains
-
equals
-
hashCode
public int hashCode() -
toString
-
getUnsafe
Deprecated.
-