Replace mod work manager queue during vanilla bootstrap
instead of in mixin plugin
This commit is contained in:
parent
86629e7773
commit
ee8eb02e6d
|
|
@ -85,7 +85,6 @@ public class ModernFixMixinPlugin implements IMixinConfigPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
FastAccessTransformerList.attemptReplace();
|
FastAccessTransformerList.attemptReplace();
|
||||||
ModWorkManagerQueue.replace();
|
|
||||||
DFUBlaster.blastMaps();
|
DFUBlaster.blastMaps();
|
||||||
|
|
||||||
/* https://github.com/FabricMC/Mixin/pull/99 */
|
/* https://github.com/FabricMC/Mixin/pull/99 */
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
package org.embeddedt.modernfix.mixin.core;
|
||||||
|
|
||||||
|
import net.minecraft.server.Bootstrap;
|
||||||
|
import org.apache.logging.log4j.Logger;
|
||||||
|
import org.embeddedt.modernfix.load.ModWorkManagerQueue;
|
||||||
|
import org.spongepowered.asm.mixin.Final;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
|
@Mixin(Bootstrap.class)
|
||||||
|
public class BootstrapMixin {
|
||||||
|
@Shadow private static boolean isBootstrapped;
|
||||||
|
|
||||||
|
@Shadow @Final private static Logger LOGGER;
|
||||||
|
|
||||||
|
@Inject(method = "bootStrap", at = @At("HEAD"))
|
||||||
|
private static void doModernFixBootstrap(CallbackInfo ci) {
|
||||||
|
if(!isBootstrapped) {
|
||||||
|
LOGGER.info("ModernFix bootstrap");
|
||||||
|
ModWorkManagerQueue.replace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
"compatibilityLevel": "JAVA_8",
|
"compatibilityLevel": "JAVA_8",
|
||||||
"refmap": "modernfix.refmap.json",
|
"refmap": "modernfix.refmap.json",
|
||||||
"mixins": [
|
"mixins": [
|
||||||
|
"core.BootstrapMixin",
|
||||||
"bugfix.edge_chunk_not_saved.ChunkManagerMixin",
|
"bugfix.edge_chunk_not_saved.ChunkManagerMixin",
|
||||||
"bugfix.starlight_emptiness.StarLightEngineMixin",
|
"bugfix.starlight_emptiness.StarLightEngineMixin",
|
||||||
"perf.dynamic_structure_manager.StructureManagerMixin",
|
"perf.dynamic_structure_manager.StructureManagerMixin",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user