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_332149_, CompoundTag p_330658_) void
boolean
loadInto
(BlockEntity p_331657_, HolderLookup.Provider p_331528_) boolean
matchedBy
(CompoundTag p_330550_) static CustomData
of
(CompoundTag p_330724_) <T> com.mojang.serialization.DataResult
<T> read
(com.mojang.serialization.MapDecoder<T> p_330352_) static void
set
(DataComponentType<CustomData> p_330462_, ItemStack p_332015_, CompoundTag p_331019_) int
size()
toString()
<T> com.mojang.serialization.DataResult
<CustomData> update
(com.mojang.serialization.MapEncoder<T> p_331823_, T p_332045_) update
(Consumer<CompoundTag> p_331451_) static void
update
(DataComponentType<CustomData> p_331895_, ItemStack p_332185_, Consumer<CompoundTag> p_331274_)
-
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_332149_, CompoundTag p_330658_) -
matchedBy
-
update
public static void update(DataComponentType<CustomData> p_331895_, ItemStack p_332185_, Consumer<CompoundTag> p_331274_) -
set
public static void set(DataComponentType<CustomData> p_330462_, ItemStack p_332015_, CompoundTag p_331019_) -
update
-
loadInto
-
loadInto
-
update
public <T> com.mojang.serialization.DataResult<CustomData> update(com.mojang.serialization.MapEncoder<T> p_331823_, T p_332045_) -
read
public <T> com.mojang.serialization.DataResult<T> read(com.mojang.serialization.MapDecoder<T> p_330352_) -
size
public int size() -
isEmpty
public boolean isEmpty() -
copyTag
-
contains
-
equals
-
hashCode
public int hashCode() -
toString
-
getUnsafe
Deprecated.
-