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

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

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

Minecraft.isFancyGraphicsEnabled介绍

暂无

代码示例

代码示例来源:origin: SonarSonic/Calculator

@Nonnull
@Override
public BlockRenderLayer getBlockLayer() {
  return Minecraft.isFancyGraphicsEnabled() ? BlockRenderLayer.CUTOUT_MIPPED : BlockRenderLayer.SOLID;
}

代码示例来源:origin: RS485/LogisticsPipes

@Override
  public void processPacket(EntityPlayer player) {
    if (!Minecraft.isFancyGraphicsEnabled()) {
      return;
    }
    for (ParticleCount pc : particles) {
      PipeFXRenderHandler.spawnGenericParticle(pc.getParticle(), getPosX(), getPosY(), getPosZ(), pc.getAmount());
    }
  }
}

代码示例来源:origin: RS485/LogisticsPipes

private void spawnParticleTick() {
  if (!hasQueuedParticles) {
    return;
  }
  if (MainProxy.isServer(getWorld())) {
    ArrayList<ParticleCount> tosend = new ArrayList<>(queuedParticles.length);
    for (int i = 0; i < queuedParticles.length; i++) {
      if (queuedParticles[i] > 0) {
        tosend.add(new ParticleCount(Particles.values()[i], queuedParticles[i]));
      }
    }
    MainProxy.sendPacketToAllWatchingChunk(getX(), getZ(), getWorld().provider.getDimension(),
        PacketHandler.getPacket(ParticleFX.class).setParticles(tosend).setPosX(getX()).setPosY(getY()).setPosZ(getZ()));
  } else {
    if (Minecraft.isFancyGraphicsEnabled()) {
      for (int i = 0; i < queuedParticles.length; i++) {
        if (queuedParticles[i] > 0) {
          PipeFXRenderHandler.spawnGenericParticle(Particles.values()[i], getX(), getY(), getZ(), queuedParticles[i]);
        }
      }
    }
  }
  for (int i = 0; i < queuedParticles.length; i++) {
    queuedParticles[i] = 0;
  }
  hasQueuedParticles = false;
}

相关文章

微信公众号

最新文章

更多