Skip to content

Commit

Permalink
Split/rename all Mixins based on purpose
Browse files Browse the repository at this point in the history
  • Loading branch information
Deftu committed Dec 26, 2024
1 parent f7a03b3 commit 4e51be8
Show file tree
Hide file tree
Showing 60 changed files with 850 additions and 921 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(value = ClientPlayNetworkHandler.class, priority = Integer.MAX_VALUE)
public abstract class NetHandlerPlayClientMixin {
public abstract class Mixin_ChatReceiveEvent_Fabric {

@Unique
private ChatReceiveEvent ocfg$chatEvent = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import org.spongepowered.asm.mixin.gen.Invoker;

@Mixin(GameRenderer.class)
public interface GameRendererAccessor {
public interface Mixin_LoadShaderInvoker {
//#if MC<11904
@Invoker
//#else
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
*/

package org.polyfrost.oneconfig.internal.mixin;
//#if MC<11900

//#if MC < 1.19
import com.mojang.datafixers.DataFixer;
import com.mojang.datafixers.DataFixerBuilder;
import net.minecraft.util.datafix.DataFixesManager;
Expand All @@ -41,7 +41,7 @@
* Source: <a href="https://github.com/astei/lazydfu/blob/master/LICENSE">here</a>
*/
@Mixin(DataFixesManager.class)
public abstract class SchemasMixin {
public abstract class Mixin_LazyDataFixerUpper {

@Redirect(method = "createFixer", at = @At(value = "NEW", target = "com/mojang/datafixers/DataFixerBuilder", remap = false))
private static DataFixerBuilder optimize$lazydfu(int dataVersion) {
Expand All @@ -53,4 +53,4 @@ public DataFixer build(Executor executor) {
};
}
}
//#endif
//#endif

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(ClientPlayNetHandler.class)
public class ClientPlayNetworkHandlerMixin {
public class Mixin_AppendCustomCommands {

// Command API //
// Modified from Fabric API under the Apache 2.0 License //
// Source: https://github.com/FabricMC/fabric/blob/1.20.2/fabric-command-api-v2/src/client/java/net/fabricmc/fabric/mixin/command/client/ClientPlayNetworkHandlerMixin.java //
Expand All @@ -58,4 +59,5 @@ public class ClientPlayNetworkHandlerMixin {
// to be in the same dispatcher and completion results.
ClientCommandInternals.addCommands((CommandDispatcher) this.commandDispatcher, this.clientSuggestionProvider);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

@Mixin(CustomPayloadS2CPacket.class)
public class CustomPayloadS2CPacketMixin {
public class Mixin_CaptureHypixelPayloads {

@Inject(method = "readPayload", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/packet/s2c/common/CustomPayloadS2CPacket;readUnknownPayload(Lnet/minecraft/util/Identifier;Lnet/minecraft/network/PacketByteBuf;)Lnet/minecraft/network/packet/UnknownCustomPayload;"), cancellable = true)
private static void captureHypixelPacket(Identifier id, PacketByteBuf buf, CallbackInfoReturnable<CustomPayload> cir) {
if (HypixelModAPI.getInstance().getRegistry().isRegistered(id.toString())) {
cir.setReturnValue(new HypixelApiInternalsImpl.Payload(id, buf));
}
}

}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
//$$ net.minecraft.entity.ai.pathing.PathNodeMaker.class
//#endif
)
public abstract class ChatScreenMixin {
public abstract class Mixin_IncludeCommandSuggestions {
//@formatter:off
private static final String m_showSuggestion =
//#if MC==10809
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(value = ClientPlayNetworkHandler.class, priority = Integer.MAX_VALUE)
public abstract class NetHandlerPlayClientMixin {
public abstract class Mixin_ChatReceiveEvent_Fabric {

//@formatter:off
@Unique
Expand Down
Loading

0 comments on commit 4e51be8

Please sign in to comment.