Skip to content

Commit

Permalink
dump
Browse files Browse the repository at this point in the history
  • Loading branch information
nextdayy committed Jan 30, 2025
1 parent 5b16994 commit 7705689
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
3 changes: 2 additions & 1 deletion modules/events/api/events.api
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ public class org/polyfrost/oneconfig/api/event/v1/events/WorldUnloadEvent : org/
}

public abstract interface class org/polyfrost/oneconfig/api/event/v1/invoke/EventCollector {
public abstract fun collect (Ljava/lang/Object;)Ljava/util/List;
public abstract fun collect (Ljava/lang/Object;)Ljava/lang/Iterable;
}

public abstract class org/polyfrost/oneconfig/api/event/v1/invoke/EventHandler : java/lang/Comparable {
Expand All @@ -244,6 +244,7 @@ public abstract class org/polyfrost/oneconfig/api/event/v1/invoke/EventHandler :

public class org/polyfrost/oneconfig/api/event/v1/invoke/impl/AnnotationEventMapper : org/polyfrost/oneconfig/api/event/v1/invoke/EventCollector {
public fun <init> ()V
public synthetic fun collect (Ljava/lang/Object;)Ljava/lang/Iterable;
public fun collect (Ljava/lang/Object;)Ljava/util/List;
}

Expand Down
1 change: 1 addition & 0 deletions modules/utils/api/utils.api
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public abstract interface class org/polyfrost/oneconfig/api/platform/v1/I18nPlat
}

public abstract interface class org/polyfrost/oneconfig/api/platform/v1/LoaderPlatform {
public abstract fun addToClasspath (Ljava/nio/file/Path;)V
public fun getLoadedMod (Ljava/lang/String;)Lorg/polyfrost/oneconfig/api/platform/v1/LoaderPlatform$ActiveMod;
public abstract fun getLoadedMods ()Ljava/util/List;
public abstract fun getLoader ()Lorg/polyfrost/oneconfig/api/platform/v1/LoaderPlatform$Loaders;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,15 @@ public abstract class Mixin_ChatSendEvent {
@Unique
private ChatSendEvent ocfg$chatEvent;

@Inject(method = "sendChatMessage", at = @At("HEAD"), cancellable = true)
@Unique
private static final String SEND_MESSAGE_SIGNATURE =
//#if FABRIC && MC > 1.19
//$$ "sendMessage(Lnet/minecraft/text/Text;)V";
//#else
"sendChatMessage";
//#endif

@Inject(method = SEND_MESSAGE_SIGNATURE, at = @At("HEAD"), cancellable = true)
public void chatCallback(
//#if MC < 1.19
String message,
Expand Down Expand Up @@ -73,7 +81,7 @@ public void chatCallback(
}
}

@ModifyVariable(method = "sendChatMessage", at = @At("HEAD"), ordinal = 0, argsOnly = true)
@ModifyVariable(method = SEND_MESSAGE_SIGNATURE, at = @At("HEAD"), ordinal = 0, argsOnly = true)
public String modifyMessage(String message) {
return ocfg$chatEvent.message;
}
Expand Down

0 comments on commit 7705689

Please sign in to comment.