Class CustomRegistry<B extends io.netty.buffer.ByteBuf, V>
java.lang.Object
dev.latvian.mods.klib.registry.CustomRegistry<B,V>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCustomRegistry.Builder<B extends io.netty.buffer.ByteBuf, T> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Map<String, CustomRegistry<?, ?>> static final Map<DataType<?>, CustomRegistry<?, ?>> final com.mojang.serialization.Codec<CustomRegistryType<B, V>> -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic <B extends io.netty.buffer.ByteBuf, T>
CustomRegistry.Builder<B, T> codec()static <B extends io.netty.buffer.ByteBuf, T>
CustomRegistry<B, T> createArgument(net.minecraft.commands.CommandBuildContext ctx) dataType()@Nullable CustomRegistryType<B, V> decodeType(B buf) decodeValue(B buf) com.mojang.serialization.Codec<V> voidencodeType(io.netty.buffer.ByteBuf buf, @Nullable CustomRegistryType<B, V> value) voidencodeValue(B buf, @Nullable Ref<V> ref) @Nullable CustomRegistryType<B, V> getOptionalType(Ref<V> ref) @Nullable CustomRegistryType<B, V> getOptionalType(V value) @Nullable CustomRegistryType<B, V> intgetValueIndex(String key) iterator()keys()voidreadMeta(@Nullable CustomRegistryMetaInfo info) voidreadValues(CustomRegistryValueInfo info, net.minecraft.core.RegistryAccess registryAccess, PlatformType platformType) static voidregisterAll(Consumer<CustomRegistryCollector> callback) voidregisterTypes(Consumer<CustomRegistryTypeCollector<B, V>> callback) static voidsyncAll(net.minecraft.server.level.ServerPlayer player) booleanvoidsyncValues(net.minecraft.server.level.ServerPlayer player) toString()typeList()voidupdateValues(Map<net.minecraft.resources.Identifier, V> map) values()writeValues(net.minecraft.core.RegistryAccess registryAccess, PlatformType platformType) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Field Details
-
ALL
-
DATA_TYPE_TO_REGISTRY
-
typeCodec
public final com.mojang.serialization.Codec<CustomRegistryType<B extends io.netty.buffer.ByteBuf, V>> typeCodec
-
-
Method Details
-
registerAll
-
buildAllMeta
public static void buildAllMeta() -
syncAll
public static void syncAll(net.minecraft.server.level.ServerPlayer player) -
builder
public static <B extends io.netty.buffer.ByteBuf, T> CustomRegistry.Builder<B,T> builder(String registryId) -
create
-
registryId
-
ref
-
ref
-
valueRef
-
registerTypes
-
writeMeta
-
readMeta
-
updateValues
-
writeValues
public CustomRegistryValueInfo writeValues(net.minecraft.core.RegistryAccess registryAccess, PlatformType platformType) -
readValues
public void readValues(CustomRegistryValueInfo info, net.minecraft.core.RegistryAccess registryAccess, PlatformType platformType) -
syncValues
public boolean syncValues() -
getOptionalType
-
getOptionalType
-
getType
-
getType
-
getType
-
getKey
-
directCodec
-
codec
-
streamCodec
-
dataType
-
typeList
-
get
-
values
-
keys
-
iterator
-
decodeValue
-
getValueIndex
-
encodeValue
-
decodeType
-
encodeType
public void encodeType(io.netty.buffer.ByteBuf buf, @Nullable @Nullable CustomRegistryType<B, V> value) -
createArgument
-
syncValues
public void syncValues(net.minecraft.server.level.ServerPlayer player) -
toString
-