更新内容
1. 修正兼容事件
This commit is contained in:
parent
e356628d5e
commit
66d00f1892
|
|
@ -33,7 +33,7 @@ mod_name=3944Realms 's Lib Mod
|
||||||
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
||||||
mod_license=MIT
|
mod_license=MIT
|
||||||
# The mod version. See https://semver.org/
|
# The mod version. See https://semver.org/
|
||||||
mod_version=0.0.24
|
mod_version=0.0.26
|
||||||
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
|
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
|
||||||
# This should match the base package used for the mod sources.
|
# This should match the base package used for the mod sources.
|
||||||
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import top.r3944realms.lib39.core.compat.ICompat;
|
||||||
/**
|
/**
|
||||||
* The type Register compat event.
|
* The type Register compat event.
|
||||||
*/
|
*/
|
||||||
public class RegisterCompatEvent extends Event implements IModBusEvent {
|
public class RegisterCompatEvent extends Event {
|
||||||
/**
|
/**
|
||||||
* The Compat manager.
|
* The Compat manager.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -208,13 +208,14 @@ public class CommonEventHandler {
|
||||||
IEventBus gameBus = MinecraftForge.EVENT_BUS;
|
IEventBus gameBus = MinecraftForge.EVENT_BUS;
|
||||||
compatManager = new CompatManager(modBus, gameBus);
|
compatManager = new CompatManager(modBus, gameBus);
|
||||||
|
|
||||||
modBus.post(new RegisterCompatEvent(compatManager));
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void onFMLComplete(FMLLoadCompleteEvent event) {
|
public static void onFMLComplete(FMLLoadCompleteEvent event) {
|
||||||
|
event.enqueueWork(() -> {
|
||||||
event.enqueueWork(() -> compatManager.initializeAll());
|
MinecraftForge.EVENT_BUS.post(new RegisterCompatEvent(compatManager));
|
||||||
|
compatManager.initializeAll();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user