Package net.minecraft.registry
Interface ContextSwapper
public interface ContextSwapper
- Mappings:
Namespace Name named net/minecraft/registry/ContextSwapper
intermediary net/minecraft/class_10678
official bcl
-
Method Summary
Modifier and TypeMethodDescription<T> com.mojang.serialization.DataResult
<T> swapContext
(com.mojang.serialization.Codec<T> codec, T value, RegistryWrapper.WrapperLookup registries) Recreates a value based on a new registry context (for example, for use in a different world).
-
Method Details
-
swapContext
<T> com.mojang.serialization.DataResult<T> swapContext(com.mojang.serialization.Codec<T> codec, T value, RegistryWrapper.WrapperLookup registries) Recreates a value based on a new registry context (for example, for use in a different world). This is done by encoding the value using the old registry context and immediately decoding it with the new one.- Mappings:
Namespace Name Mixin selector named swapContext
Lnet/minecraft/registry/ContextSwapper;swapContext(Lcom/mojang/serialization/Codec;Ljava/lang/Object;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Lcom/mojang/serialization/DataResult;
intermediary method_67092
Lnet/minecraft/class_10678;method_67092(Lcom/mojang/serialization/Codec;Ljava/lang/Object;Lnet/minecraft/class_7225$class_7874;)Lcom/mojang/serialization/DataResult;
official a
Lbcl;a(Lcom/mojang/serialization/Codec;Ljava/lang/Object;Ljn$a;)Lcom/mojang/serialization/DataResult;
-