net.minecraft.client.Minecraft.isSingleplayer()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(138)

本文整理了Java中net.minecraft.client.Minecraft.isSingleplayer()方法的一些代码示例,展示了Minecraft.isSingleplayer()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Minecraft.isSingleplayer()方法的具体详情如下:
包路径:net.minecraft.client.Minecraft
类名称:Minecraft
方法名:isSingleplayer

Minecraft.isSingleplayer介绍

暂无

代码示例

代码示例来源:origin: Vazkii/Botania

event.getLeft().add(PREFIX + "(CLIENT) netColl: " + ManaNetworkHandler.instance.getAllCollectorsInWorld(world).size() + ", netPool: " + ManaNetworkHandler.instance.getAllPoolsInWorld(world).size() + ", rv: " + version);
if (Minecraft.getMinecraft().isSingleplayer()) {
  UUID id = Minecraft.getMinecraft().player.getUniqueID();
  Entity ent = Minecraft.getMinecraft().getIntegratedServer().getEntityFromUuid(id);

代码示例来源:origin: Zyin055/zyinhud

/**
 * Determines an appropriate duration in milliseconds that should be used as the delay for swapping items
 * around in the inventory.
 * @return
 */
public static int GetSuggestedItemSwapDelay()
{
  //on single player there is very little lag, so we can set the delay betwen swapping items around
  //to be very small, but the ping on servers requires us to have a larger value in order to work more reliably.
  if(mc.isSingleplayer())
    return suggestedItemSwapDelay = 170;
  else
    return suggestedItemSwapDelay = 450;
}

代码示例来源:origin: MrCrayfish/MrCrayfishFurnitureMod

@Override
public boolean isSinglePlayer()
{
  return Minecraft.getMinecraft().isSingleplayer();
}

代码示例来源:origin: portablejim/VeinMiner

public ConfigGuiScreen(GuiScreen parent) {
  this.parent = parent;
  isSingleplayer = Minecraft.getMinecraft().isSingleplayer() || Minecraft.getMinecraft().theWorld == null;
  VeinMiner.instance.configurationSettings.reloadConfigFile();
  toolIds = new ArrayList<ToolDisplay>();
  for(String toolType : settings.getToolTypeNames()) {
    toolIds.add(new ToolDisplay(toolType, settings.getToolTypeIcon(toolType), settings.getToolTypeName(toolType)));
  }
  Collections.sort(toolIds, new Comparator<ToolDisplay>() {
    @Override
    public int compare(ToolDisplay toolDisplay, ToolDisplay toolDisplay2) {
      if(toolDisplay.name == null) return -1;
      if(toolDisplay2.name == null) return 1;
      String s1 = toolDisplay.name.toLowerCase();
      String s2 = toolDisplay2.name.toLowerCase();
      return s1.compareTo(s2);
    }
  });
  oldMode = settings.getPreferredMode();
}

代码示例来源:origin: Zyin055/zyinhud

if (!mc.isSingleplayer())
    continue;
  if (!mc.isSingleplayer()
      && currentInventory[memory].isItemEnchanted())
    continue;

代码示例来源:origin: ata4/dragon-mounts

private void getServerDragon() {
  if (!mc.isSingleplayer()) {
    // not possible on dedicated
    return;
  }
  
  if (dragonClient == null) {
    // client dragon required
    dragonServer = null;
    return;
  }
  
  if (dragonServer != null && dragonServer.getEntityId() == dragonClient.getEntityId()) {
    // done before
    return;
  }
  
  MinecraftServer mcs = mc.getIntegratedServer();
  
  for (WorldServer ws : mcs.worldServers) {
    Entity ent = ws.getEntityByID(dragonClient.getEntityId());
    if (ent != null && ent instanceof EntityTameableDragon) {
      dragonServer = (EntityTameableDragon) ent;
      return;
    }
  }
}

代码示例来源:origin: cabaletta/baritone

if (mc.isSingleplayer() && !mc.getIntegratedServer().getPublic()) {
  mc.getIntegratedServer().shareToLAN(GameType.getByName("survival"), false);

代码示例来源:origin: Zyin055/zyinhud

if (!mc.isSingleplayer())

相关文章