Class CustomRegistryType<B extends io.netty.buffer.ByteBuf, V>

java.lang.Object
dev.latvian.mods.klib.registry.CustomRegistryType<B,V>
All Implemented Interfaces:
CustomRegistryOwnTypeProvider<B,V>, WithKey
Direct Known Subclasses:
DynamicType, UnitType

public abstract class CustomRegistryType<B extends io.netty.buffer.ByteBuf, V> extends Object implements WithKey, CustomRegistryOwnTypeProvider<B,V>
  • Field Details

    • key

      protected final String key
    • codec

      protected com.mojang.serialization.MapCodec<V> codec
    • streamCodec

      protected net.minecraft.network.codec.StreamCodec<? super B extends io.netty.buffer.ByteBuf, V> streamCodec
    • version

      protected int version
  • Method Details

    • type

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

      public String key()
      Specified by:
      key in interface WithKey
    • optionalKey

      public String optionalKey()
      Specified by:
      optionalKey in interface WithKey
    • codec

      public com.mojang.serialization.MapCodec<V> codec()
    • streamCodec

      public net.minecraft.network.codec.StreamCodec<? super B, V> streamCodec()
    • unit

      @Nullable public @Nullable UnitType<B,V> unit()
    • isUnit

      public boolean isUnit()
    • version

      public int version()
    • toString

      public String toString()
      Overrides:
      toString in class Object