Try to fix #5573 by peeling the worldclient fetch into a separate handler.

Signed-off-by: cpw <[email protected]>
This commit is contained in:
cpw committed 2019-02-27 13:45:51 -05:00
1 parent 0bcc60fbe3
commit dd7e7fc122
3 files changed
+9 -4

No files matched your search

@@ -21,14 +21,17 @@ package net.minecraftforge.fml;
import net.minecraft.client.Minecraft;
import net.minecraft.server.MinecraftServer;
import net.minecraft.world.World;
import java.util.Optional;
import java.util.function.Function;
import java.util.function.Supplier;
public enum LogicalSidedProvider
{
WORKQUEUE((c)->c.get(), (s)->s.get()),
INSTANCE((c)->c.get(), (s)->s.get())
INSTANCE((c)->c.get(), (s)->s.get()),
CLIENTWORLD((c)-> Optional.<World>of(c.get().world), (s)->Optional.<World>empty())
;
private static Supplier<Minecraft> client;
private static Supplier<MinecraftServer> server;