mirror of
https://github.com/FabricMC/fabric
synced 2026-08-19 06:26:07 -04:00
No longer specify remap in any Mixins (#4833)
This is only used by the anntation processor,
This commit is contained in:
parent
974c6322c9
commit
33df5e6ebe
24 changed files with 29 additions and 31 deletions
|
|
@ -24,7 +24,7 @@ import net.minecraft.server.Main;
|
|||
|
||||
@Mixin(Main.class)
|
||||
public class MainMixin {
|
||||
@WrapWithCondition(method = "main", remap = false, at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Util;startTimerHack()V", remap = true))
|
||||
@WrapWithCondition(method = "main", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Util;startTimerHack()V"))
|
||||
private static boolean dontStartAnotherTimerHack() {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public class ThreadExecutorMixin {
|
|||
}
|
||||
}
|
||||
|
||||
@Inject(method = "executeTask", at = @At(value = "INVOKE", target = "Ljava/lang/Runnable;run()V", remap = false, shift = At.Shift.AFTER))
|
||||
@Inject(method = "executeTask", at = @At(value = "INVOKE", target = "Ljava/lang/Runnable;run()V", shift = At.Shift.AFTER))
|
||||
private void onPacketHandlerRun(Runnable task, CallbackInfo ci) {
|
||||
switch ((Object) this) {
|
||||
case MinecraftClient $ -> NetworkSynchronizer.CLIENTBOUND.postTaskRun(task);
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public abstract class CommandManagerMixin {
|
|||
*
|
||||
* @reason Add commands before ambiguities are calculated.
|
||||
*/
|
||||
@Inject(at = @At(value = "INVOKE", target = "Lcom/mojang/brigadier/CommandDispatcher;setConsumer(Lcom/mojang/brigadier/ResultConsumer;)V", remap = false), method = "<init>")
|
||||
@Inject(at = @At(value = "INVOKE", target = "Lcom/mojang/brigadier/CommandDispatcher;setConsumer(Lcom/mojang/brigadier/ResultConsumer;)V"), method = "<init>")
|
||||
private void fabric_addCommands(CommandManager.RegistrationEnvironment environment, CommandRegistryAccess registryAccess, CallbackInfo ci) {
|
||||
CommandRegistrationCallback.EVENT.invoker().register(this.dispatcher, registryAccess, environment);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,8 +31,7 @@ public class DedicatedServerWatchdogMixin {
|
|||
@ModifyArg(method = "createCrashReport(Ljava/lang/String;J)Lnet/minecraft/util/crash/CrashReport;",
|
||||
at = @At(value = "INVOKE",
|
||||
target = "Ljava/lang/StringBuilder;append(Ljava/lang/Object;)Ljava/lang/StringBuilder;",
|
||||
ordinal = 0,
|
||||
remap = false)
|
||||
ordinal = 0)
|
||||
)
|
||||
private static Object printEntireThreadDump(Object object) {
|
||||
if (object instanceof ThreadInfo threadInfo) {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ import net.fabricmc.fabric.impl.datagen.FabricDataGenHelper;
|
|||
|
||||
@Mixin(MinecraftClient.class)
|
||||
public class MinecraftClientMixin {
|
||||
@Inject(method = "<init>", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;getBackendDescription()Ljava/lang/String;", remap = false))
|
||||
@Inject(method = "<init>", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;getBackendDescription()Ljava/lang/String;"))
|
||||
private void main(CallbackInfo info) {
|
||||
if (FabricDataGenHelper.ENABLED) {
|
||||
FabricDataGenHelper.run();
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public class ModelProviderBlockStateSuppliersMixin implements FabricModelProvide
|
|||
}
|
||||
|
||||
// Target the first .filter() call, to filter out blocks that are not from the mod we are processing.
|
||||
@ModifyArg(method = "validate", at = @At(value = "INVOKE", target = "Ljava/util/stream/Stream;filter(Ljava/util/function/Predicate;)Ljava/util/stream/Stream;", ordinal = 0, remap = false))
|
||||
@ModifyArg(method = "validate", at = @At(value = "INVOKE", target = "Ljava/util/stream/Stream;filter(Ljava/util/function/Predicate;)Ljava/util/stream/Stream;", ordinal = 0))
|
||||
private Predicate<RegistryEntry.Reference<Block>> filterBlocksForProcessingMod(Predicate<RegistryEntry.Reference<Block>> original) {
|
||||
if (fabricDataOutput != null) {
|
||||
return original
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public class ModelProviderItemAssetsMixin implements FabricItemAssetDefinitions
|
|||
this.fabricDataOutput = fabricDataOutput;
|
||||
}
|
||||
|
||||
@WrapOperation(method = "method_65470", at = @At(value = "INVOKE", target = "Ljava/util/Map;containsKey(Ljava/lang/Object;)Z", ordinal = 1, remap = false))
|
||||
@WrapOperation(method = "method_65470", at = @At(value = "INVOKE", target = "Ljava/util/Map;containsKey(Ljava/lang/Object;)Z", ordinal = 1))
|
||||
private boolean filterItemsForProcessingMod(Map<Item, ItemAsset> map, Object o, Operation<Boolean> original) {
|
||||
BlockItem blockItem = (BlockItem) o;
|
||||
|
||||
|
|
@ -74,7 +74,7 @@ public class ModelProviderItemAssetsMixin implements FabricItemAssetDefinitions
|
|||
return original.call(map, o);
|
||||
}
|
||||
|
||||
@ModifyArg(method = "resolveAndValidate", at = @At(value = "INVOKE", target = "Ljava/util/stream/Stream;filter(Ljava/util/function/Predicate;)Ljava/util/stream/Stream;", ordinal = 0, remap = false))
|
||||
@ModifyArg(method = "resolveAndValidate", at = @At(value = "INVOKE", target = "Ljava/util/stream/Stream;filter(Ljava/util/function/Predicate;)Ljava/util/stream/Stream;", ordinal = 0))
|
||||
private Predicate<RegistryEntry.Reference<Item>> filterItemsForProcessingMod(Predicate<RegistryEntry.Reference<Item>> original) {
|
||||
if (fabricDataOutput != null) {
|
||||
return original
|
||||
|
|
|
|||
|
|
@ -42,8 +42,7 @@ public class Schema2832Mixin {
|
|||
},
|
||||
at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lcom/mojang/datafixers/DSL;taggedChoiceLazy(Ljava/lang/String;Lcom/mojang/datafixers/types/Type;Ljava/util/Map;)Lcom/mojang/datafixers/types/templates/TaggedChoice;",
|
||||
remap = false
|
||||
target = "Lcom/mojang/datafixers/DSL;taggedChoiceLazy(Ljava/lang/String;Lcom/mojang/datafixers/types/Type;Ljava/util/Map;)Lcom/mojang/datafixers/types/templates/TaggedChoice;"
|
||||
)
|
||||
)
|
||||
private static <K> TaggedChoice<K> redirectTaggedChoiceLazy(
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
|||
import net.fabricmc.fabric.impl.dimension.TaggedChoiceExtension;
|
||||
import net.fabricmc.fabric.impl.dimension.TaggedChoiceTypeExtension;
|
||||
|
||||
@Mixin(value = TaggedChoice.class, remap = false)
|
||||
@Mixin(value = TaggedChoice.class)
|
||||
public class TaggedChoiceMixin implements TaggedChoiceExtension {
|
||||
@Unique
|
||||
boolean failSoft = false;
|
||||
|
|
@ -43,7 +43,7 @@ public class TaggedChoiceMixin implements TaggedChoiceExtension {
|
|||
*/
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Inject(
|
||||
method = "lambda$apply$0", at = @At("RETURN"), remap = false
|
||||
method = "lambda$apply$0", at = @At("RETURN")
|
||||
)
|
||||
private void onApply(Pair key, CallbackInfoReturnable<Type> cir) {
|
||||
if (failSoft) {
|
||||
|
|
|
|||
|
|
@ -33,12 +33,12 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
|||
|
||||
import net.fabricmc.fabric.impl.dimension.TaggedChoiceTypeExtension;
|
||||
|
||||
@Mixin(value = TaggedChoice.TaggedChoiceType.class, remap = false)
|
||||
@Mixin(value = TaggedChoice.TaggedChoiceType.class)
|
||||
public class TaggedChoiceTaggedChoiceTypeMixin<K> implements TaggedChoiceTypeExtension {
|
||||
@Unique
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger("TaggedChoiceType_DimDataFix");
|
||||
|
||||
@Shadow(remap = false)
|
||||
@Shadow
|
||||
@Final
|
||||
protected Object2ObjectMap<K, Type<?>> types;
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ public class TaggedChoiceTaggedChoiceTypeMixin<K> implements TaggedChoiceTypeExt
|
|||
* This will avoid deserialization failure from DFU when upgrading level.dat that contains mod custom generator types.
|
||||
*/
|
||||
@Inject(
|
||||
method = "getMapCodec", at = @At("HEAD"), cancellable = true, remap = false
|
||||
method = "getMapCodec", at = @At("HEAD"), cancellable = true
|
||||
)
|
||||
private void onGetCodec(K k, CallbackInfoReturnable<DataResult<? extends Codec<?>>> cir) {
|
||||
if (failSoft) {
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ abstract class ServerPlayerEntityMixin extends LivingEntityMixin {
|
|||
}
|
||||
}
|
||||
|
||||
@Redirect(method = "trySleep", at = @At(value = "INVOKE", target = "Ljava/util/List;isEmpty()Z", remap = false))
|
||||
@Redirect(method = "trySleep", at = @At(value = "INVOKE", target = "Ljava/util/List;isEmpty()Z"))
|
||||
private boolean hasNoMonstersNearby(List<HostileEntity> monsters, BlockPos pos) {
|
||||
boolean vanillaResult = monsters.isEmpty();
|
||||
ActionResult result = EntitySleepEvents.ALLOW_NEARBY_MONSTERS.invoker().allowNearbyMonsters((PlayerEntity) (Object) this, pos, vanillaResult);
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public abstract class StructureTemplateManagerMixin {
|
|||
return finder.findResources(this.resourceManager).keySet().stream().map(finder::toResourceId);
|
||||
}
|
||||
|
||||
@Inject(method = "<init>", at = @At(value = "INVOKE", target = "Lcom/google/common/collect/ImmutableList$Builder;add(Ljava/lang/Object;)Lcom/google/common/collect/ImmutableList$Builder;", ordinal = 2, shift = At.Shift.AFTER, remap = false))
|
||||
@Inject(method = "<init>", at = @At(value = "INVOKE", target = "Lcom/google/common/collect/ImmutableList$Builder;add(Ljava/lang/Object;)Lcom/google/common/collect/ImmutableList$Builder;", ordinal = 2, shift = At.Shift.AFTER))
|
||||
private void addFabricTemplateProvider(ResourceManager resourceManager, LevelStorage.Session session, DataFixer dataFixer, RegistryEntryLookup<Block> blockLookup, CallbackInfo ci, @Local ImmutableList.Builder<StructureTemplateManager.Provider> builder) {
|
||||
builder.add(new StructureTemplateManager.Provider(this::fabric_loadSnbtFromResource, this::streamTemplatesFromResource));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ public class MainMixin {
|
|||
|
||||
// Exit with a non-zero exit code when the server fails to start.
|
||||
// Otherwise gradlew test will succeed without errors, although no tests have been run.
|
||||
@Inject(method = "main", at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;error(Lorg/slf4j/Marker;Ljava/lang/String;Ljava/lang/Throwable;)V", shift = At.Shift.AFTER, remap = false), remap = false)
|
||||
@Inject(method = "main", at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;error(Lorg/slf4j/Marker;Ljava/lang/String;Ljava/lang/Throwable;)V", shift = At.Shift.AFTER))
|
||||
private static void exitOnError(CallbackInfo info) {
|
||||
if (FabricGameTestRunner.ENABLED) {
|
||||
System.exit(-1);
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public abstract class MinecraftClientMixin {
|
|||
ClientTickEvents.END_CLIENT_TICK.invoker().onEndTick((MinecraftClient) (Object) this);
|
||||
}
|
||||
|
||||
@Inject(at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;info(Ljava/lang/String;)V", shift = At.Shift.AFTER, remap = false), method = "stop")
|
||||
@Inject(at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;info(Ljava/lang/String;)V", shift = At.Shift.AFTER), method = "stop")
|
||||
private void onStopping(CallbackInfo ci) {
|
||||
ClientLifecycleEvents.CLIENT_STOPPING.invoker().onClientStopping((MinecraftClient) (Object) this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ abstract class BakedModelManagerMixin implements FabricBakedModelManager {
|
|||
// The Pair's type is actually Pair<Identifier, JsonUnbakedModel>, but since generics don't really exist, vanilla
|
||||
// code doesn't explicitly cast the model to JsonUnbakedModel, and the enclosing method returns UnbakedModels per
|
||||
// its return type, it's safe to return an UnbakedModel here.
|
||||
@ModifyArg(method = "method_65750(Ljava/util/Map$Entry;)Lcom/mojang/datafixers/util/Pair;", at = @At(value = "INVOKE", target = "com/mojang/datafixers/util/Pair.of(Ljava/lang/Object;Ljava/lang/Object;)Lcom/mojang/datafixers/util/Pair;", remap = false), index = 1)
|
||||
@ModifyArg(method = "method_65750(Ljava/util/Map$Entry;)Lcom/mojang/datafixers/util/Pair;", at = @At(value = "INVOKE", target = "com/mojang/datafixers/util/Pair.of(Ljava/lang/Object;Ljava/lang/Object;)Lcom/mojang/datafixers/util/Pair;"), index = 1)
|
||||
private static Object actuallyDeserializeModel(Object originalModel, @Local Reader reader) {
|
||||
return UnbakedModelDeserializer.deserialize(reader);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,12 +35,12 @@ import net.fabricmc.fabric.impl.client.model.loading.CustomUnbakedBlockStateMode
|
|||
|
||||
@Mixin(BlockStateModel.Unbaked.class)
|
||||
interface BlockStateModelUnbakedMixin {
|
||||
@Redirect(method = "<clinit>()V", at = @At(value = "INVOKE", target = "com/mojang/serialization/Codec.flatComapMap(Ljava/util/function/Function;Ljava/util/function/Function;)Lcom/mojang/serialization/Codec;", remap = false, ordinal = 0))
|
||||
@Redirect(method = "<clinit>()V", at = @At(value = "INVOKE", target = "com/mojang/serialization/Codec.flatComapMap(Ljava/util/function/Function;Ljava/util/function/Function;)Lcom/mojang/serialization/Codec;", ordinal = 0))
|
||||
private static Codec<WeightedBlockStateModel.Unbaked> replaceWeightedCodec(Codec<List<Weighted<ModelVariant>>> codec, Function<?, ?> to, Function<?, ?> from) {
|
||||
return CustomUnbakedBlockStateModelRegistry.WEIGHTED_MODEL_CODEC;
|
||||
}
|
||||
|
||||
@Redirect(method = "<clinit>()V", at = @At(value = "INVOKE", target = "com/mojang/serialization/Codec.flatComapMap(Ljava/util/function/Function;Ljava/util/function/Function;)Lcom/mojang/serialization/Codec;", remap = false, ordinal = 1))
|
||||
@Redirect(method = "<clinit>()V", at = @At(value = "INVOKE", target = "com/mojang/serialization/Codec.flatComapMap(Ljava/util/function/Function;Ljava/util/function/Function;)Lcom/mojang/serialization/Codec;", ordinal = 1))
|
||||
private static Codec<BlockStateModel.Unbaked> replaceCodec(Codec<Either<WeightedBlockStateModel.Unbaked, SimpleBlockStateModel.Unbaked>> codec, Function<?, ?> to, Function<?, ?> from) {
|
||||
return CustomUnbakedBlockStateModelRegistry.MODEL_CODEC;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import net.fabricmc.fabric.impl.client.model.loading.UnbakedModelJsonDeserialize
|
|||
|
||||
@Mixin(JsonUnbakedModel.class)
|
||||
abstract class JsonUnbakedModelMixin {
|
||||
@ModifyExpressionValue(method = "<clinit>()V", at = @At(value = "NEW", target = "com/google/gson/GsonBuilder", remap = false))
|
||||
@ModifyExpressionValue(method = "<clinit>()V", at = @At(value = "NEW", target = "com/google/gson/GsonBuilder"))
|
||||
private static GsonBuilder addUnbakedModelAdapter(GsonBuilder builder) {
|
||||
return builder.registerTypeHierarchyAdapter(UnbakedModel.class, new UnbakedModelJsonDeserializer());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ abstract class ClientLoginNetworkHandlerMixin implements NetworkHandlerExtension
|
|||
this.addon.lateInit();
|
||||
}
|
||||
|
||||
@Inject(method = "onQueryRequest", at = @At(value = "INVOKE", target = "Ljava/util/function/Consumer;accept(Ljava/lang/Object;)V", remap = false, shift = At.Shift.AFTER), cancellable = true)
|
||||
@Inject(method = "onQueryRequest", at = @At(value = "INVOKE", target = "Ljava/util/function/Consumer;accept(Ljava/lang/Object;)V", shift = At.Shift.AFTER), cancellable = true)
|
||||
private void handleQueryRequest(LoginQueryRequestS2CPacket packet, CallbackInfo ci) {
|
||||
if (packet.payload() instanceof PacketByteBufLoginQueryRequestPayload payload) {
|
||||
if (this.addon.handlePacket(packet)) {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ import net.minecraft.world.chunk.SerializedChunk;
|
|||
|
||||
@Mixin(SerializedChunk.class)
|
||||
public class SerializedChunkMixin {
|
||||
@Redirect(method = "method_68295", at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;warn(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V", remap = false))
|
||||
@Redirect(method = "method_68295", at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;warn(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V"))
|
||||
private static void log(Logger logger, String msg, Object identifier, Object chunkPos) {
|
||||
// Drop to debug log level.
|
||||
logger.debug(msg, identifier, chunkPos);
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ abstract class FallingBlockCommandRendererMixin {
|
|||
private MatrixStack matrices;
|
||||
|
||||
// Support multi-render layer models (FallingBlockCommand).
|
||||
@Inject(method = "render", at = @At(value = "INVOKE", target = "java/util/Iterator.hasNext()Z", remap = false, ordinal = 0))
|
||||
@Inject(method = "render", at = @At(value = "INVOKE", target = "java/util/Iterator.hasNext()Z", ordinal = 0))
|
||||
private void beforeRenderFallingBlocks(BatchingRenderCommandQueue queue, VertexConsumerProvider.Immediate vertexConsumers, BlockRenderManager blockRenderManager, OutlineVertexConsumerProvider outlineVertexConsumerProvider, CallbackInfo ci, @Local Iterator<OrderedRenderCommandQueueImpl.MovingBlockCommand> iterator) {
|
||||
while (iterator.hasNext()) {
|
||||
OrderedRenderCommandQueueImpl.MovingBlockCommand fallingBlockCommand = iterator.next();
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ import net.fabricmc.fabric.impl.client.rendering.EntityModelLayerImpl;
|
|||
|
||||
@Mixin(EntityModels.class)
|
||||
abstract class EntityModelsMixin {
|
||||
@Inject(method = "getModels", at = @At(value = "INVOKE", target = "Lcom/google/common/collect/ImmutableMap$Builder;build()Lcom/google/common/collect/ImmutableMap;", remap = false))
|
||||
@Inject(method = "getModels", at = @At(value = "INVOKE", target = "Lcom/google/common/collect/ImmutableMap$Builder;build()Lcom/google/common/collect/ImmutableMap;"))
|
||||
private static void registerExtraModelData(CallbackInfoReturnable<Map<EntityModelLayer, TexturedModelData>> info, @Local ImmutableMap.Builder<EntityModelLayer, TexturedModelData> builder) {
|
||||
for (Map.Entry<EntityModelLayer, EntityModelLayerRegistry.TexturedModelDataProvider> entry : EntityModelLayerImpl.PROVIDERS.entrySet()) {
|
||||
builder.put(entry.getKey(), entry.getValue().createModelData());
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public class JsonDataLoaderMixin {
|
|||
@Unique
|
||||
private static final Object SKIP_DATA_MARKER = new Object();
|
||||
|
||||
@WrapOperation(method = "load(Lnet/minecraft/resource/ResourceManager;Lnet/minecraft/resource/ResourceFinder;Lcom/mojang/serialization/DynamicOps;Lcom/mojang/serialization/Codec;Ljava/util/Map;)V", at = @At(value = "INVOKE", target = "Lcom/mojang/serialization/Codec;parse(Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;", remap = false))
|
||||
@WrapOperation(method = "load(Lnet/minecraft/resource/ResourceManager;Lnet/minecraft/resource/ResourceFinder;Lcom/mojang/serialization/DynamicOps;Lcom/mojang/serialization/Codec;Ljava/util/Map;)V", at = @At(value = "INVOKE", target = "Lcom/mojang/serialization/Codec;parse(Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;"))
|
||||
private static DataResult<?> applyResourceConditions(Codec<?> instance, DynamicOps<JsonElement> dynamicOps, Object object, Operation<DataResult<?>> original,
|
||||
@Local(argsOnly = true) ResourceFinder resourceFinder,
|
||||
@Local Map.Entry<Identifier, Resource> entry) {
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ public class RegistryLoaderMixin {
|
|||
|
||||
@Inject(
|
||||
method = "Lnet/minecraft/registry/RegistryLoader;parseAndAdd(Lnet/minecraft/registry/MutableRegistry;Lcom/mojang/serialization/Decoder;Lnet/minecraft/registry/RegistryOps;Lnet/minecraft/registry/RegistryKey;Lnet/minecraft/resource/Resource;Lnet/minecraft/registry/entry/RegistryEntryInfo;)V",
|
||||
at = @At(value = "INVOKE", target = "Lcom/mojang/serialization/Decoder;parse(Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;", remap = false),
|
||||
at = @At(value = "INVOKE", target = "Lcom/mojang/serialization/Decoder;parse(Lcom/mojang/serialization/DynamicOps;Ljava/lang/Object;)Lcom/mojang/serialization/DataResult;"),
|
||||
cancellable = true
|
||||
)
|
||||
private static <E> void checkResourceCondition(
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class LanguageMixin {
|
|||
@Final
|
||||
private static Logger LOGGER;
|
||||
|
||||
@Redirect(method = "create", at = @At(value = "INVOKE", target = "Ljava/util/Map;copyOf(Ljava/util/Map;)Ljava/util/Map;", remap = false))
|
||||
@Redirect(method = "create", at = @At(value = "INVOKE", target = "Ljava/util/Map;copyOf(Ljava/util/Map;)Ljava/util/Map;"))
|
||||
private static Map<String, String> create(Map<String, String> map) {
|
||||
for (Path path : ServerLanguageUtil.getModLanguageFiles()) {
|
||||
loadFromPath(path, map::put);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue