コード例 #1
0
 public static boolean renderEnchantments3D(RenderItemCustom renderItem, IModel model) {
   if (currentItem != null) {
     EnchantmentList enchantments = CITUtils.findEnchantments(currentItem);
     if (!enchantments.isEmpty()) {
       renderingEnchantment = true;
       Enchantment.beginOuter3D();
       for (int i = 0; i < enchantments.size(); i++) {
         Enchantment enchantment = enchantments.getEnchantment(i);
         float intensity = enchantments.getIntensity(i);
         if (intensity > 0.0f && enchantment.bindTexture(null)) {
           enchantment.begin(intensity);
           renderItem.renderItem1(model, -1, null);
           enchantment.end();
         }
       }
       Enchantment.endOuter3D();
       TexturePackAPI.bindTexture(TexturePackAPI.ITEMS_PNG);
       renderingEnchantment = false;
     }
   }
   return !CITUtils.useGlint;
 }
コード例 #2
0
 private void renderImpl(double angle) {
   for (Layer layer : layers) {
     layer.blendMethod.applyBlending();
     GL11.glPushMatrix();
     TexturePackAPI.bindTexture(layer.textureName);
     float offsetX = layer.offsetX;
     float offsetY = layer.offsetY;
     float scaleX = layer.scaleX;
     float scaleY = layer.scaleY;
     if (layer.debug) {
       offsetX += offsetXDelta;
       offsetY += offsetYDelta;
       scaleX += scaleXDelta;
       scaleY += scaleYDelta;
     }
     GL11.glTranslatef(offsetX, offsetY, 0.0f);
     GL11.glScalef(scaleX, scaleY, 1.0f);
     float layerAngle = (float) (angle * layer.rotationMultiplier + layer.rotationOffset);
     GL11.glRotatef(layerAngle, 0.0f, 0.0f, 1.0f);
     GL11.glCallList(drawList);
     GL11.glPopMatrix();
   }
 }