Class DynamicType<B extends io.netty.buffer.ByteBuf, V>
java.lang.Object
dev.latvian.mods.klib.registry.CustomRegistryType<B,V>
dev.latvian.mods.klib.registry.DynamicType<B,V>
- All Implemented Interfaces:
CustomRegistryOwnTypeProvider<B,V>, WithKey
-
Field Summary
Fields inherited from class CustomRegistryType
codec, key, streamCodec, versionFields inherited from interface WithKey
COMPARATOR -
Method Summary
Modifier and TypeMethodDescriptionbackwardsCompatibility(int version, net.minecraft.network.codec.StreamCodec<? super B, V> streamCodec) static <B extends io.netty.buffer.ByteBuf, V, D extends V>
DynamicType<B, V> create(String id, com.mojang.serialization.MapCodec<D> codec, net.minecraft.network.codec.StreamCodec<? super B, D> streamCodec) static <B extends io.netty.buffer.ByteBuf, V, D extends V, T>
DynamicType<B, V> create(String id, String fieldName, com.mojang.serialization.Codec<T> codec, net.minecraft.network.codec.StreamCodec<? super B, T> streamCodec, Function<T, D> factory, Function<D, T> getter) version(int version) Methods inherited from class CustomRegistryType
codec, isUnit, key, optionalKey, streamCodec, toString, type, unit, version
-
Method Details
-
create
public static <B extends io.netty.buffer.ByteBuf, V, D extends V> DynamicType<B,V> create(String id, com.mojang.serialization.MapCodec<D> codec, net.minecraft.network.codec.StreamCodec<? super B, D> streamCodec) -
create
public static <B extends io.netty.buffer.ByteBuf, V, D extends V, T> DynamicType<B,V> create(String id, String fieldName, com.mojang.serialization.Codec<T> codec, net.minecraft.network.codec.StreamCodec<? super B, T> streamCodec, Function<T, D> factory, Function<D, T> getter) -
version
-
backwardsCompatibility
public DynamicType<B,V> backwardsCompatibility(int version, net.minecraft.network.codec.StreamCodec<? super B, V> streamCodec)
-