Skip to content

Commit

Permalink
Reverse fuck AssetLoaderMixin & Update the puzzle loader lib + the Ma…
Browse files Browse the repository at this point in the history
…in FluxPuzzle class
  • Loading branch information
Mr-Zombii committed May 31, 2024
1 parent c43d9db commit 091d6c7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Binary file modified lib/PuzzleLoader-1.0.0-all.jar
Binary file not shown.
6 changes: 3 additions & 3 deletions src/main/java/dev/crmodders/flux/FluxPuzzle.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
import dev.crmodders.flux.logging.LoggingAgent;
import dev.crmodders.flux.logging.impl.CustomizableLogger;
import dev.crmodders.flux.logging.impl.SimpleColouredLogger;
import dev.crmodders.puzzle.entrypoint.interfaces.PreInitModInitializer;
import dev.crmodders.puzzle.core.entrypoint.interfaces.PreInitModInitializer;
import org.greenrobot.eventbus.Subscribe;

public class FluxPuzzle implements PreInitModInitializer {

public static final CustomizableLogger LOGGER = LoggingAgent.getLogger("FluxAPIAppel", CustomizableLogger.class);
public static final CustomizableLogger LOGGER = LoggingAgent.getLogger("FluxPuzzle", CustomizableLogger.class);

@Override
public void onPreInit() {
LOGGER.setMessageColorizer((level, string) -> string);
LoggingAgent.setDefaultLoggingClass(SimpleColouredLogger.class);

LOGGER.info("Flux Appel Edition Initialized");
LOGGER.info("Flux Puzzle Edition Initialized");
FluxRegistries.EVENT_BUS.register(this);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class AssetLoaderMixin {
**/
@Inject(method = "loadAsset(Ljava/lang/String;Z)Lcom/badlogic/gdx/files/FileHandle;", at = @At("HEAD"), cancellable = true)
private static void loadAsset(String fileName, boolean forceReload, CallbackInfoReturnable<FileHandle> cir) {
dev.crmodders.puzzle.game.tags.Identifier location = dev.crmodders.puzzle.game.tags.Identifier.fromString(fileName);
Identifier location = Identifier.fromString(fileName);
if (!forceReload && ALL_ASSETS.containsKey(location.toString())) {
cir.setReturnValue(ALL_ASSETS.get(location.toString()));
return;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/dev/crmodders/flux/util/LoaderDetector.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ static boolean isOnQuiltBasedLoader() {

static boolean isOnPuzzleLoader() {
try {
LoaderDetector.class.getClassLoader().loadClass("dev.crmodders.puzzle.launch.Piece");
LoaderDetector.class.getClassLoader().loadClass("dev.crmodders.puzzle.core.launch.Piece");
} catch (ClassNotFoundException e) {
return false;
}
Expand Down

0 comments on commit 091d6c7

Please sign in to comment.