Java 类net.minecraft.client.renderer.tileentity.TileEntityBeaconRenderer 实例源码

项目:RuneCraftery    文件:TileEntityRenderer.java   
private TileEntityRenderer() {
   this.field_76966_m.put(TileEntitySign.class, new TileEntitySignRenderer());
   this.field_76966_m.put(TileEntityMobSpawner.class, new TileEntityMobSpawnerRenderer());
   this.field_76966_m.put(TileEntityPiston.class, new TileEntityRendererPiston());
   this.field_76966_m.put(TileEntityChest.class, new TileEntityChestRenderer());
   this.field_76966_m.put(TileEntityEnderChest.class, new TileEntityEnderChestRenderer());
   this.field_76966_m.put(TileEntityEnchantmentTable.class, new RenderEnchantmentTable());
   this.field_76966_m.put(TileEntityEndPortal.class, new RenderEndPortal());
   this.field_76966_m.put(TileEntityBeacon.class, new TileEntityBeaconRenderer());
   this.field_76966_m.put(TileEntitySkull.class, new TileEntitySkullRenderer());
   Iterator var1 = this.field_76966_m.values().iterator();

   while(var1.hasNext()) {
      TileEntitySpecialRenderer var2 = (TileEntitySpecialRenderer)var1.next();
      var2.func_76893_a(this);
   }

}
项目:Cyclic    文件:TileEntityBeaconPotionRenderer.java   
public void renderBeacon(double x, double y, double z, double partialTicks, double textureScale, List<TileEntityBeaconPotion.BeamSegment> beamSegments, double totalWorldTime) {
  GlStateManager.alphaFunc(516, 0.1F);
  this.bindTexture(TEXTURE_BEACON_BEAM);
  if (textureScale > 0.0D) {
    GlStateManager.disableFog();
    int i = 0;
    for (int j = 0; j < beamSegments.size(); ++j) {
      TileEntityBeaconPotion.BeamSegment tileentitybeacon$beamsegment = beamSegments.get(j);
      TileEntityBeaconRenderer.renderBeamSegment(x, y, z, partialTicks, textureScale, totalWorldTime, i, tileentitybeacon$beamsegment.getHeight(), tileentitybeacon$beamsegment.getColors());
      i += tileentitybeacon$beamsegment.getHeight();
    }
    GlStateManager.enableFog();
  }
}
项目:Cyclic    文件:TileEntityBeaconRedstoneRenderer.java   
public void renderBeacon(double x, double y, double z, double partialTicks, double textureScale, List<TileEntityBeaconPowered.BeamSegment> beamSegments, double totalWorldTime) {
  GlStateManager.alphaFunc(516, 0.1F);
  this.bindTexture(TEXTURE_BEACON_BEAM);
  if (textureScale > 0.0D) {
    GlStateManager.disableFog();
    int i = 0;
    for (int j = 0; j < beamSegments.size(); ++j) {
      TileEntityBeaconPowered.BeamSegment tileentitybeacon$beamsegment = beamSegments.get(j);
      TileEntityBeaconRenderer.renderBeamSegment(x, y, z, partialTicks, textureScale, totalWorldTime, i, tileentitybeacon$beamsegment.getHeight(), tileentitybeacon$beamsegment.getColors());
      i += tileentitybeacon$beamsegment.getHeight();
    }
    GlStateManager.enableFog();
  }
}
项目:Runes-of-Wizardry    文件:RenderDustActive.java   
private void drawBeam(TileEntityDustActive te,float partialTicks) {
    GlStateManager.alphaFunc(GL11.GL_GEQUAL, 0.1F);
    //looks like the GL flags get reset by the renderBeamSegment thing, so we are stuck with the solid beam if we want to just call instead of copy
    this.bindTexture(getBeamTexture(te.beamdata));
       GlStateManager.disableFog();
    Color beamColor = new Color(te.beamdata.color);
    Vec3d off = te.beamdata.offset;
    float[] colors = new float[]{beamColor.getRed()/255F,beamColor.getGreen()/255F,beamColor.getBlue()/255F};
    //renderBeamSegment(double x, double y, double z, double partialTicks, double shouldBeamrender, double totalWorldTime, int verticalOffset, int height, float[] colors, double beamRadius, double glowRadius)
    //looks like shouldBeamRender affects the scale/speed of the texture animation
    TileEntityBeaconRenderer.renderBeamSegment(off.x, off.y, off.z, partialTicks, getTextureScale(te.beamdata), te.beamdata.doesRotate?(double)te.getWorld().getTotalWorldTime() : partialTicks, 0, te.beamdata.height, colors, te.beamdata.beamRadius,te.beamdata.glowRadius);
    GlStateManager.enableFog();
}
项目:Runes-of-Wizardry    文件:RenderDustActive.java   
private static ResourceLocation getBeamTexture(BeamData data){
    switch(data.type){
    case BEACON:return TileEntityBeaconRenderer.TEXTURE_BEACON_BEAM;
    case SPIRAL:return TEXTURE_SPIRAL_BEAM;
    case RINGS: return TEXTURE_RING_BEAM;
    case CUSTOM: if(data.customTexture!=null)return data.customTexture;
        //$FALL-THROUGH$
    default:return MISSING_TEXTURE;
    }
}