Skip to content

Commit 4ee8c41

Browse files
committed
Allow debugReloader option to also work with datapack reloads
Related: #397
1 parent 66ef304 commit 4ee8c41

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package org.embeddedt.modernfix.common.mixin.feature.measure_time;
2+
3+
import net.minecraft.server.packs.resources.SimpleReloadInstance;
4+
import org.spongepowered.asm.mixin.Mixin;
5+
import org.spongepowered.asm.mixin.injection.At;
6+
import org.spongepowered.asm.mixin.injection.ModifyVariable;
7+
8+
@Mixin(SimpleReloadInstance.class)
9+
public class SimpleReloadInstanceMixin {
10+
// TODO maybe expose as a mixin config
11+
private static final boolean ENABLE_DEBUG_RELOADER = Boolean.getBoolean("modernfix.debugReloader");
12+
/**
13+
* @author embeddedt
14+
* @reason add ability to use this feature in modpacks
15+
*/
16+
@ModifyVariable(method = "create", at = @At("HEAD"), argsOnly = true)
17+
private static boolean enableDebugReloader(boolean bl) {
18+
return bl || ENABLE_DEBUG_RELOADER;
19+
}
20+
}

common/src/main/java/org/embeddedt/modernfix/common/mixin/feature/measure_time/SimpleReloadableResourceManagerMixin.java

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)