Skip to content

Commit

Permalink
Allow debugReloader option to also work with datapack reloads
Browse files Browse the repository at this point in the history
Related: #397
  • Loading branch information
embeddedt committed Jul 25, 2024
1 parent 66ef304 commit 4ee8c41
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package org.embeddedt.modernfix.common.mixin.feature.measure_time;

import net.minecraft.server.packs.resources.SimpleReloadInstance;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.ModifyVariable;

@Mixin(SimpleReloadInstance.class)
public class SimpleReloadInstanceMixin {
// TODO maybe expose as a mixin config
private static final boolean ENABLE_DEBUG_RELOADER = Boolean.getBoolean("modernfix.debugReloader");
/**
* @author embeddedt
* @reason add ability to use this feature in modpacks
*/
@ModifyVariable(method = "create", at = @At("HEAD"), argsOnly = true)
private static boolean enableDebugReloader(boolean bl) {
return bl || ENABLE_DEBUG_RELOADER;
}
}

This file was deleted.

0 comments on commit 4ee8c41

Please sign in to comment.