mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-17 02:55:17 +00:00
Some tweaks around the code base. A functional consumer for networking - return a bool from your consumer function, rather than setPacketHandled.
Tweak the server modloading behaviour to try and be a bit clearer that a mod errored. Signed-off-by: cpw <[email protected]>
This commit is contained in:
7 files changed
+80
-15
No files matched your search
@@ -60,6 +60,7 @@ import net.minecraft.world.dimension.DimensionType;
|
||||
import net.minecraftforge.event.world.RegisterDimensionsEvent;
|
||||
import net.minecraftforge.event.world.WorldEvent;
|
||||
import net.minecraftforge.fml.StartupQuery;
|
||||
import net.minecraftforge.fml.server.ServerModLoader;
|
||||
import net.minecraftforge.registries.ClearableRegistry;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
|
||||
@@ -160,6 +161,9 @@ public class DimensionManager
|
||||
Validate.notNull(server, "Must provide server when creating world");
|
||||
Validate.notNull(dim, "Dimension type must not be null");
|
||||
|
||||
if (ServerModLoader.hasErrors()) {
|
||||
throw new RuntimeException("The server has failed to initialize correctly due to mod loading errors. Examine the crash report for more details.");
|
||||
}
|
||||
// If we're in the early stages of loading, we need to return null so CommandSource can work properly for command function
|
||||
if (StartupQuery.pendingQuery()) {
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user