-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow debugReloader option to also work with datapack reloads
Related: #397
- Loading branch information
Showing
2 changed files
with
20 additions
and
20 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
.../org/embeddedt/modernfix/common/mixin/feature/measure_time/SimpleReloadInstanceMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} |
20 changes: 0 additions & 20 deletions
20
...edt/modernfix/common/mixin/feature/measure_time/SimpleReloadableResourceManagerMixin.java
This file was deleted.
Oops, something went wrong.