/** * Return the effective side for the context in the game. This is dependent * on thread analysis to try and determine whether the code is running in the * server or not. Use at your own risk */ public Side getEffectiveSide() { Thread thr = Thread.currentThread(); if ((thr instanceof ThreadMinecraftServer) || (thr instanceof ServerListenThread)) { return Side.SERVER; } return Side.CLIENT; }
public void func_71256_s() { (new ThreadMinecraftServer(this, "Server thread")).start(); }
@Override public boolean isServer() { Thread thr = Thread.currentThread(); return thr instanceof ThreadMinecraftServer || thr instanceof ServerListenThread; }