net.minecraft.entity.Entity.isInvisible()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(5.0k)|赞(0)|评价(0)|浏览(113)

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

Entity.isInvisible介绍

暂无

代码示例

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

time += new Random(tEntity.getEntityId()).nextInt();
float a = 0.1F + (tEntity.isInvisible() ? 0 : 1) * 0.8F;

代码示例来源:origin: MatterOverdrive/MatterOverdrive-Legacy-Edition

@SubscribeEvent
public void onPlayerRenderPre(RenderPlayerEvent.Pre event) {
  //GL11.glEnable(GL11.GL_LIGHTING);
  //GL11.glColor3f(1, 1, 1);
  AndroidPlayer androidPlayer = MOPlayerCapabilityProvider.GetAndroidCapability(event.getEntity());
  if (androidPlayer != null && androidPlayer.isAndroid() && !event.getEntity().isInvisible()) {
    for (int i = 0; i < 5; i++) {
      ItemStack part = androidPlayer.getStackInSlot(i);
      if (part != null && part.getItem() instanceof IBionicPart) {
        IBionicPartRenderer renderer = bionicPartRenderRegistry.getRenderer(((IBionicPart) part.getItem()).getClass());
        if (renderer != null) {
          renderer.affectPlayerRenderer(part, androidPlayer, event.getRenderer(), event.getPartialRenderTick());
        }
      }
    }
  }
}

代码示例来源:origin: MatterOverdrive/MatterOverdrive-Legacy-Edition

@SubscribeEvent
public void onPlayerRenderPost(RenderPlayerEvent.Post event) {
  //GL11.glEnable(GL11.GL_LIGHTING);
  //GL11.glColor3f(1, 1, 1);
  AndroidPlayer androidPlayer = MOPlayerCapabilityProvider.GetAndroidCapability(event.getEntity());
  if (androidPlayer != null && androidPlayer.isAndroid() && !event.getEntity().isInvisible()) {
    for (int i = 0; i < 5; i++) {
      ItemStack part = androidPlayer.getStackInSlot(i);
      if (part != null && part.getItem() instanceof IBionicPart) {
        IBionicPartRenderer renderer = bionicPartRenderRegistry.getRenderer(((IBionicPart) part.getItem()).getClass());
        if (renderer != null) {
          try {
            GlStateManager.pushMatrix();
            GlStateManager.enableBlend();
            renderer.renderPart(part, androidPlayer, event.getRenderer(), event.getPartialRenderTick());
            GlStateManager.popMatrix();
          } catch (Exception e) {
            MOLog.log(Level.ERROR, e, "An Error occurred while rendering bionic part");
          }
        }
      }
    }
  }
}

代码示例来源:origin: vadis365/TheErebus

@Override
public void render(Entity entity, float limbSwing, float prevLimbSwing, float entityTickTime, float rotationYaw, float rotationPitch, float unitPixel) {
  super.render(entity, limbSwing, prevLimbSwing, entityTickTime, rotationYaw, rotationPitch, unitPixel);
  leg_right_back.render(unitPixel);
  leg_right_mid.render(unitPixel);
  abdomen.render(unitPixel);
  leg_left_back.render(unitPixel);
  thorax.render(unitPixel);
  left_eye.render(unitPixel);
  leg_left_mid.render(unitPixel);
  leg_left_front.render(unitPixel);
  right_eye.render(unitPixel);
  leg_right_front.render(unitPixel);
  head.render(unitPixel);
  GlStateManager.pushMatrix();
  GlStateManager.enableBlend();
  GlStateManager.enableAlpha();
  GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
  GlStateManager.depthMask(!entity.isInvisible());
  GlStateManager.color(1F, 1F, 1F, 0.5F);
  wing_right.render(unitPixel);
  wing_left.render(unitPixel);
  GlStateManager.depthMask(true);
  GlStateManager.disableBlend();
  GlStateManager.popMatrix();
}

代码示例来源:origin: vadis365/TheErebus

GlStateManager.enableAlpha();
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
GlStateManager.depthMask(!entity.isInvisible());
GlStateManager.color(1F, 1F, 1F, 0.75F);
GlStateManager.enableCull();

代码示例来源:origin: vadis365/TheErebus

GlStateManager.enableAlpha();
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
GlStateManager.depthMask(!entity.isInvisible());
GlStateManager.color(1F, 1F, 1F, 0.75F);
WingLeft.render(f5);

代码示例来源:origin: vadis365/TheErebus

GlStateManager.enableAlpha();
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
GlStateManager.depthMask(!entity.isInvisible());
GlStateManager.color(1F, 1F, 1F, 0.75F);

代码示例来源:origin: vadis365/TheErebus

GlStateManager.enableAlpha();
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
GlStateManager.depthMask(!entity.isInvisible());
GlStateManager.color(1F, 1F, 1F, 0.75F);
RFWing.render(unitPixel);

代码示例来源:origin: vadis365/TheErebus

GlStateManager.enableAlpha();
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
GlStateManager.depthMask(!entity.isInvisible());
GlStateManager.color(1F, 1F, 1F, 0.75F);
GlStateManager.enableCull();

代码示例来源:origin: vadis365/TheErebus

GlStateManager.enableAlpha();
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
GlStateManager.depthMask(!entity.isInvisible());
GlStateManager.color(1F, 1F, 1F, 0.75F);
GlStateManager.enableCull();

代码示例来源:origin: vadis365/TheErebus

GlStateManager.enableAlpha();
GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA);
GlStateManager.depthMask(!entity.isInvisible());
GlStateManager.color(1F, 1F, 1F, 0.75F);
GlStateManager.enableCull();

相关文章

Entity类方法