Skip to content
This repository has been archived by the owner on May 26, 2018. It is now read-only.

Delay initialization of minecraft commands until after mod pre-init #498

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--- ../src-base/minecraft/net/minecraft/command/ServerCommandManager.java
+++ ../src-work/minecraft/net/minecraft/command/ServerCommandManager.java
@@ -39,7 +39,7 @@
{
private static final String __OBFID = "CL_00000922";

- public ServerCommandManager()
+ public void delayInit()
{
this.func_71560_a(new CommandTime());
this.func_71560_a(new CommandGameMode());
@@ -96,6 +96,8 @@
{
this.func_71560_a(new CommandPublishLocalServer());
}
+ }
+ public ServerCommandManager(){

CommandBase.func_71529_a(this);
}
3 changes: 3 additions & 0 deletions src/main/java/cpw/mods/fml/common/FMLCommonHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;

import net.minecraft.command.ServerCommandManager;
import net.minecraft.crash.CrashReport;
import net.minecraft.crash.CrashReportCategory;
import net.minecraft.entity.item.EntityItem;
Expand Down Expand Up @@ -312,6 +313,8 @@ public void onServerStart(MinecraftServer dedicatedServer)
{
FMLServerHandler.instance();
sidedDelegate.beginServerLoading(dedicatedServer);
ServerCommandManager sch = (ServerCommandManager) dedicatedServer.getCommandManager();
sch.delayInit();
}

public void onServerStarted()
Expand Down