Class MapType.BaseBuilder<K,V>
java.lang.Object
dev.dhyces.trimmed.api.maps.types.MapType.BaseBuilder<K,V>
- Direct Known Subclasses:
AdvancedMapType.Builder,SimpleMapType.Builder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected final KeyResolver<K> protected final com.mojang.serialization.Codec<V> protected @Nullable net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, V> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseBuilder(KeyResolver<K> keyResolver, com.mojang.serialization.Codec<V> valueCodec) -
Method Summary
Modifier and TypeMethodDescriptionbuild()For asset pack maps, this will delay parsing of the maps until after data packs are synced to the client.networkCodec(net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, V> valueCodec) For data pack maps, this will setup syncing to clients.For data pack maps, this will setup syncing to clients using the regular codecs for networking.
-
Field Details
-
keyResolver
-
valueCodec
-
valueStreamCodec
@Nullable protected @Nullable net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,V> valueStreamCodec -
dataPackSynced
protected boolean dataPackSynced
-
-
Constructor Details
-
BaseBuilder
-
-
Method Details
-
dataPackSynced
For asset pack maps, this will delay parsing of the maps until after data packs are synced to the client. For data pack maps, usenetworkCodec(StreamCodec).- Returns:
- this builder
-
networkCodec
public MapType.BaseBuilder<K,V> networkCodec(net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, V> valueCodec) For data pack maps, this will setup syncing to clients. This is unused for asset pack maps.- Returns:
- this builder
-
networked
For data pack maps, this will setup syncing to clients using the regular codecs for networking. This is unused for asset pack maps.- Returns:
- this builder
-
build
-