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

java.lang.Object
dev.latvian.mods.klib.registry.CustomRegistryType<B,V>
All Implemented Interfaces:
WithKey<V>, Comparable<WithKey<V>>
Direct Known Subclasses:
CustomRegistryType.Dynamic, CustomRegistryType.Unit

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

    • key

      protected final net.minecraft.resources.ResourceKey<V> 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

    • key

      public net.minecraft.resources.ResourceKey<V> key()
      Specified by:
      key in interface WithKey<B extends io.netty.buffer.ByteBuf>
    • optionalKey

      public net.minecraft.resources.ResourceKey<V> optionalKey()
      Specified by:
      optionalKey in interface WithKey<B extends io.netty.buffer.ByteBuf>
    • codec

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

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

      @Nullable public @Nullable CustomRegistryType.Unit<B,V> unit()
    • isUnit

      public boolean isUnit()
    • version

      public int version()
    • toString

      public String toString()
      Overrides:
      toString in class Object