Skip to content

Commit

Permalink
Prevent FabricAPI from breaking the clientside fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphiMC committed Nov 26, 2023
1 parent 4c11cbd commit 67285d4
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@
import de.florianmichael.viafabricplus.fixes.classic.CustomClassicProtocolExtensions;
import de.florianmichael.viafabricplus.fixes.classic.screen.ClassicItemSelectionScreen;
import de.florianmichael.viafabricplus.injection.ViaFabricPlusMixinPlugin;
import net.lenni0451.reflect.stream.RStream;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.font.FontStorage;
import net.minecraft.network.PacketByteBuf;
import net.raphimc.vialegacy.protocols.classic.protocolc0_28_30toc0_28_30cpe.data.ClassicProtocolExtension;
import net.raphimc.vialoader.util.VersionEnum;

import java.util.Collections;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Consumer;
Expand Down Expand Up @@ -96,6 +99,12 @@ public static void init() {
currentChatLength = Short.MAX_VALUE * 2;
}
});

// Force unload some FabricAPI mixins because FabricAPI overwrites some of the elytra code

This comment has been minimized.

Copy link
@Kichura

Kichura Nov 26, 2023

Member

fabric moment.

This comment has been minimized.

Copy link
@RaphiMC

RaphiMC Nov 26, 2023

Author Member

true

This comment has been minimized.

Copy link
@Earthcomputer

Earthcomputer Nov 26, 2023

Contributor

This code is so cursed

This comment has been minimized.

Copy link
@FlorianMichael

FlorianMichael Nov 26, 2023

Member

ViaFabricPlus moment

final Set<String> loadedMixins = RStream.of("org.spongepowered.asm.mixin.transformer.MixinConfig").fields().by("globalMixinList").get();
Collections.addAll(loadedMixins, "net.fabricmc.fabric.mixin.client.entity.event.elytra.ClientPlayerEntityMixin",
"net.fabricmc.fabric.mixin.entity.event.elytra.LivingEntityMixin",
"net.fabricmc.fabric.mixin.entity.event.elytra.PlayerEntityMixin");
}

/**
Expand Down

0 comments on commit 67285d4

Please sign in to comment.