mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2024-12-03 04:20:59 +08:00
parent
e0346ff53b
commit
e755acddc0
@ -54,6 +54,7 @@
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.DistExecutor;
|
||||
import net.minecraftforge.fml.ExtensionPoint;
|
||||
import net.minecraftforge.fml.ModContainer;
|
||||
import net.minecraftforge.fml.ModLoadingContext;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
@ -63,7 +64,9 @@
|
||||
import net.minecraftforge.fml.event.server.FMLServerStoppingEvent;
|
||||
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||
import net.minecraftforge.fml.loading.FMLPaths;
|
||||
import net.minecraftforge.fml.network.FMLNetworkConstants;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@ -107,6 +110,15 @@ public ForgeWorldEdit() {
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(ThreadSafeCache.getInstance());
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
|
||||
// Mark WorldEdit as only required on the server
|
||||
ModLoadingContext.get().registerExtensionPoint(
|
||||
ExtensionPoint.DISPLAYTEST,
|
||||
() -> Pair.of(
|
||||
() -> FMLNetworkConstants.IGNORESERVERONLY,
|
||||
(a, b) -> true
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
private void init(FMLCommonSetupEvent event) {
|
||||
|
Loading…
Reference in New Issue
Block a user