mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 00:37:52 +00:00
NOTES: 1. Network is completely broken. 2. GameRegistry is partially broken. 3. ID sync is not in.
96 lines
3.1 KiB
Diff
96 lines
3.1 KiB
Diff
--- ../src-base/minecraft/net/minecraft/server/MinecraftServer.java
|
|
+++ ../src-work/minecraft/net/minecraft/server/MinecraftServer.java
|
|
@@ -4,6 +4,8 @@
|
|
import com.mojang.authlib.GameProfile;
|
|
import com.mojang.authlib.minecraft.MinecraftSessionService;
|
|
import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService;
|
|
+
|
|
+import cpw.mods.fml.common.FMLCommonHandler;
|
|
import cpw.mods.fml.relauncher.Side;
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
import io.netty.buffer.ByteBuf;
|
|
@@ -381,7 +383,11 @@
|
|
{
|
|
if (this.func_71197_b())
|
|
{
|
|
+ FMLCommonHandler.instance().handleServerStarted();
|
|
+
|
|
long i = func_130071_aq();
|
|
+
|
|
+ FMLCommonHandler.instance().onWorldLoadTick(field_71305_c);
|
|
long j = 0L;
|
|
this.field_147147_p.func_151315_a(new ChatComponentText(this.field_71286_C));
|
|
this.field_147147_p.func_151321_a(new ServerStatusResponse.MinecraftProtocolVersionIdentifier("1.7.2", 4));
|
|
@@ -425,6 +431,7 @@
|
|
Thread.sleep(1L);
|
|
this.field_71296_Q = true;
|
|
}
|
|
+ FMLCommonHandler.instance().handleServerStopping();
|
|
}
|
|
else
|
|
{
|
|
@@ -462,6 +469,10 @@
|
|
{
|
|
try
|
|
{
|
|
+ if (FMLCommonHandler.instance().shouldServerBeKilledQuietly())
|
|
+ {
|
|
+ return;
|
|
+ }
|
|
this.func_71260_j();
|
|
this.field_71316_v = true;
|
|
}
|
|
@@ -471,6 +482,8 @@
|
|
}
|
|
finally
|
|
{
|
|
+ FMLCommonHandler.instance().handleServerStopped();
|
|
+ this.field_71316_v = true;
|
|
this.func_71240_o();
|
|
}
|
|
}
|
|
@@ -511,8 +524,10 @@
|
|
|
|
public void func_71217_p()
|
|
{
|
|
+ FMLCommonHandler.instance().rescheduleTicks(Side.SERVER);
|
|
long i = System.nanoTime();
|
|
AxisAlignedBB.func_72332_a().func_72298_a();
|
|
+ FMLCommonHandler.instance().onPreServerTick();
|
|
++this.field_71315_w;
|
|
|
|
if (this.field_71295_T)
|
|
@@ -566,6 +581,7 @@
|
|
|
|
this.field_71304_b.func_76319_b();
|
|
this.field_71304_b.func_76319_b();
|
|
+ FMLCommonHandler.instance().onPostServerTick();
|
|
}
|
|
|
|
public void func_71190_q()
|
|
@@ -593,6 +609,7 @@
|
|
}
|
|
|
|
this.field_71304_b.func_76320_a("tick");
|
|
+ FMLCommonHandler.instance().onPreWorldTick(worldserver);
|
|
CrashReport crashreport;
|
|
|
|
try
|
|
@@ -617,6 +634,7 @@
|
|
throw new ReportedException(crashreport);
|
|
}
|
|
|
|
+ FMLCommonHandler.instance().onPostWorldTick(worldserver);
|
|
this.field_71304_b.func_76319_b();
|
|
this.field_71304_b.func_76320_a("tracker");
|
|
worldserver.func_73039_n().func_72788_a();
|
|
@@ -695,7 +713,7 @@
|
|
|
|
public String getServerModName()
|
|
{
|
|
- return "vanilla";
|
|
+ return FMLCommonHandler.instance().getModName();
|
|
}
|
|
|
|
public CrashReport func_71230_b(CrashReport p_71230_1_)
|