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

public class DynamicType<B extends io.netty.buffer.ByteBuf, V> extends CustomRegistryType<B,V>
  • 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

      public DynamicType<B,V> version(int version)
    • backwardsCompatibility

      public DynamicType<B,V> backwardsCompatibility(int version, net.minecraft.network.codec.StreamCodec<? super B, V> streamCodec)
    • type

      public DynamicType<B,V> type()
      Specified by:
      type in interface CustomRegistryOwnTypeProvider<B extends io.netty.buffer.ByteBuf, V>
      Overrides:
      type in class CustomRegistryType<B extends io.netty.buffer.ByteBuf, V>