Class Name
java.lang.Object
net.darkhax.simplelootviewer.common.impl.data.info.Name
While Mojang already has a component codec, it uses NBT under the hood and is actually pretty slow. In an attempt to
make things faster, we are storing names as the smallest amount of data required to reconstruct the component. For
example, rather than sending the name of a block we can send the block ID.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
STREAM
public static net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,Name> STREAM
-
-
Constructor Details
-
Name
- Parameters:
type- The type of name being stored. This controls the serialization and processing on the stored data.data- Data used to produce the component. It is unsafe to use data that does not match the expected input.
-
-
Method Details
-
name
public net.minecraft.network.chat.Component name() -
type
-
data
-