本文整理了Java中net.minecraft.client.Minecraft.isIntegratedServerRunning()
方法的一些代码示例,展示了Minecraft.isIntegratedServerRunning()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Minecraft.isIntegratedServerRunning()
方法的具体详情如下:
包路径:net.minecraft.client.Minecraft
类名称:Minecraft
方法名:isIntegratedServerRunning
暂无
代码示例来源:origin: gegy1000/Terrarium
@Override
public boolean hasServer() {
return Minecraft.getMinecraft().isIntegratedServerRunning();
}
代码示例来源:origin: SleepyTrousers/EnderCore
/**
* For internal use only. Do not call.
*/
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onClientTick(ClientTickEvent event) {
if (event.phase == Phase.END) {
runTasks(clientQueue);
if (!serverQueue.isEmpty() && !Minecraft.getMinecraft().isIntegratedServerRunning()) {
serverQueue.clear();
}
}
}
代码示例来源:origin: gegy1000/Terrarium
@SubscribeEvent
public static void onJoinWorld(WorldEvent.Load event) {
World world = event.getWorld();
if (world.isRemote) {
if (world.getWorldType() instanceof TerrariumWorldType && MC.isIntegratedServerRunning()) {
awaitingLoad = true;
}
if (Terrarium.serverHasMod) {
handshakeQueued = true;
}
}
}
代码示例来源:origin: SleepyTrousers/EnderIO
public static BaublesUtil.WhoAmI whoAmI(World world) {
Side side = FMLCommonHandler.instance().getSide();
if (side == Side.CLIENT) {
if (Minecraft.getMinecraft().isIntegratedServerRunning()) {
if (world.isRemote) {
return SPCLIENT;
} else {
return SPSERVER;
}
} else {
return MPCLIENT;
}
} else if (side == Side.SERVER) {
if (FMLCommonHandler.instance().getMinecraftServerInstance().isDedicatedServer()) {
return MPSERVER;
} else if (Minecraft.getMinecraft().isIntegratedServerRunning()) {
return SPSERVER;
}
}
return OTHER;
}
}
代码示例来源:origin: SleepyTrousers/EnderIO
@Override
public IMessage onMessage(PacketCapacitorSync message, MessageContext ctx) {
if (!Minecraft.getMinecraft().isIntegratedServerRunning()) {
for (Triple<ResourceLocation, Integer, String> triple : message.data) {
CapacitorKeyRegistry.addOverride(NullHelper.notnull(triple.getLeft(), "internal error"), triple.getMiddle(), triple.getRight());
}
Log.debug("Added server config overrides for capacitor keys");
} else {
Log.debug("Ignoring server config overrides for capacitor keys in sinple player");
}
return null;
}
}
代码示例来源:origin: lorddusk/HQM
public EntityPlayerMP getPlayerMP() {
if(HardcoreQuesting.loadingSide.isServer()){
return FMLCommonHandler.instance().getMinecraftServerInstance().getPlayerList().getPlayerByUUID(this.getUUID());
} else {
if(Minecraft.getMinecraft().isIntegratedServerRunning()){
return Minecraft.getMinecraft().getIntegratedServer().getPlayerList().getPlayerByUUID(this.getUUID());
}
}
return null;
}
}
代码示例来源:origin: TehNut/HWYLA
public static void renderOverlay() {
if (WailaTickHandler.instance().tooltip == null)
return;
if (!ConfigHandler.instance().showTooltip())
return;
Minecraft mc = Minecraft.getMinecraft();
if (mc.currentScreen != null || mc.world == null)
return;
if (ConfigHandler.instance().hideFromList() && (mc.gameSettings.keyBindPlayerList.isKeyDown() && !mc.isIntegratedServerRunning()))
return;
if (!Minecraft.isGuiEnabled())
return;
if (mc.gameSettings.showDebugInfo && ConfigHandler.instance().hideFromDebug())
return;
if (RayTracing.instance().getTarget() == null)
return;
if (RayTracing.instance().getTarget().typeOfHit == RayTraceResult.Type.BLOCK && !RayTracing.instance().getTargetStack().isEmpty())
renderOverlay(WailaTickHandler.instance().tooltip);
if (RayTracing.instance().getTarget().typeOfHit == RayTraceResult.Type.ENTITY && ConfigHandler.instance().getConfig("general.showents"))
renderOverlay(WailaTickHandler.instance().tooltip);
}
代码示例来源:origin: Funwayguy/BetterQuesting
if(Minecraft.getMinecraft().isIntegratedServerRunning() && SaveLoadHandler.INSTANCE.hasUpdate())
内容来源于网络,如有侵权,请联系作者删除!