mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-16 01:55:15 +00:00
Full GLStatemanager substitution
This commit is contained in:
1 parent
9cd7a4a0d5
commit
2dae52a9ff
135 files changed
+1629
-1596
No files matched your search
@@ -11,6 +11,7 @@
|
||||
package vazkii.botania.api.item;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||
@@ -49,11 +50,11 @@ public interface IBaubleRender {
|
||||
}
|
||||
|
||||
public static void applySneakingRotation() {
|
||||
GL11.glRotatef(28.64789F, 1.0F, 0.0F, 0.0F);
|
||||
GlStateManager.rotate(28.64789F, 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
|
||||
public static void translateToHeadLevel(EntityPlayer player) {
|
||||
GL11.glTranslated(0, (player != Minecraft.getMinecraft().thePlayer ? 1.62F : 0F) - player.getDefaultEyeHeight() + (player.isSneaking() ? 0.0625 : 0), 0);
|
||||
GlStateManager.translate(0, (player != Minecraft.getMinecraft().thePlayer ? 1.62F : 0F) - player.getDefaultEyeHeight() + (player.isSneaking() ? 0.0625 : 0), 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ package vazkii.botania.client.core.handler;
|
||||
import java.awt.Color;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
@@ -55,10 +56,10 @@ public final class BaubleRenderHandler {
|
||||
float yawOffset = player.prevRenderYawOffset + (player.renderYawOffset - player.prevRenderYawOffset) * event.partialRenderTick;
|
||||
float pitch = player.prevRotationPitch + (player.rotationPitch - player.prevRotationPitch) * event.partialRenderTick;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(yawOffset, 0, -1, 0);
|
||||
GL11.glRotatef(yaw - 270, 0, 1, 0);
|
||||
GL11.glRotatef(pitch, 0, 0, 1);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.rotate(yawOffset, 0, -1, 0);
|
||||
GlStateManager.rotate(yaw - 270, 0, 1, 0);
|
||||
GlStateManager.rotate(pitch, 0, 0, 1);
|
||||
dispatchRenders(inv, event, RenderType.HEAD);
|
||||
|
||||
ItemStack helm = player.inventory.armorItemInSlot(3);
|
||||
@@ -66,7 +67,7 @@ public final class BaubleRenderHandler {
|
||||
ItemTerrasteelHelm.renderOnPlayer(helm, event);
|
||||
|
||||
ContributorFancinessHandler.render(event);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
private void dispatchRenders(InventoryBaubles inv, RenderPlayerEvent event, RenderType type) {
|
||||
@@ -85,19 +86,19 @@ public final class BaubleRenderHandler {
|
||||
ICosmeticAttachable attachable = (ICosmeticAttachable) item;
|
||||
ItemStack cosmetic = attachable.getCosmeticItem(stack);
|
||||
if(cosmetic != null) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
((IBaubleRender) cosmetic.getItem()).onPlayerBaubleRender(cosmetic, event, type);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if(item instanceof IBaubleRender) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
((IBaubleRender) stack.getItem()).onPlayerBaubleRender(stack, event, type);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -110,16 +111,16 @@ public final class BaubleRenderHandler {
|
||||
ItemStack stack = player.inventory.getStackInSlot(i);
|
||||
if(stack != null && stack.getItem() == ModItems.manaTablet) {
|
||||
Item item = stack.getItem();
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture);
|
||||
Helper.rotateIfSneaking(event.entityPlayer);
|
||||
boolean armor = event.entityPlayer.getCurrentArmor(1) != null;
|
||||
GL11.glRotatef(180F, 1F, 0F, 0F);
|
||||
GL11.glRotatef(90F, 0F, 1F, 0F);
|
||||
GL11.glTranslatef(-0.25F, -0.85F, renderedOne ? armor ? 0.2F : 0.28F : armor ? -0.3F : -0.25F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GlStateManager.rotate(180F, 1F, 0F, 0F);
|
||||
GlStateManager.rotate(90F, 0F, 1F, 0F);
|
||||
GlStateManager.translate(-0.25F, -0.85F, renderedOne ? armor ? 0.2F : 0.28F : armor ? -0.3F : -0.25F);
|
||||
GlStateManager.scale(0.5F, 0.5F, 0.5F);
|
||||
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F);
|
||||
int light = 15728880;
|
||||
int lightmapX = light % 65536;
|
||||
int lightmapY = light / 65536;
|
||||
@@ -133,9 +134,9 @@ public final class BaubleRenderHandler {
|
||||
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
|
||||
|
||||
Color color = new Color(item.getColorFromItemStack(stack, 1));
|
||||
GL11.glColor3ub((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
|
||||
GlStateManager.color((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
if(renderedOne)
|
||||
return;
|
||||
|
||||
@@ -14,6 +14,7 @@ import java.awt.Rectangle;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@@ -56,15 +57,15 @@ public final class BossBarHandler {
|
||||
int fw = (int) ((double) fgRect.width * (currentBoss.getHealth() / currentBoss.getMaxHealth()));
|
||||
int tx = c - mc.fontRendererObj.getStringWidth(name) / 2;
|
||||
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
currentBoss.bossBarRenderCallback(res, x, y);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
mc.renderEngine.bindTexture(currentBoss.getBossBarTexture());
|
||||
drawBar(x, y, bgRect.x, bgRect.y, bgRect.width, bgRect.height, true);
|
||||
drawBar(xf, yf, fgRect.x, fgRect.y, fw, fgRect.height, false);
|
||||
mc.fontRendererObj.drawStringWithShadow(name, tx, y - 10, 0xA2018C);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GlStateManager.enableBlend();
|
||||
|
||||
Entity e = (Entity) currentBoss;
|
||||
EntityPlayer p = mc.thePlayer;
|
||||
|
||||
@@ -15,6 +15,7 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -38,10 +39,10 @@ public final class BoundTileRenderer {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onWorldRenderLast(RenderWorldLastEvent event) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.disableDepth();
|
||||
GlStateManager.disableTexture2D();
|
||||
GlStateManager.enableBlend();
|
||||
|
||||
Tessellator.renderingWorldRenderer = false;
|
||||
|
||||
@@ -82,10 +83,10 @@ public final class BoundTileRenderer {
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.enableDepth();
|
||||
GlStateManager.enableTexture2D();
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
private void renderBlockOutlineAt(BlockPos pos, int color) {
|
||||
@@ -93,10 +94,10 @@ public final class BoundTileRenderer {
|
||||
}
|
||||
|
||||
private void renderBlockOutlineAt(BlockPos pos, int color, float thickness) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(pos.getX() - RenderManager.renderPosX, pos.getY() - RenderManager.renderPosY, pos.getZ() - RenderManager.renderPosZ + 1);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(pos.getX() - RenderManager.renderPosX, pos.getY() - RenderManager.renderPosY, pos.getZ() - RenderManager.renderPosZ + 1);
|
||||
Color colorRGB = new Color(color);
|
||||
GL11.glColor4ub((byte) colorRGB.getRed(), (byte) colorRGB.getGreen(), (byte) colorRGB.getBlue(), (byte) 255);
|
||||
GlStateManager.color((byte) colorRGB.getRed(), (byte) colorRGB.getGreen(), (byte) colorRGB.getBlue(), (byte) 255);
|
||||
|
||||
World world = Minecraft.getMinecraft().theWorld;
|
||||
Block block = world.getBlockState(pos).getBlock();
|
||||
@@ -113,18 +114,18 @@ public final class BoundTileRenderer {
|
||||
|
||||
axis = axis.offset(-pos.getX(), -pos.getY(), -(pos.getZ() + 1));
|
||||
|
||||
GL11.glScalef(1F, 1F, 1F);
|
||||
GlStateManager.scale(1F, 1F, 1F);
|
||||
|
||||
GL11.glLineWidth(thickness);
|
||||
renderBlockOutline(axis);
|
||||
|
||||
GL11.glLineWidth(thickness + 3F);
|
||||
GL11.glColor4ub((byte) colorRGB.getRed(), (byte) colorRGB.getGreen(), (byte) colorRGB.getBlue(), (byte) 64);
|
||||
GlStateManager.color((byte) colorRGB.getRed(), (byte) colorRGB.getGreen(), (byte) colorRGB.getBlue(), (byte) 64);
|
||||
renderBlockOutline(axis);
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
private void renderBlockOutline(AxisAlignedBB aabb) {
|
||||
|
||||
@@ -86,7 +86,7 @@ public final class ContributorFancinessHandler {
|
||||
}
|
||||
|
||||
private static void renderTwintails(RenderPlayerEvent event) {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
IIcon icon = ((ItemManaResource) ModItems.manaResource).tailIcon;
|
||||
float f = icon.getMinU();
|
||||
float f1 = icon.getMaxU();
|
||||
@@ -94,82 +94,82 @@ public final class ContributorFancinessHandler {
|
||||
float f3 = icon.getMaxV();
|
||||
Helper.translateToHeadLevel(event.entityPlayer);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glRotatef(90F, 0F, 1F, 0F);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.rotate(90F, 0F, 1F, 0F);
|
||||
float t = 0.13F;
|
||||
GL11.glTranslatef(t, -0.5F, -0.1F);
|
||||
GlStateManager.translate(t, -0.5F, -0.1F);
|
||||
if(event.entityPlayer.motionY < 0)
|
||||
GL11.glRotatef((float) event.entityPlayer.motionY * 20F, 1F, 0F, 0F);
|
||||
GlStateManager.rotate((float) event.entityPlayer.motionY * 20F, 1F, 0F, 0F);
|
||||
|
||||
float r = -18F + (float) Math.sin((ClientTickHandler.ticksInGame + event.partialRenderTick) * 0.05F) * 2F;
|
||||
GL11.glRotatef(r, 0F, 0F, 1F);
|
||||
GlStateManager.rotate(r, 0F, 0F, 1F);
|
||||
float s = 0.9F;
|
||||
GL11.glScalef(s, s, s);
|
||||
GlStateManager.scale(s, s, s);
|
||||
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
|
||||
GL11.glRotatef(-r, 0F, 0F, 1F);
|
||||
GL11.glTranslatef(-t, -0F, 0F);
|
||||
GL11.glScalef(-1F, 1F, 1F);
|
||||
GL11.glTranslatef(t, -0F, 0F);
|
||||
GL11.glRotatef(r, 0F, 0F, 1F);
|
||||
GlStateManager.rotate(-r, 0F, 0F, 1F);
|
||||
GlStateManager.translate(-t, -0F, 0F);
|
||||
GlStateManager.scale(-1F, 1F, 1F);
|
||||
GlStateManager.translate(t, -0F, 0F);
|
||||
GlStateManager.rotate(r, 0F, 0F, 1F);
|
||||
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
private static void renderPhiFlower(RenderPlayerEvent event) {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
IIcon icon = ((ItemManaResource) ModItems.manaResource).phiFlowerIcon;
|
||||
float f = icon.getMinU();
|
||||
float f1 = icon.getMaxU();
|
||||
float f2 = icon.getMinV();
|
||||
float f3 = icon.getMaxV();
|
||||
Helper.translateToHeadLevel(event.entityPlayer);
|
||||
GL11.glRotatef(90F, 0F, 1F, 0F);
|
||||
GL11.glRotatef(180F, 1F, 0F, 0F);
|
||||
GL11.glTranslatef(-0.4F, 0.1F, -0.25F);
|
||||
GlStateManager.rotate(90F, 0F, 1F, 0F);
|
||||
GlStateManager.rotate(180F, 1F, 0F, 0F);
|
||||
GlStateManager.translate(-0.4F, 0.1F, -0.25F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture);
|
||||
GL11.glRotatef(90F, 0F, 1F, 0F);
|
||||
GL11.glScalef(0.4F, 0.4F, 0.4F);
|
||||
GL11.glTranslatef(-1.2F, 0.2F, 0.125F);
|
||||
GL11.glRotatef(20F, 1F, 0F, 0F);
|
||||
GlStateManager.rotate(90F, 0F, 1F, 0F);
|
||||
GlStateManager.scale(0.4F, 0.4F, 0.4F);
|
||||
GlStateManager.translate(-1.2F, 0.2F, 0.125F);
|
||||
GlStateManager.rotate(20F, 1F, 0F, 0F);
|
||||
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
private static void renderGoldfish(RenderPlayerEvent event) {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
IIcon icon = ((ItemManaResource) ModItems.manaResource).goldfishIcon;
|
||||
float f = icon.getMinU();
|
||||
float f1 = icon.getMaxU();
|
||||
float f2 = icon.getMinV();
|
||||
float f3 = icon.getMaxV();
|
||||
Helper.rotateIfSneaking(event.entityPlayer);
|
||||
GL11.glRotatef(90F, 0F, 1F, 0F);
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glTranslatef(-0.75F, 0.5F, 0F);
|
||||
GL11.glScalef(0.4F, 0.4F, 0.4F);
|
||||
GL11.glTranslatef(1.2F, 0.5F, 0F);
|
||||
GlStateManager.rotate(90F, 0F, 1F, 0F);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.translate(-0.75F, 0.5F, 0F);
|
||||
GlStateManager.scale(0.4F, 0.4F, 0.4F);
|
||||
GlStateManager.translate(1.2F, 0.5F, 0F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture);
|
||||
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
private static void renderFlower(RenderPlayerEvent event, IIcon icon) {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
Helper.translateToHeadLevel(event.entityPlayer);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
float f = icon.getMinU();
|
||||
float f1 = icon.getMaxU();
|
||||
float f2 = icon.getMinV();
|
||||
float f3 = icon.getMaxV();
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glRotatef(90F, 0F, 1F, 0F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glTranslatef(-0.5F, 0.7F, 0F);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.rotate(90F, 0F, 1F, 0F);
|
||||
GlStateManager.scale(0.5F, 0.5F, 0.5F);
|
||||
GlStateManager.translate(-0.5F, 0.7F, 0F);
|
||||
|
||||
ShaderHelper.useShader(ShaderHelper.gold);
|
||||
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
|
||||
ShaderHelper.releaseShader();
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
public static class ThreadContributorListLoader extends Thread {
|
||||
|
||||
@@ -20,6 +20,7 @@ import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.gui.GuiChat;
|
||||
import net.minecraft.client.gui.GuiIngame;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
@@ -206,7 +207,7 @@ public final class HUDHandler {
|
||||
profiler.endSection();
|
||||
profiler.endSection();
|
||||
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,10 +226,10 @@ public final class HUDHandler {
|
||||
int x = res.getScaledWidth() / 2 - mc.fontRendererObj.getStringWidth(disp) / 2;
|
||||
int y = res.getScaledHeight() - 70;
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
mc.fontRendererObj.drawStringWithShadow(disp, x, y, color);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GlStateManager.disableBlend();
|
||||
}
|
||||
profiler.endSection();
|
||||
}
|
||||
@@ -252,13 +253,13 @@ public final class HUDHandler {
|
||||
}
|
||||
|
||||
Color color = new Color(Color.HSBtoRGB(0.55F, (float) Math.min(1F, Math.sin(System.currentTimeMillis() / 200D) * 0.5 + 1F), 1F));
|
||||
GL11.glColor4ub((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue(), (byte) (255 - color.getRed()));
|
||||
GlStateManager.color((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue(), (byte) (255 - color.getRed()));
|
||||
mc.renderEngine.bindTexture(manaBar);
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
RenderHelper.drawTexturedModalRect(x, y, 0, 0, 251, width, 5);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GlStateManager.disableBlend();
|
||||
}
|
||||
|
||||
private void renderPoolRecipeHUD(ScaledResolution res, TilePool tile, ItemStack stack) {
|
||||
@@ -280,12 +281,12 @@ public final class HUDHandler {
|
||||
}
|
||||
int v = mc.thePlayer.getCommandSenderName().equals("haighyorkie") && mc.thePlayer.isSneaking() ? 23 : 8;
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
mc.renderEngine.bindTexture(manaBar);
|
||||
RenderHelper.drawTexturedModalRect(x, y, 0, u, v, 22, 15);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
|
||||
net.minecraft.client.renderer.RenderHelper.enableGUIStandardItemLighting();
|
||||
mc.getRenderItem().renderItemAndEffectIntoGUI(stack, x - 20, y);
|
||||
@@ -298,8 +299,8 @@ public final class HUDHandler {
|
||||
mc.fontRendererObj.drawStringWithShadow(s, res.getScaledWidth() / 2 - mc.fontRendererObj.getStringWidth(s) / 2, y + 20, 0xFF8888);
|
||||
}
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.disableBlend();
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -326,7 +327,7 @@ public final class HUDHandler {
|
||||
mc.fontRendererObj.drawStringWithShadow(target.getDisplayName(), w / 2 + 30, h / 2 - 10, 0x6666FF);
|
||||
mc.fontRendererObj.drawStringWithShadow(tile.getItemCount() + "x", w / 2 + 30, h / 2, 0xFFFFFF);
|
||||
net.minecraft.client.renderer.RenderHelper.enableGUIStandardItemLighting();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GlStateManager.enableRescaleNormal();
|
||||
mc.getRenderItem().renderItemAndEffectIntoGUI(target, w / 2 + 10, h / 2 - 10);
|
||||
net.minecraft.client.renderer.RenderHelper.disableStandardItemLighting();
|
||||
}
|
||||
@@ -344,8 +345,8 @@ public final class HUDHandler {
|
||||
String drawStr = "";
|
||||
String secondLine = "";
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
int sx = res.getScaledWidth() / 2 - 17;
|
||||
int sy = res.getScaledHeight() / 2 + 2;
|
||||
|
||||
@@ -384,19 +385,19 @@ public final class HUDHandler {
|
||||
}
|
||||
|
||||
mc.getRenderItem().renderItemIntoGUI(new ItemStack(ModItems.lexicon), sx, sy);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GlStateManager.disableLighting();
|
||||
font.drawStringWithShadow(drawStr, sx + 10, sy + 8, 0xFFFFFFFF);
|
||||
font.drawStringWithShadow(secondLine, sx + 10, sy + 18, 0xFFAAAAAA);
|
||||
|
||||
if(!mc.thePlayer.isSneaking()) {
|
||||
GL11.glScalef(0.5F, 0.5F, 1F);
|
||||
GlStateManager.scale(0.5F, 0.5F, 1F);
|
||||
mc.fontRendererObj.drawStringWithShadow(EnumChatFormatting.BOLD + "Shift", (sx + 10) * 2 - 16, (sy + 8) * 2 + 20, 0xFFFFFFFF);
|
||||
GL11.glScalef(2F, 2F, 1F);
|
||||
GlStateManager.scale(2F, 2F, 1F);
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
profiler.endSection();
|
||||
}
|
||||
|
||||
@@ -413,7 +414,7 @@ public final class HUDHandler {
|
||||
Gui.drawRect(x - 6, y - 6, x + l + 6, y + 37, 0x44000000);
|
||||
Gui.drawRect(x - 4, y - 4, x + l + 4, y + 35, 0x44000000);
|
||||
net.minecraft.client.renderer.RenderHelper.enableGUIStandardItemLighting();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GlStateManager.enableRescaleNormal();
|
||||
mc.getRenderItem().renderItemAndEffectIntoGUI(new ItemStack(ModBlocks.corporeaIndex), x, y + 10);
|
||||
net.minecraft.client.renderer.RenderHelper.disableStandardItemLighting();
|
||||
|
||||
@@ -423,8 +424,8 @@ public final class HUDHandler {
|
||||
}
|
||||
|
||||
public static void drawSimpleManaHUD(int color, int mana, int maxMana, String name, ScaledResolution res) {
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
int x = res.getScaledWidth() / 2 - mc.fontRendererObj.getStringWidth(name) / 2;
|
||||
int y = res.getScaledHeight() / 2 + 10;
|
||||
@@ -443,7 +444,7 @@ public final class HUDHandler {
|
||||
mc.fontRendererObj.drawString(text, x, y, color);
|
||||
}
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GlStateManager.disableBlend();
|
||||
}
|
||||
|
||||
public static void drawComplexManaHUD(int color, int mana, int maxMana, String name, ScaledResolution res, ItemStack bindDisplay, boolean properlyBound) {
|
||||
@@ -455,11 +456,11 @@ public final class HUDHandler {
|
||||
int y = res.getScaledHeight() / 2 + 12;
|
||||
|
||||
net.minecraft.client.renderer.RenderHelper.enableGUIStandardItemLighting();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GlStateManager.enableRescaleNormal();
|
||||
mc.getRenderItem().renderItemAndEffectIntoGUI(bindDisplay, x, y);
|
||||
net.minecraft.client.renderer.RenderHelper.disableStandardItemLighting();
|
||||
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
GlStateManager.disableDepth();
|
||||
if(properlyBound) {
|
||||
mc.fontRendererObj.drawStringWithShadow("\u2714", x + 10, y + 9, 0x004C00);
|
||||
mc.fontRendererObj.drawStringWithShadow("\u2714", x + 10, y + 8, 0x0BD20D);
|
||||
@@ -467,13 +468,13 @@ public final class HUDHandler {
|
||||
mc.fontRendererObj.drawStringWithShadow("\u2718", x + 10, y + 9, 0x4C0000);
|
||||
mc.fontRendererObj.drawStringWithShadow("\u2718", x + 10, y + 8, 0xD2080D);
|
||||
}
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
GlStateManager.enableDepth();
|
||||
}
|
||||
|
||||
public static void renderManaBar(int x, int y, int color, float alpha, int mana, int maxMana) {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
GL11.glColor4f(1F, 1F, 1F, alpha);
|
||||
GlStateManager.color(1F, 1F, 1F, alpha);
|
||||
mc.renderEngine.bindTexture(manaBar);
|
||||
RenderHelper.drawTexturedModalRect(x, y, 0, 0, 0, 102, 5);
|
||||
|
||||
@@ -485,7 +486,7 @@ public final class HUDHandler {
|
||||
RenderHelper.drawTexturedModalRect(x + 1, y + 1, 0, 0, 5, 100, 3);
|
||||
|
||||
Color color_ = new Color(color);
|
||||
GL11.glColor4ub((byte) color_.getRed(), (byte) color_.getGreen(),(byte) color_.getBlue(), (byte) (255F * alpha));
|
||||
GlStateManager.color((byte) color_.getRed(), (byte) color_.getGreen(),(byte) color_.getBlue(), (byte) (255F * alpha));
|
||||
RenderHelper.drawTexturedModalRect(x + 1, y + 1, 0, 0, 5, Math.min(100, manaPercentage), 3);
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import java.util.regex.Pattern;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -45,22 +46,22 @@ public final class ItemsRemainingRenderHandler {
|
||||
int start = maxTicks - leaveTicks;
|
||||
float alpha = ticks + partTicks > start ? 1F : (ticks + partTicks) / start;
|
||||
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.disableAlpha();
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
GL11.glColor4f(1F, 1F, 1F, alpha);
|
||||
GlStateManager.color(1F, 1F, 1F, alpha);
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
int xp = x + (int) (16F * (1F - alpha));
|
||||
GL11.glTranslatef(xp, y, 0F);
|
||||
GL11.glScalef(alpha, 1F, 1F);
|
||||
GlStateManager.translate(xp, y, 0F);
|
||||
GlStateManager.scale(alpha, 1F, 1F);
|
||||
mc.getRenderItem().renderItemAndEffectIntoGUI(stack, 0, 0);
|
||||
GL11.glScalef(1F / alpha,1F, 1F);
|
||||
GL11.glTranslatef(-xp, -y, 0F);
|
||||
GlStateManager.scale(1F / alpha,1F, 1F);
|
||||
GlStateManager.translate(-xp, -y, 0F);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.enableBlend();
|
||||
|
||||
String text = EnumChatFormatting.GREEN + stack.getDisplayName();
|
||||
if(count >= 0) {
|
||||
@@ -77,8 +78,8 @@ public final class ItemsRemainingRenderHandler {
|
||||
int color = 0x00FFFFFF | (int) (alpha * 0xFF) << 24;
|
||||
mc.fontRendererObj.drawStringWithShadow(text, x + 20, y + 6, color);
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.enableAlpha();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.ActiveRenderInfo;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -74,14 +75,14 @@ public class LightningHandler {
|
||||
interpPosY = entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * frame;
|
||||
interpPosZ = entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ) * frame;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(-interpPosX, -interpPosY, -interpPosZ);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(-interpPosX, -interpPosY, -interpPosZ);
|
||||
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.depthMask(false);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
ParticleRenderDispatcher.lightningCount = 0;
|
||||
|
||||
@@ -99,11 +100,11 @@ public class LightningHandler {
|
||||
renderBolt(bolt, tessellator, frame, ActiveRenderInfo.getRotationX(), ActiveRenderInfo.getRotationXZ(), ActiveRenderInfo.getRotationZ(), ActiveRenderInfo.getRotationXY(), 1, true);
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glDepthMask(true);
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.depthMask(true);
|
||||
|
||||
GL11.glTranslated(interpPosX, interpPosY, interpPosZ);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.translate(interpPosX, interpPosY, interpPosZ);
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
profiler.endSection();
|
||||
profiler.endSection();
|
||||
|
||||
@@ -99,16 +99,16 @@ public final class MultiblockRenderHandler {
|
||||
if(anchor != null && comp.matches(world, x, y, z))
|
||||
return false;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(-RenderManager.renderPosX, -RenderManager.renderPosY, -RenderManager.renderPosZ);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(-RenderManager.renderPosX, -RenderManager.renderPosY, -RenderManager.renderPosZ);
|
||||
GlStateManager.disableDepth();
|
||||
doRenderComponent(mb, comp, x, y, z, 0.4F);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
return true;
|
||||
}
|
||||
|
||||
public static void renderMultiblockOnPage(Multiblock mb) {
|
||||
GL11.glTranslated(-0.5, -0.5, -0.5);
|
||||
GlStateManager.translate(-0.5, -0.5, -0.5);
|
||||
blockAccess.update(null, mb, mb.offX, mb.offY, mb.offZ);
|
||||
for(MultiblockComponent comp : mb.getComponents()) {
|
||||
BlockPos pos = comp.getRelativePosition();
|
||||
@@ -117,9 +117,9 @@ public final class MultiblockRenderHandler {
|
||||
}
|
||||
|
||||
private static void doRenderComponent(Multiblock mb, MultiblockComponent comp, int x, int y, int z, float alpha) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
Block block = comp.getBlock();
|
||||
int meta = comp.getMeta();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
@@ -127,10 +127,10 @@ public final class MultiblockRenderHandler {
|
||||
if(block == null)
|
||||
return;
|
||||
if(IMultiblockRenderHook.renderHooks.containsKey(block)) {
|
||||
GL11.glColor4f(1F, 1F, 1F, alpha);
|
||||
GlStateManager.color(1F, 1F, 1F, alpha);
|
||||
IMultiblockRenderHook renderHook = IMultiblockRenderHook.renderHooks.get(block);
|
||||
if(renderHook.needsTranslate(block)) {
|
||||
GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5);
|
||||
GlStateManager.translate(x + 0.5, y + 0.5, z + 0.5);
|
||||
}
|
||||
renderHook.renderBlockForMultiblock(blockAccess, mb, block, comp.getMeta(), blockRender, comp, alpha);
|
||||
}
|
||||
@@ -140,7 +140,7 @@ public final class MultiblockRenderHandler {
|
||||
float red = (color >> 16 & 255) / 255.0F;
|
||||
float green = (color >> 8 & 255) / 255.0F;
|
||||
float blue = (color & 255) / 255.0F;
|
||||
GL11.glColor4f(red, green, blue, alpha);
|
||||
GlStateManager.color(red, green, blue, alpha);
|
||||
IBlockAccess oldBlockAccess = blockRender.blockAccess;
|
||||
blockRender.blockAccess = blockAccess;
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
@@ -162,13 +162,13 @@ public final class MultiblockRenderHandler {
|
||||
float red = (color >> 16 & 255) / 255.0F;
|
||||
float green = (color >> 8 & 255) / 255.0F;
|
||||
float blue = (color & 255) / 255.0F;
|
||||
GL11.glColor4f(red, green, blue, alpha);
|
||||
GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5);
|
||||
GlStateManager.color(red, green, blue, alpha);
|
||||
GlStateManager.translate(x + 0.5, y + 0.5, z + 0.5);
|
||||
blockRender.renderBlockAsItem(block, meta, 1F);
|
||||
}
|
||||
}
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.enableDepth();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ import java.util.Queue;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -35,14 +36,14 @@ public final class RedStringRenderer {
|
||||
|
||||
public static void renderAll() {
|
||||
if(!redStringTiles.isEmpty()) {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
boolean lighting = GL11.glGetBoolean(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GlStateManager.disableTexture2D();
|
||||
GlStateManager.enableBlend();
|
||||
if(lighting)
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glColor4f(1F, 0F, 0F, sizeAlpha);
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.color(1F, 0F, 0F, sizeAlpha);
|
||||
|
||||
Tessellator.renderingWorldRenderer = false;
|
||||
TileRedString tile;
|
||||
@@ -50,10 +51,10 @@ public final class RedStringRenderer {
|
||||
renderTile(tile);
|
||||
|
||||
if(lighting)
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.enableLighting();
|
||||
GlStateManager.enableTexture2D();
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -72,8 +73,8 @@ public final class RedStringRenderer {
|
||||
BlockPos bind = tile.getBinding();
|
||||
|
||||
if(bind != null) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(tile.getPos().getX() + 0.5 - RenderManager.renderPosX, tile.getPos().getY() + 0.5 - RenderManager.renderPosY, tile.getPos().getZ() + 0.5 - RenderManager.renderPosZ);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(tile.getPos().getX() + 0.5 - RenderManager.renderPosX, tile.getPos().getY() + 0.5 - RenderManager.renderPosY, tile.getPos().getZ() + 0.5 - RenderManager.renderPosZ);
|
||||
Vector3 vecOrig = new Vector3(bind.getX() - tile.getPos().getX(), bind.getY() - tile.getPos().getY(), bind.getZ() - tile.getPos().getZ());
|
||||
Vector3 vecNorm = vecOrig.copy().normalize();
|
||||
Vector3 vecMag = vecNorm.copy().multiply(0.025);
|
||||
@@ -98,7 +99,7 @@ public final class RedStringRenderer {
|
||||
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -62,10 +62,10 @@ public final class SubTileRadiusRenderHandler {
|
||||
if(descriptor == null)
|
||||
return;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.disableTexture2D();
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
Tessellator.renderingWorldRenderer = false;
|
||||
|
||||
@@ -73,18 +73,18 @@ public final class SubTileRadiusRenderHandler {
|
||||
renderCircle(descriptor.getSubtileCoords(), descriptor.getCircleRadius());
|
||||
else renderRectangle(descriptor.getAABB());
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.enableTexture2D();
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
public void renderRectangle(AxisAlignedBB aabb) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(aabb.minX - RenderManager.renderPosX, aabb.minY - RenderManager.renderPosY, aabb.minZ - RenderManager.renderPosZ);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(aabb.minX - RenderManager.renderPosX, aabb.minY - RenderManager.renderPosY, aabb.minZ - RenderManager.renderPosZ);
|
||||
int color = Color.HSBtoRGB(ClientTickHandler.ticksInGame % 200 / 200F, 0.6F, 1F);
|
||||
|
||||
Color colorRGB = new Color(color);
|
||||
GL11.glColor4ub((byte) colorRGB.getRed(), (byte) colorRGB.getGreen(), (byte) colorRGB.getBlue(), (byte) 32);
|
||||
GlStateManager.color((byte) colorRGB.getRed(), (byte) colorRGB.getGreen(), (byte) colorRGB.getBlue(), (byte) 32);
|
||||
|
||||
double f = 1F / 16F;
|
||||
double x = aabb.maxX - aabb.minX - f;
|
||||
@@ -101,7 +101,7 @@ public final class SubTileRadiusRenderHandler {
|
||||
x += f;
|
||||
z += f;
|
||||
double f1 = f + f / 4F;
|
||||
GL11.glColor4ub((byte) colorRGB.getRed(), (byte) colorRGB.getGreen(), (byte) colorRGB.getBlue(), (byte) 64);
|
||||
GlStateManager.color((byte) colorRGB.getRed(), (byte) colorRGB.getGreen(), (byte) colorRGB.getBlue(), (byte) 64);
|
||||
tessellator.getWorldRenderer().startDrawingQuads();
|
||||
tessellator.getWorldRenderer().addVertex(x, f1, 0);
|
||||
tessellator.getWorldRenderer().addVertex(0, f1, 0);
|
||||
@@ -109,19 +109,19 @@ public final class SubTileRadiusRenderHandler {
|
||||
tessellator.getWorldRenderer().addVertex(x, f1, z);
|
||||
tessellator.draw();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
public void renderCircle(BlockPos center, double radius) {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
double x = center.getX() + 0.5;
|
||||
double y = center.getY();
|
||||
double z = center.getZ() + 0.5;
|
||||
GL11.glTranslated(x - RenderManager.renderPosX, y - RenderManager.renderPosY, z - RenderManager.renderPosZ);
|
||||
GlStateManager.translate(x - RenderManager.renderPosX, y - RenderManager.renderPosY, z - RenderManager.renderPosZ);
|
||||
int color = Color.HSBtoRGB(ClientTickHandler.ticksInGame % 200 / 200F, 0.6F, 1F);
|
||||
|
||||
Color colorRGB = new Color(color);
|
||||
GL11.glColor4ub((byte) colorRGB.getRed(), (byte) colorRGB.getGreen(), (byte) colorRGB.getBlue(), (byte) 32);
|
||||
GlStateManager.color((byte) colorRGB.getRed(), (byte) colorRGB.getGreen(), (byte) colorRGB.getBlue(), (byte) 32);
|
||||
|
||||
double f = 1F / 16F;
|
||||
|
||||
@@ -144,7 +144,7 @@ public final class SubTileRadiusRenderHandler {
|
||||
|
||||
radius += f;
|
||||
double f1 = f + f / 4F;
|
||||
GL11.glColor4ub((byte) colorRGB.getRed(), (byte) colorRGB.getGreen(), (byte) colorRGB.getBlue(), (byte) 64);
|
||||
GlStateManager.color((byte) colorRGB.getRed(), (byte) colorRGB.getGreen(), (byte) colorRGB.getBlue(), (byte) 64);
|
||||
tessellator.getWorldRenderer().startDrawing(GL11.GL_TRIANGLE_FAN);
|
||||
tessellator.getWorldRenderer().addVertex(0, f1, 0);
|
||||
for(int i = 0; i < totalAngles + 1; i += step) {
|
||||
@@ -155,7 +155,7 @@ public final class SubTileRadiusRenderHandler {
|
||||
}
|
||||
tessellator.getWorldRenderer().addVertex(0, f1, 0);
|
||||
tessellator.draw();
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
+21
-20
@@ -20,6 +20,7 @@ import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
@@ -105,7 +106,7 @@ public final class TooltipAdditionDisplayHandler {
|
||||
if(lexSlot > -1) {
|
||||
int x = mouseX + offx - 34;
|
||||
int y = mouseY - offy;
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
GlStateManager.disableDepth();
|
||||
|
||||
Gui.drawRect(x - 4, y - 4, x + 20, y + 26, 0x44000000);
|
||||
Gui.drawRect(x - 6, y - 6, x + 22, y + 28, 0x44000000);
|
||||
@@ -119,17 +120,17 @@ public final class TooltipAdditionDisplayHandler {
|
||||
float time = 20F;
|
||||
float angles = lexiconLookupTime / time * 360F;
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.disableTexture2D();
|
||||
GlStateManager.shadeModel(GL11.GL_SMOOTH);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glBegin(GL11.GL_TRIANGLE_FAN);
|
||||
|
||||
float a = 0.5F + 0.2F * ((float) Math.cos((double) (ClientTickHandler.ticksInGame + ClientTickHandler.partialTicks) / 10) * 0.5F + 0.5F);
|
||||
GL11.glColor4f(0F, 0.5F, 0F, a);
|
||||
GlStateManager.color(0F, 0.5F, 0F, a);
|
||||
GL11.glVertex2i(cx, cy);
|
||||
GL11.glColor4f(0F, 1F, 0F, 1F);
|
||||
GlStateManager.color(0F, 1F, 0F, 1F);
|
||||
|
||||
for(float i = angles; i > 0; i--) {
|
||||
double rad = (i - 90) / 180F * Math.PI;
|
||||
@@ -138,9 +139,9 @@ public final class TooltipAdditionDisplayHandler {
|
||||
GL11.glVertex2i(cx, cy);
|
||||
GL11.glEnd();
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.enableTexture2D();
|
||||
GlStateManager.shadeModel(GL11.GL_FLAT);
|
||||
|
||||
if(lexiconLookupTime >= time) {
|
||||
mc.thePlayer.inventory.currentItem = lexSlot;
|
||||
@@ -152,15 +153,15 @@ public final class TooltipAdditionDisplayHandler {
|
||||
} else lexiconLookupTime = 0F;
|
||||
|
||||
mc.getRenderItem().renderItemIntoGUI(new ItemStack(ModItems.lexicon), x, y);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GlStateManager.disableLighting();
|
||||
|
||||
font.drawStringWithShadow("?", x + 10, y + 8, 0xFFFFFFFF);
|
||||
GL11.glScalef(0.5F, 0.5F, 1F);
|
||||
GlStateManager.scale(0.5F, 0.5F, 1F);
|
||||
boolean mac = Minecraft.isRunningOnMac;
|
||||
mc.fontRendererObj.drawStringWithShadow(EnumChatFormatting.BOLD + (ConfigHandler.useShiftForQuickLookup ? "Shift" : (mac ? "Cmd" : "Ctrl")), (x + 10) * 2 - 16, (y + 8) * 2 + 20, 0xFFFFFFFF);
|
||||
GL11.glScalef(2F, 2F, 1F);
|
||||
GlStateManager.scale(2F, 2F, 1F);
|
||||
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
GlStateManager.enableDepth();
|
||||
} else lexiconLookupTime = 0F;
|
||||
} else lexiconLookupTime = 0F;
|
||||
} else lexiconLookupTime = 0F;
|
||||
@@ -178,7 +179,7 @@ public final class TooltipAdditionDisplayHandler {
|
||||
float huePer = width == 0 ? 0F : 1F / width;
|
||||
float hueOff = (ClientTickHandler.ticksInGame + ClientTickHandler.partialTicks) * 0.01F;
|
||||
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
GlStateManager.disableDepth();
|
||||
Gui.drawRect(mouseX + offx - 1, mouseY - offy - height - 1, mouseX + offx + width + 1, mouseY - offy, 0xFF000000);
|
||||
for(int i = 0; i < rainbowWidth; i++)
|
||||
Gui.drawRect(mouseX + offx + i, mouseY - offy - height, mouseX + offx + i + 1, mouseY - offy, Color.HSBtoRGB(hueOff + huePer * i, 1F, 1F));
|
||||
@@ -186,22 +187,22 @@ public final class TooltipAdditionDisplayHandler {
|
||||
|
||||
String rank = StatCollector.translateToLocal("botania.rank" + level).replaceAll("&", "\u00a7");
|
||||
boolean light = GL11.glGetBoolean(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GlStateManager.disableLighting();
|
||||
font.drawStringWithShadow(rank, mouseX + offx, mouseY - offy - 12, 0xFFFFFF);
|
||||
if(!ss) {
|
||||
rank = StatCollector.translateToLocal("botania.rank" + (level + 1)).replaceAll("&", "\u00a7");
|
||||
font.drawStringWithShadow(rank, mouseX + offx + width - font.getStringWidth(rank), mouseY - offy - 12, 0xFFFFFF);
|
||||
}
|
||||
if(light)
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
GlStateManager.enableLighting();
|
||||
GlStateManager.enableDepth();
|
||||
}
|
||||
|
||||
private static void drawManaBar(ItemStack stack, IManaTooltipDisplay display, int mouseX, int mouseY, int offx, int offy, int width, int height) {
|
||||
float fraction = display.getManaFractionForDisplay(stack);
|
||||
int manaBarWidth = (int) Math.ceil(width * fraction);
|
||||
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
GlStateManager.disableDepth();
|
||||
Gui.drawRect(mouseX + offx - 1, mouseY - offy - height - 1, mouseX + offx + width + 1, mouseY - offy, 0xFF000000);
|
||||
Gui.drawRect(mouseX + offx, mouseY - offy - height, mouseX + offx + manaBarWidth, mouseY - offy, Color.HSBtoRGB(0.528F, ((float) Math.sin((ClientTickHandler.ticksInGame + ClientTickHandler.partialTicks) * 0.2) + 1F) * 0.3F + 0.4F, 1F));
|
||||
Gui.drawRect(mouseX + offx + manaBarWidth, mouseY - offy - height, mouseX + offx + width, mouseY - offy, 0xFF555555);
|
||||
|
||||
@@ -15,6 +15,7 @@ import java.util.Random;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.settings.KeyBinding;
|
||||
@@ -82,7 +83,7 @@ public final class RenderHelper {
|
||||
drawGradientRect(var6 - 3, var7 - 3, z, var6 + var5 + 3, var7 - 3 + 1, color, color);
|
||||
drawGradientRect(var6 - 3, var7 + var9 + 2, z, var6 + var5 + 3, var7 + var9 + 3, var12, var12);
|
||||
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
GlStateManager.disableDepth();
|
||||
for (int var13 = 0; var13 < tooltipData.size(); ++var13) {
|
||||
String var14 = tooltipData.get(var13);
|
||||
fontRenderer.drawStringWithShadow(var14, var6, var7, -1);
|
||||
@@ -90,11 +91,11 @@ public final class RenderHelper {
|
||||
var7 += 2;
|
||||
var7 += 10;
|
||||
}
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
GlStateManager.enableDepth();
|
||||
}
|
||||
if(!lighting)
|
||||
net.minecraft.client.renderer.RenderHelper.disableStandardItemLighting();
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
}
|
||||
|
||||
public static void drawGradientRect(int par1, int par2, float z, int par3, int par4, int par5, int par6) {
|
||||
@@ -106,11 +107,11 @@ public final class RenderHelper {
|
||||
float var12 = (par6 >> 16 & 255) / 255F;
|
||||
float var13 = (par6 >> 8 & 255) / 255F;
|
||||
float var14 = (par6 & 255) / 255F;
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GlStateManager.disableTexture2D();
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.disableAlpha();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.shadeModel(GL11.GL_SMOOTH);
|
||||
Tessellator var15 = Tessellator.getInstance();
|
||||
var15.getWorldRenderer().startDrawingQuads();
|
||||
var15.getWorldRenderer().setColorRGBA_F(var8, var9, var10, var7);
|
||||
@@ -120,10 +121,10 @@ public final class RenderHelper {
|
||||
var15.getWorldRenderer().addVertex(par1, par4, z);
|
||||
var15.getWorldRenderer().addVertex(par3, par4, z);
|
||||
var15.draw();
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GlStateManager.shadeModel(GL11.GL_FLAT);
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.enableTexture2D();
|
||||
}
|
||||
|
||||
public static void drawTexturedModalRect(int par1, int par2, float z, int par3, int par4, int par5, int par6) {
|
||||
@@ -153,23 +154,23 @@ public final class RenderHelper {
|
||||
f2 = (f1 - 0.7F) / 0.2F;
|
||||
Random random = new Random(seed);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(770, 1);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glScalef(xScale, yScale, zScale);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.disableTexture2D();
|
||||
GlStateManager.shadeModel(GL11.GL_SMOOTH);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(770, 1);
|
||||
GlStateManager.disableAlpha();
|
||||
GlStateManager.enableCull();
|
||||
GlStateManager.depthMask(false);
|
||||
GlStateManager.scale(xScale, yScale, zScale);
|
||||
|
||||
for (int i = 0; i < (f1 + f1 * f1) / 2F * 90F + 30F; i++) {
|
||||
GL11.glRotatef(random.nextFloat() * 360F, 1F, 0F, 0F);
|
||||
GL11.glRotatef(random.nextFloat() * 360F, 0F, 1F, 0F);
|
||||
GL11.glRotatef(random.nextFloat() * 360F, 0F, 0F, 1F);
|
||||
GL11.glRotatef(random.nextFloat() * 360F, 1F, 0F, 0F);
|
||||
GL11.glRotatef(random.nextFloat() * 360F, 0F, 1F, 0F);
|
||||
GL11.glRotatef(random.nextFloat() * 360F + f1 * 90F, 0F, 0F, 1F);
|
||||
GlStateManager.rotate(random.nextFloat() * 360F, 1F, 0F, 0F);
|
||||
GlStateManager.rotate(random.nextFloat() * 360F, 0F, 1F, 0F);
|
||||
GlStateManager.rotate(random.nextFloat() * 360F, 0F, 0F, 1F);
|
||||
GlStateManager.rotate(random.nextFloat() * 360F, 1F, 0F, 0F);
|
||||
GlStateManager.rotate(random.nextFloat() * 360F, 0F, 1F, 0F);
|
||||
GlStateManager.rotate(random.nextFloat() * 360F + f1 * 90F, 0F, 0F, 1F);
|
||||
tessellator.getWorldRenderer().startDrawing(GL11.GL_TRIANGLE_FAN);
|
||||
float f3 = random.nextFloat() * 20F + 5F + f2 * 10F;
|
||||
float f4 = random.nextFloat() * 2F + 1F + f2 * 2F;
|
||||
@@ -183,24 +184,24 @@ public final class RenderHelper {
|
||||
tessellator.draw();
|
||||
}
|
||||
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.depthMask(true);
|
||||
GlStateManager.disableCull();
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.shadeModel(GL11.GL_FLAT);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.enableTexture2D();
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
public static void renderProgressPie(int x, int y, float progress, ItemStack stack) {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
mc.getRenderItem().renderItemAndEffectIntoGUI(stack, x, y);
|
||||
|
||||
GL11.glClear(GL11.GL_DEPTH_BUFFER_BIT);
|
||||
GlStateManager.clear(GL11.GL_DEPTH_BUFFER_BIT);
|
||||
GL11.glEnable(GL11.GL_STENCIL_TEST);
|
||||
GL11.glColorMask(false, false, false, false);
|
||||
GL11.glDepthMask(false);
|
||||
GlStateManager.colorMask(false, false, false, false);
|
||||
GlStateManager.depthMask(false);
|
||||
GL11.glStencilFunc(GL11.GL_NEVER, 1, 0xFF);
|
||||
GL11.glStencilOp(GL11.GL_REPLACE, GL11.GL_KEEP, GL11.GL_KEEP);
|
||||
GL11.glStencilMask(0xFF);
|
||||
@@ -213,28 +214,28 @@ public final class RenderHelper {
|
||||
int degs = (int) (360 * progress);
|
||||
float a = 0.5F + 0.2F * ((float) Math.cos((double) (ClientTickHandler.ticksInGame + ClientTickHandler.partialTicks) / 10) * 0.5F + 0.5F);
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glColorMask(true, true, true, true);
|
||||
GL11.glDepthMask(true);
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.disableTexture2D();
|
||||
GlStateManager.shadeModel(GL11.GL_SMOOTH);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.colorMask(true, true, true, true);
|
||||
GlStateManager.depthMask(true);
|
||||
GL11.glStencilMask(0x00);
|
||||
GL11.glStencilFunc(GL11.GL_EQUAL, 1, 0xFF);
|
||||
GL11.glBegin(GL11.GL_TRIANGLE_FAN);
|
||||
GL11.glColor4f(0F, 0.5F, 0.5F, a);
|
||||
GlStateManager.color(0F, 0.5F, 0.5F, a);
|
||||
GL11.glVertex2i(centerX, centerY);
|
||||
GL11.glColor4f(0F, 1F, 0.5F, a);
|
||||
GlStateManager.color(0F, 1F, 0.5F, a);
|
||||
for(int i = degs; i > 0; i--) {
|
||||
double rad = (i - 90) / 180F * Math.PI;
|
||||
GL11.glVertex2d(centerX + Math.cos(rad) * r, centerY + Math.sin(rad) * r);
|
||||
}
|
||||
GL11.glVertex2i(centerX, centerY);
|
||||
GL11.glEnd();
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.enableTexture2D();
|
||||
GlStateManager.shadeModel(GL11.GL_FLAT);
|
||||
GL11.glDisable(GL11.GL_STENCIL_TEST);
|
||||
}
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ public class FXSparkle extends EntityFX {
|
||||
ParticleRenderDispatcher.sparkleFxCount = 0;
|
||||
ParticleRenderDispatcher.fakeSparkleFxCount = 0;
|
||||
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F);
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 0.75F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ConfigHandler.matrixMode ? ObfuscationHelper.getParticleTexture() : particles);
|
||||
|
||||
tessellator.getWorldRenderer().startDrawingQuads();
|
||||
|
||||
@@ -79,7 +79,7 @@ public class FXWisp extends EntityFX {
|
||||
ParticleRenderDispatcher.wispFxCount = 0;
|
||||
ParticleRenderDispatcher.depthIgnoringWispFxCount = 0;
|
||||
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.75F);
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 0.75F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ConfigHandler.matrixMode ? ObfuscationHelper.getParticleTexture() : particles);
|
||||
|
||||
if(!queuedRenders.isEmpty()) {
|
||||
@@ -90,12 +90,12 @@ public class FXWisp extends EntityFX {
|
||||
}
|
||||
|
||||
if(!queuedDepthIgnoringRenders.isEmpty()) {
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
GlStateManager.disableDepth();
|
||||
tessellator.getWorldRenderer().startDrawingQuads();
|
||||
for(FXWisp wisp : queuedDepthIgnoringRenders)
|
||||
wisp.renderQueued(tessellator, false);
|
||||
tessellator.draw();
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
GlStateManager.enableDepth();
|
||||
}
|
||||
|
||||
queuedRenders.clear();
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
package vazkii.botania.client.fx;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.profiler.Profiler;
|
||||
|
||||
@@ -33,12 +34,12 @@ public final class ParticleRenderDispatcher {
|
||||
boolean isLightingEnabled = GL11.glGetBoolean(GL11.GL_LIGHTING);
|
||||
Profiler profiler = Minecraft.getMinecraft().mcProfiler;
|
||||
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0.003921569F);
|
||||
GlStateManager.depthMask(false);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
|
||||
GlStateManager.alphaFunc(GL11.GL_GREATER, 0.003921569F);
|
||||
if(isLightingEnabled)
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GlStateManager.disableLighting();
|
||||
|
||||
profiler.startSection("sparkle");
|
||||
FXSparkle.dispatchQueuedRenders(tessellator);
|
||||
@@ -47,10 +48,10 @@ public final class ParticleRenderDispatcher {
|
||||
profiler.endSection();
|
||||
|
||||
if(isLightingEnabled)
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glDepthMask(true);
|
||||
GlStateManager.enableLighting();
|
||||
GlStateManager.alphaFunc(GL11.GL_GREATER, 0.1F);
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.depthMask(true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -44,7 +44,7 @@ public class GuiFlowerBag extends GuiContainer {
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.getTextureManager().bindTexture(texture);
|
||||
int k = (width - xSize) / 2;
|
||||
int l = (height - ySize) / 2;
|
||||
|
||||
@@ -35,7 +35,7 @@ public class GuiCraftingHalo extends GuiContainer {
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.getTextureManager().bindTexture(craftingTableGuiTextures);
|
||||
int k = (width - xSize) / 2;
|
||||
int l = (height - ySize) / 2;
|
||||
|
||||
@@ -197,11 +197,11 @@ public class GuiLexicon extends GuiScreen {
|
||||
lastTime = time;
|
||||
partialTicks = par3;
|
||||
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
mc.renderEngine.bindTexture(texture);
|
||||
drawNotes(par3);
|
||||
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
mc.renderEngine.bindTexture(texture);
|
||||
drawTexturedModalRect(left, top, 0, 0, guiWidth, guiHeight);
|
||||
|
||||
@@ -211,9 +211,9 @@ public class GuiLexicon extends GuiScreen {
|
||||
drawBookmark(left + guiWidth / 2, top - getTitleHeight(), getTitle(), true);
|
||||
String subtitle = getSubtitle();
|
||||
if(subtitle != null) {
|
||||
GL11.glScalef(0.5F, 0.5F, 1F);
|
||||
GlStateManager.scale(0.5F, 0.5F, 1F);
|
||||
drawCenteredString(fontRendererObj, subtitle, left * 2 + guiWidth, (top - getTitleHeight() + 11) * 2, 0x00FF00);
|
||||
GL11.glScalef(2F, 2F, 1F);
|
||||
GlStateManager.scale(2F, 2F, 1F);
|
||||
}
|
||||
|
||||
if(isMainPage())
|
||||
@@ -225,16 +225,16 @@ public class GuiLexicon extends GuiScreen {
|
||||
}
|
||||
|
||||
if(mc.thePlayer.getCommandSenderName().equals("haighyorkie")) {
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
mc.renderEngine.bindTexture(texture);
|
||||
drawTexturedModalRect(left - 19, top + 42, 67, 180, 19, 26);
|
||||
if(par1 >= left - 19 && par1 < left && par2 >= top + 62 && par2 < top + 88) {
|
||||
mc.renderEngine.bindTexture(textureToff);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glTranslatef(0F, 0F, 2F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.scale(0.5F, 0.5F, 0.5F);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.translate(0F, 0F, 2F);
|
||||
|
||||
int w = 256;
|
||||
int h = 152;
|
||||
@@ -242,8 +242,8 @@ public class GuiLexicon extends GuiScreen {
|
||||
int y = (int) (top + guiHeight / 2 - h / 4 + Math.sin((ClientTickHandler.ticksInGame + par3) / 6.0) * 40);
|
||||
|
||||
drawTexturedModalRect(x * 2, y * 2, 0, 0, w, h);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
RenderHelper.renderTooltip(par1, par2, Arrays.asList(EnumChatFormatting.GOLD + "#goldfishchris", EnumChatFormatting.AQUA + "IT SAYS MANUAL"));
|
||||
}
|
||||
@@ -253,11 +253,11 @@ public class GuiLexicon extends GuiScreen {
|
||||
|
||||
if(hasTutorialArrow) {
|
||||
mc.renderEngine.bindTexture(texture);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glColor4f(1F, 1F, 1F, 0.7F + (float) (Math.sin((ClientTickHandler.ticksInGame + par3) * 0.3F) + 1) * 0.15F);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.color(1F, 1F, 1F, 0.7F + (float) (Math.sin((ClientTickHandler.ticksInGame + par3) * 0.3F) + 1) * 0.15F);
|
||||
drawTexturedModalRect(tutorialArrowX, tutorialArrowY, 20, 200, TUTORIAL_ARROW_WIDTH, TUTORIAL_ARROW_HEIGHT);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GlStateManager.disableBlend();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -308,7 +308,7 @@ public class GuiLexicon extends GuiScreen {
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
drawTexturedModalRect(x + l / 2 + 3, y - 1, 54, 180, 6, 11);
|
||||
if(drawLeft)
|
||||
drawTexturedModalRect(x - l / 2 - 9, y - 1, 61, 180, 6, 11);
|
||||
@@ -320,8 +320,8 @@ public class GuiLexicon extends GuiScreen {
|
||||
}
|
||||
|
||||
void drawHeader() {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||
drawTexturedModalRect(left - 8, top + 9, 0, 224, 140, 31);
|
||||
|
||||
@@ -335,7 +335,7 @@ public class GuiLexicon extends GuiScreen {
|
||||
fontRendererObj.drawString(s, left + guiWidth / 2 - fontRendererObj.getStringWidth(s) / 2, top + 36, 0);
|
||||
|
||||
fontRendererObj.setUnicodeFlag(unicode);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
categoryHighlight = "";
|
||||
}
|
||||
|
||||
@@ -66,10 +66,10 @@ public class GuiLexiconChallenge extends GuiLexicon implements IParented {
|
||||
super.drawScreen(par1, par2, par3);
|
||||
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GlStateManager.enableRescaleNormal();
|
||||
mc.getRenderItem().renderItemIntoGUI(challenge.icon, left + 18, top + 15);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GlStateManager.enableBlend();
|
||||
|
||||
boolean unicode = fontRendererObj.getUnicodeFlag();
|
||||
fontRendererObj.setUnicodeFlag(true);
|
||||
|
||||
@@ -163,7 +163,7 @@ public class GuiLexiconIndex extends GuiLexicon implements IParented {
|
||||
if(!searchField.getText().isEmpty()) {
|
||||
drawBookmark(left + 138, top + guiHeight - 24, " " + searchField.getText(), false);
|
||||
mc.renderEngine.bindTexture(texture);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
drawTexturedModalRect(left + 134, top + guiHeight - 26, 86, 180, 12, 12);
|
||||
} else {
|
||||
boolean unicode = mc.fontRendererObj.getUnicodeFlag();
|
||||
@@ -188,9 +188,9 @@ public class GuiLexiconIndex extends GuiLexicon implements IParented {
|
||||
y = currentButton.yPosition;
|
||||
|
||||
mc.fontRendererObj.drawStringWithShadow("?", x, y, 0xFFFFFF);
|
||||
GL11.glScalef(0.5F, 0.5F, 1F);
|
||||
GlStateManager.scale(0.5F, 0.5F, 1F);
|
||||
mc.fontRendererObj.drawStringWithShadow(EnumChatFormatting.BOLD + "Shift", x * 2 - 6, y * 2 + 20, 0xFFFFFF);
|
||||
GL11.glScalef(2F, 2F, 1F);
|
||||
GlStateManager.scale(2F, 2F, 1F);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,16 +204,16 @@ public class GuiLexiconIndex extends GuiLexicon implements IParented {
|
||||
mc.fontRendererObj.setUnicodeFlag(true);
|
||||
int width = mc.fontRendererObj.getStringWidth(s);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(x, y, 0);
|
||||
GL11.glScalef(fract, 1F, 1F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(x, y, 0);
|
||||
GlStateManager.scale(fract, 1F, 1F);
|
||||
Gui.drawRect(12, -30, width + 20, -2, 0x44000000);
|
||||
Gui.drawRect(10, -32, width + 22, -2, 0x44000000);
|
||||
drawBookmark(width / 2 + 16, -8, s, true, 0xFFFFFF);
|
||||
mc.fontRendererObj.setUnicodeFlag(unicode);
|
||||
|
||||
net.minecraft.client.renderer.RenderHelper.enableGUIStandardItemLighting();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GlStateManager.enableRescaleNormal();
|
||||
ItemStack paper = new ItemStack(Items.paper, currentEntry.pages.size());
|
||||
|
||||
mc.getRenderItem().renderItemAndEffectIntoGUI(paper, 14, -28);
|
||||
@@ -230,7 +230,7 @@ public class GuiLexiconIndex extends GuiLexicon implements IParented {
|
||||
|
||||
net.minecraft.client.renderer.RenderHelper.disableStandardItemLighting();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
setHoveredButton(null);
|
||||
|
||||
@@ -34,7 +34,7 @@ public class GuiButtonAchievement extends GuiButtonLexicon {
|
||||
int k = getHoverState(hovered);
|
||||
|
||||
par1Minecraft.renderEngine.bindTexture(GuiLexicon.texture);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
drawTexturedModalRect(xPosition, yPosition, k == 2 ? 109 : 98, 191, 11, 11);
|
||||
|
||||
List<String> tooltip = new ArrayList();
|
||||
|
||||
@@ -33,7 +33,7 @@ public class GuiButtonBack extends GuiButtonLexicon {
|
||||
int k = getHoverState(hovered);
|
||||
|
||||
par1Minecraft.renderEngine.bindTexture(GuiLexicon.texture);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
drawTexturedModalRect(xPosition, yPosition, 36, k == 2 ? 180 : 189, 18, 9);
|
||||
|
||||
List<String> tooltip = getTooltip();
|
||||
|
||||
@@ -48,7 +48,7 @@ public class GuiButtonCategory extends GuiButtonLexicon {
|
||||
ARBShaderObjects.glUniform1iARB(imageUniform, 0);
|
||||
|
||||
OpenGlHelper.setActiveTexture(ARBMultitexture.GL_TEXTURE0_ARB + ConfigHandler.glSecondaryTextureUnit);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GlStateManager.enableTexture2D();
|
||||
int texture = GL11.glGetInteger(GL11.GL_TEXTURE_BINDING_2D);
|
||||
GL11.glBindTexture(GL11.GL_TEXTURE_2D, r.getTexture(stencilResource).getGlTextureId());
|
||||
ARBShaderObjects.glUniform1iARB(maskUniform, ConfigHandler.glSecondaryTextureUnit);
|
||||
@@ -88,11 +88,11 @@ public class GuiButtonCategory extends GuiButtonLexicon {
|
||||
|
||||
float s = 1F / 32F;
|
||||
float defAlpha = 0F;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.scale(0.5F, 0.5F, 0.5F);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
|
||||
if(!boundStencil) { // Allow for the texture manager to take care of the ResourceLocation before we use it directly with gl
|
||||
mc.renderEngine.bindTexture(stencilResource);
|
||||
@@ -118,7 +118,7 @@ public class GuiButtonCategory extends GuiButtonLexicon {
|
||||
OpenGlHelper.setActiveTexture(ARBMultitexture.GL_TEXTURE0_ARB);
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
if(inside)
|
||||
gui.categoryHighlight = StatCollector.translateToLocal(getTooltipText());
|
||||
|
||||
@@ -39,16 +39,16 @@ public class GuiButtonChallengeIcon extends GuiButtonLexicon {
|
||||
int k = getHoverState(hovered);
|
||||
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GlStateManager.enableRescaleNormal();
|
||||
par1Minecraft.getRenderItem().renderItemIntoGUI(challenge.icon, xPosition, yPosition);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GlStateManager.enableBlend();
|
||||
|
||||
if(challenge.complete) {
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
GlStateManager.disableDepth();
|
||||
par1Minecraft.fontRendererObj.drawStringWithShadow("\u2714", xPosition + 10, yPosition + 9, 0x004C00);
|
||||
par1Minecraft.fontRendererObj.drawStringWithShadow("\u2714", xPosition + 10, yPosition + 8, 0x0BD20D);
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
GlStateManager.enableDepth();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ public class GuiButtonChallenges extends GuiButtonLexicon {
|
||||
int k = getHoverState(hovered);
|
||||
|
||||
par1Minecraft.renderEngine.bindTexture(GuiLexicon.texture);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
drawTexturedModalRect(xPosition, yPosition, k == 2 ? 131 : 120, 180, 11, 11);
|
||||
|
||||
List<String> tooltip = new ArrayList();
|
||||
|
||||
@@ -39,11 +39,11 @@ public class GuiButtonDoot extends GuiButtonLexicon {
|
||||
int k = getHoverState(hovered);
|
||||
|
||||
par1Minecraft.renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
par1Minecraft.getRenderItem().renderItemIntoGUI(new ItemStack(ModItems.cacophonium), xPosition, yPosition);
|
||||
par1Minecraft.getRenderItem().renderItemIntoGUI(new ItemStack(Items.fireworks), xPosition + 8, yPosition + 2);
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GlStateManager.disableLighting();
|
||||
|
||||
|
||||
List<String> tooltip = new ArrayList();
|
||||
@@ -52,7 +52,7 @@ public class GuiButtonDoot extends GuiButtonLexicon {
|
||||
|
||||
if(k == 2)
|
||||
RenderHelper.renderTooltip(xPosition - 100, yPosition + 36, tooltip);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GlStateManager.enableAlpha();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -46,11 +46,11 @@ public class GuiButtonInvisible extends GuiButtonLexicon {
|
||||
gui.setHoveredButton(this);
|
||||
} else timeHover = Math.max(0, timeHover - gui.timeDelta);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GlStateManager.disableAlpha();
|
||||
int color = 0;
|
||||
String format = FontHelper.getFormatFromString(displayString);
|
||||
if(format.length() > 1) {
|
||||
@@ -70,7 +70,7 @@ public class GuiButtonInvisible extends GuiButtonLexicon {
|
||||
int maxalpha = 0x22;
|
||||
int alpha = Math.min(maxalpha, (int) (timeHover / 4 * maxalpha));
|
||||
drawRect(xPosition - 5, yPosition, (int) (xPosition - 5 + timeHover * 24), yPosition + height, alpha << 24 | color);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GlStateManager.enableAlpha();
|
||||
|
||||
boolean unicode = par1Minecraft.fontRendererObj.getUnicodeFlag();
|
||||
par1Minecraft.fontRendererObj.setUnicodeFlag(true);
|
||||
@@ -78,14 +78,14 @@ public class GuiButtonInvisible extends GuiButtonLexicon {
|
||||
par1Minecraft.fontRendererObj.setUnicodeFlag(unicode);
|
||||
|
||||
if(showStack) {
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GlStateManager.scale(0.5F, 0.5F, 0.5F);
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GlStateManager.enableRescaleNormal();
|
||||
par1Minecraft.getRenderItem().renderItemIntoGUI(displayStack, xPosition * 2 - 6, yPosition * 2 + 4);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GlStateManager.enableBlend();
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -37,7 +37,7 @@ public class GuiButtonNotes extends GuiButtonLexicon {
|
||||
int k = getHoverState(hovered);
|
||||
|
||||
par1Minecraft.renderEngine.bindTexture(GuiLexicon.texture);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
drawTexturedModalRect(xPosition, yPosition, k == 2 ? 130 : 120, 191, 10, 11);
|
||||
|
||||
List<String> tooltip = new ArrayList();
|
||||
|
||||
@@ -34,7 +34,7 @@ public class GuiButtonOptions extends GuiButtonLexicon {
|
||||
int k = getHoverState(hovered);
|
||||
|
||||
par1Minecraft.renderEngine.bindTexture(GuiLexicon.texture);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
drawTexturedModalRect(xPosition, yPosition, k == 2 ? 109 : 98, 180, 11, 11);
|
||||
|
||||
List<String> tooltip = new ArrayList();
|
||||
|
||||
@@ -36,7 +36,7 @@ public class GuiButtonPage extends GuiButtonLexicon {
|
||||
int k = getHoverState(hovered);
|
||||
|
||||
par1Minecraft.renderEngine.bindTexture(GuiLexicon.texture);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
drawTexturedModalRect(xPosition, yPosition, k == 2 ? 18 : 0, right ? 180 : 190, 18, 10);
|
||||
|
||||
if(k == 2)
|
||||
|
||||
@@ -34,7 +34,7 @@ public class GuiButtonShare extends GuiButtonLexicon {
|
||||
int k = getHoverState(hovered);
|
||||
|
||||
par1Minecraft.renderEngine.bindTexture(GuiLexicon.texture);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
drawTexturedModalRect(xPosition, yPosition, k == 2 ? 10 : 0 , 200, 10, 12);
|
||||
|
||||
List<String> tooltip = getTooltip();
|
||||
|
||||
@@ -41,7 +41,7 @@ public class GuiButtonUpdateWarning extends GuiButtonLexicon {
|
||||
boolean red = k == 2 || ClientTickHandler.ticksInGame % 10 < 5;
|
||||
|
||||
par1Minecraft.renderEngine.bindTexture(GuiLexicon.texture);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
drawTexturedModalRect(xPosition, yPosition, red ? 153 : 142, 180, 11, 11);
|
||||
|
||||
List<String> tooltip = new ArrayList();
|
||||
|
||||
@@ -34,7 +34,7 @@ public class GuiButtonViewOnline extends GuiButtonLexicon {
|
||||
int k = getHoverState(hovered);
|
||||
|
||||
par1Minecraft.renderEngine.bindTexture(GuiLexicon.texture);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
drawTexturedModalRect(xPosition, yPosition, k == 2 ? 41 : 30, 200, 11, 11);
|
||||
|
||||
List<String> tooltip = Arrays.asList(EnumChatFormatting.AQUA + StatCollector.translateToLocal("botaniamisc.viewOnline"));
|
||||
|
||||
@@ -91,7 +91,7 @@ public class RecipeHandlerBrewery extends TemplateRecipeHandler {
|
||||
|
||||
@Override
|
||||
public void drawBackground(int recipe) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GuiDraw.changeTexture(getGuiTexture());
|
||||
GuiDraw.drawTexturedModalRect(0, 0, 0, 0, 166, 65);
|
||||
}
|
||||
|
||||
@@ -85,11 +85,11 @@ public class RecipeHandlerElvenTrade extends TemplateRecipeHandler {
|
||||
@Override
|
||||
public void drawBackground(int recipe) {
|
||||
super.drawBackground(recipe);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.7F);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 0.7F);
|
||||
GuiDraw.changeTexture(LibResources.GUI_ELVEN_TRADE_OVERLAY);
|
||||
GuiDraw.drawTexturedModalRect(30, 10, 17, 17, 100, 80);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GlStateManager.disableBlend();
|
||||
GuiDraw.changeTexture(TextureMap.locationBlocksTexture);
|
||||
Minecraft.getMinecraft().getRenderItem().renderIcon(35, 29, BlockAlfPortal.portalTex, 48, 48);
|
||||
}
|
||||
|
||||
@@ -110,8 +110,8 @@ public class RecipeHandlerManaPool extends TemplateRecipeHandler {
|
||||
@Override
|
||||
public void drawBackground(int recipe) {
|
||||
super.drawBackground(recipe);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.5F);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 0.5F);
|
||||
GuiDraw.changeTexture(LibResources.GUI_MANA_INFUSION_OVERLAY);
|
||||
GuiDraw.drawTexturedModalRect(45, 20, 38, 35, 92, 50);
|
||||
HUDHandler.renderManaBar(32, 80, 0x0000FF, 0.75F, ((CachedManaPoolRecipe) arecipes.get(recipe)).mana, TilePool.MAX_MANA / 10);
|
||||
|
||||
+2
-2
@@ -92,8 +92,8 @@ public class RecipeHandlerPetalApothecary extends TemplateRecipeHandler {
|
||||
@Override
|
||||
public void drawBackground(int recipe) {
|
||||
super.drawBackground(recipe);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.5F);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 0.5F);
|
||||
GuiDraw.changeTexture(LibResources.GUI_PETAL_OVERLAY);
|
||||
GuiDraw.drawTexturedModalRect(45, 10, 38, 7, 92, 92);
|
||||
}
|
||||
|
||||
@@ -93,8 +93,8 @@ public class RecipeHandlerPureDaisy extends TemplateRecipeHandler {
|
||||
@Override
|
||||
public void drawBackground(int recipe) {
|
||||
super.drawBackground(recipe);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 0.5F);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 0.5F);
|
||||
GuiDraw.changeTexture(LibResources.GUI_PURE_DAISY_OVERLAY);
|
||||
GuiDraw.drawTexturedModalRect(45, 10, 0, 0, 65, 44);
|
||||
}
|
||||
|
||||
@@ -74,18 +74,18 @@ public class ModelBellows extends ModelBase {
|
||||
//float fract = Math.max(0.1F, (float) (Math.sin(((double) ClientTickHandler.ticksInGame + ClientTickHandler.partialTicks) * 0.2) + 1F) * 0.5F);
|
||||
float mov = (1F - fract) * 0.5F;
|
||||
|
||||
GL11.glTranslatef(0F, mov, 0F);
|
||||
GlStateManager.translate(0F, mov, 0F);
|
||||
Top.render(f5);
|
||||
Handle1.render(f5);
|
||||
Handle2.render(f5);
|
||||
Handle3.render(f5);
|
||||
GL11.glTranslatef(0F, -mov, 0F);
|
||||
GlStateManager.translate(0F, -mov, 0F);
|
||||
|
||||
GL11.glRotatef(180F, 1F, 0F, 0F);
|
||||
GL11.glTranslatef(-0.19F, -1.375F, -0.19F);
|
||||
GL11.glScalef(1F, fract, 1F);
|
||||
GlStateManager.rotate(180F, 1F, 0F, 0F);
|
||||
GlStateManager.translate(-0.19F, -1.375F, -0.19F);
|
||||
GlStateManager.scale(1F, fract, 1F);
|
||||
Funnel.render(f5);
|
||||
GL11.glScalef(1F, 1F / fract, 1F);
|
||||
GlStateManager.scale(1F, 1F / fract, 1F);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -54,20 +54,20 @@ public class ModelBrewery extends ModelBase {
|
||||
float deg = (float) time / 16F;
|
||||
float polerot = -deg * 25F;
|
||||
|
||||
GL11.glTranslatef(0F, offset, 0F);
|
||||
GL11.glRotatef(polerot, 0F, 1F, 0F);
|
||||
GlStateManager.translate(0F, offset, 0F);
|
||||
GlStateManager.rotate(polerot, 0F, 1F, 0F);
|
||||
if(render.brewery.getStackInSlot(0) != null) {
|
||||
GL11.glRotatef(180F, 1F, 0F, 0F);
|
||||
GL11.glTranslatef(-1F / 8F, -0.5F, 1F / 128F);
|
||||
GlStateManager.rotate(180F, 1F, 0F, 0F);
|
||||
GlStateManager.translate(-1F / 8F, -0.5F, 1F / 128F);
|
||||
render.renderItemStack(render.brewery.getStackInSlot(0));
|
||||
GL11.glTranslatef(1F / 8F, 0.5F, -1F / 128F);
|
||||
GL11.glRotatef(-180F, 1F, 0F, 0F);
|
||||
GlStateManager.translate(1F / 8F, 0.5F, -1F / 128F);
|
||||
GlStateManager.rotate(-180F, 1F, 0F, 0F);
|
||||
}
|
||||
|
||||
Pole.render(f);
|
||||
Top.render(f);
|
||||
Bottom.render(f);
|
||||
GL11.glRotatef(-polerot, 0F, 1F, 0F);
|
||||
GlStateManager.rotate(-polerot, 0F, 1F, 0F);
|
||||
|
||||
float degper = (float) (2F * Math.PI) / plates;
|
||||
for(int i = 0; i < plates; i++) {
|
||||
@@ -76,27 +76,27 @@ public class ModelBrewery extends ModelBase {
|
||||
if(time == -1)
|
||||
offset1 = 0F;
|
||||
|
||||
GL11.glTranslatef(0F, offset1, 0F);
|
||||
GlStateManager.translate(0F, offset1, 0F);
|
||||
if(render.brewery.getStackInSlot(i + 1) != null) {
|
||||
float rot = Plate.rotateAngleY * 180F / (float) Math.PI;
|
||||
float transX = 0.3125F;
|
||||
float transY = 1.06F;
|
||||
float transZ = 0.1245F;
|
||||
GL11.glRotatef(rot, 0F, 1F, 0F);
|
||||
GL11.glTranslatef(transX, transY, transZ);
|
||||
GL11.glRotatef(-90F, 1F, 0F, 0F);
|
||||
GlStateManager.rotate(rot, 0F, 1F, 0F);
|
||||
GlStateManager.translate(transX, transY, transZ);
|
||||
GlStateManager.rotate(-90F, 1F, 0F, 0F);
|
||||
render.renderItemStack(render.brewery.getStackInSlot(i + 1));
|
||||
GL11.glRotatef(90F, 1F, 0F, 0F);
|
||||
GL11.glTranslatef(-transX, -transY, -transZ);
|
||||
GL11.glRotatef(-rot, 0F, 1F, 0F);
|
||||
GlStateManager.rotate(90F, 1F, 0F, 0F);
|
||||
GlStateManager.translate(-transX, -transY, -transZ);
|
||||
GlStateManager.rotate(-rot, 0F, 1F, 0F);
|
||||
}
|
||||
|
||||
Plate.render(f);
|
||||
GL11.glTranslatef(0F, -offset1, 0F);
|
||||
GlStateManager.translate(0F, -offset1, 0F);
|
||||
|
||||
deg += degper;
|
||||
}
|
||||
GL11.glTranslatef(0F, -offset, 0F);
|
||||
GlStateManager.translate(0F, -offset, 0F);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -15,6 +15,7 @@ import java.awt.Color;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class ModelHourglass extends ModelBase {
|
||||
@@ -65,41 +66,41 @@ public class ModelHourglass extends ModelBase {
|
||||
base1.render(f);
|
||||
base2.render(f);
|
||||
Color c = new Color(color);
|
||||
GL11.glColor3ub((byte) c.getRed(), (byte) c.getGreen(), (byte) c.getBlue());
|
||||
GlStateManager.color((byte) c.getRed(), (byte) c.getGreen(), (byte) c.getBlue());
|
||||
boolean normalize = GL11.glGetBoolean(GL11.GL_NORMALIZE);
|
||||
GL11.glEnable(GL11.GL_NORMALIZE);
|
||||
GlStateManager.enableNormalize();
|
||||
|
||||
if(fract1 > 0) {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
if(flip)
|
||||
GL11.glTranslatef(-2.5F * f, 1.0F * f, -2.5F * f);
|
||||
GlStateManager.translate(-2.5F * f, 1.0F * f, -2.5F * f);
|
||||
else {
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glTranslatef(-2.5F * f, -6.0F * f, -2.5F * f);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.translate(-2.5F * f, -6.0F * f, -2.5F * f);
|
||||
}
|
||||
|
||||
GL11.glScalef(1F, fract1, 1F);
|
||||
GlStateManager.scale(1F, fract1, 1F);
|
||||
sand1.render(f);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
if(fract2 > 0) {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
if(flip)
|
||||
GL11.glTranslatef(-2.5F * f, -6.0F * f, -2.5F * f);
|
||||
GlStateManager.translate(-2.5F * f, -6.0F * f, -2.5F * f);
|
||||
else {
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glTranslatef(-2.5F * f, 1.0F * f, -2.5F * f);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.translate(-2.5F * f, 1.0F * f, -2.5F * f);
|
||||
}
|
||||
|
||||
GL11.glScalef(1F, fract2, 1F);
|
||||
GlStateManager.scale(1F, fract2, 1F);
|
||||
sand2.render(f);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
if(!normalize)
|
||||
GL11.glDisable(GL11.GL_NORMALIZE);
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
GlStateManager.disableNormalize();
|
||||
GlStateManager.color(1F, 1F, 1F);
|
||||
glass1.render(f);
|
||||
glass2.render(f);
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public class ModelSpinningCubes extends ModelBase {
|
||||
}
|
||||
|
||||
public void renderSpinningCubes(int cubes, int repeat, int origRepeat) {
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GlStateManager.disableTexture2D();
|
||||
|
||||
final float modifier = 6F;
|
||||
final float rotationModifier = 0.2F;
|
||||
@@ -39,8 +39,8 @@ public class ModelSpinningCubes extends ModelBase {
|
||||
double ticks = Minecraft.getMinecraft().thePlayer.ticksExisted - 1.3 * (origRepeat - repeat);
|
||||
float offsetPerCube = 360 / cubes;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.025F, 0.85F, -0.025F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(-0.025F, 0.85F, -0.025F);
|
||||
for(int i = 0; i < cubes; i++) {
|
||||
float offset = offsetPerCube * i;
|
||||
float deg = (int) (ticks / rotationModifier % 360F + offset);
|
||||
@@ -51,19 +51,19 @@ public class ModelSpinningCubes extends ModelBase {
|
||||
float z = (float) (radiusZ * Math.sin(rad));
|
||||
float y = (float) Math.cos((ticks + 50 * i) / 5F) / 10F;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(x, y, z);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(x, y, z);
|
||||
float xRotate = (float) Math.sin(ticks * rotationModifier) / 2F;
|
||||
float yRotate = (float) Math.max(0.6F, Math.sin(ticks * 0.1F) / 2F + 0.5F);
|
||||
float zRotate = (float) Math.cos(ticks * rotationModifier) / 2F;
|
||||
|
||||
GL11.glRotatef(deg, xRotate, yRotate, zRotate);
|
||||
GlStateManager.rotate(deg, xRotate, yRotate, zRotate);
|
||||
if(repeat < origRepeat) {
|
||||
GL11.glColor4f(1F, 1F, 1F, (float) repeat / (float) origRepeat * 0.4F);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
} else GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F, (float) repeat / (float) origRepeat * 0.4F);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.disableAlpha();
|
||||
} else GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
|
||||
int light = 15728880;
|
||||
int lightmapX = light % 65536;
|
||||
@@ -73,14 +73,14 @@ public class ModelSpinningCubes extends ModelBase {
|
||||
spinningCube.render(1F / 16F);
|
||||
|
||||
if(repeat < origRepeat) {
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.enableAlpha();
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GlStateManager.popMatrix();
|
||||
GlStateManager.enableTexture2D();
|
||||
|
||||
if(repeat != 0)
|
||||
renderSpinningCubes(cubes, repeat - 1, origRepeat);
|
||||
|
||||
@@ -26,12 +26,12 @@ public class RenderAltar implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, -0.6F, -0.5F);
|
||||
GL11.glScalef(0.9F, 0.9F, 0.9F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(-0.5F, -0.6F, -0.5F);
|
||||
GlStateManager.scale(0.9F, 0.9F, 0.9F);
|
||||
RenderTileAltar.forceMeta = metadata;
|
||||
TileEntityRendererDispatcher.instance.renderTileEntityAt(new TileAltar(), 0.0D, 0.0D, 0.0D, 0.0F);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -25,10 +25,10 @@ public class RenderAvatar implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, -0.6F, -0.5F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(-0.5F, -0.6F, -0.5F);
|
||||
TileEntityRendererDispatcher.instance.renderTileEntityAt(new TileAvatar(), 0.0D, 0.0D, 0.0D, 0.0F);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -25,11 +25,11 @@ public class RenderBellows implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, -0.3F, -0.5F);
|
||||
GL11.glScalef(1.2F, 1.2F, 1.2F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(-0.5F, -0.3F, -0.5F);
|
||||
GlStateManager.scale(1.2F, 1.2F, 1.2F);
|
||||
TileEntityRendererDispatcher.instance.renderTileEntityAt(new TileBellows(), 0.0D, 0.0D, 0.0D, 0.0F);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,13 +26,13 @@ public class RenderBrewery implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
GL11.glScalef(1.2F, 1.2F, 1.2F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(-0.5F, -0.5F, -0.5F);
|
||||
GlStateManager.scale(1.2F, 1.2F, 1.2F);
|
||||
RenderTileBrewery.rotate = false;
|
||||
TileEntityRendererDispatcher.instance.renderTileEntityAt(new TileBrewery(), 0.0D, 0.0D, 0.0D, 0.0F);
|
||||
RenderTileBrewery.rotate = true;
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -25,10 +25,10 @@ public class RenderCocoon implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(-0.5F, -0.5F, -0.5F);
|
||||
TileEntityRendererDispatcher.instance.renderTileEntityAt(new TileCocoon(), 0.0D, 0.0D, 0.0D, 0.0F);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -25,12 +25,12 @@ public class RenderCorporeaCrystalCube implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(-0.5F, -0.5F, -0.5F);
|
||||
GlStateManager.disableAlpha();
|
||||
TileEntityRendererDispatcher.instance.renderTileEntityAt(new TileCorporeaCrystalCube(), 0.0D, 0.0D, 0.0D, 0.0F);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,13 +26,13 @@ public class RenderCorporeaIndex implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, -0.3F, -0.5F);
|
||||
GL11.glScalef(1.4F, 1.4F, 1.4F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(-0.5F, -0.3F, -0.5F);
|
||||
GlStateManager.scale(1.4F, 1.4F, 1.4F);
|
||||
RenderTileCorporeaIndex.move = false;
|
||||
TileEntityRendererDispatcher.instance.renderTileEntityAt(new TileCorporeaIndex(), 0.0D, 0.0D, 0.0D, 0.0F);
|
||||
RenderTileCorporeaIndex.move = true;
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -25,12 +25,12 @@ public class RenderHourglass implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(-0.5F, -0.5F, -0.5F);
|
||||
GlStateManager.disableAlpha();
|
||||
TileEntityRendererDispatcher.instance.renderTileEntityAt(new TileHourglass(), 0.0D, 0.0D, 0.0D, 0.0F);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -25,11 +25,11 @@ public class RenderIncensePlate implements ISimpleBlockRenderingHandler{
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, -0.1F, -0.5F);
|
||||
GL11.glScalef(1.4F, 1.4F, 1.4F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(-0.5F, -0.1F, -0.5F);
|
||||
GlStateManager.scale(1.4F, 1.4F, 1.4F);
|
||||
TileEntityRendererDispatcher.instance.renderTileEntityAt(new TileIncensePlate(), 0.0D, 0.0D, 0.0D, 0.0F);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,12 +26,12 @@ public class RenderPool implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(-0.5F, -0.5F, -0.5F);
|
||||
RenderTilePool.forceMeta = metadata;
|
||||
RenderTilePool.forceMana = RenderTilePool.forceMana | metadata == 1;
|
||||
TileEntityRendererDispatcher.instance.renderTileEntityAt(new TilePool(), 0.0D, 0.0D, 0.0D, 0.0F);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -25,10 +25,10 @@ public class RenderPump implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, -0.25F, -0.5F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(-0.5F, -0.25F, -0.5F);
|
||||
TileEntityRendererDispatcher.instance.renderTileEntityAt(new TilePump(), 0.0D, 0.0D, 0.0D, 0.0F);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,12 +26,12 @@ public class RenderPylon implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, -0.7F, -0.5F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(-0.5F, -0.7F, -0.5F);
|
||||
RenderTilePylon.green = metadata == 1;
|
||||
RenderTilePylon.pink = metadata == 2;
|
||||
TileEntityRendererDispatcher.instance.renderTileEntityAt(new TilePylon(), 0.0D, 0.0D, 0.0D, 0.0F);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -25,10 +25,10 @@ public class RenderSpawnerClaw implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, 0F, -0.5F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(-0.5F, 0F, -0.5F);
|
||||
TileEntityRendererDispatcher.instance.renderTileEntityAt(new TileSpawnerClaw(), 0.0D, 0.0D, 0.0D, 0.0F);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -25,8 +25,8 @@ public class RenderSpreader implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(-0.5F, -0.5F, -0.5F);
|
||||
TileSpreader.staticRedstone = metadata == 1;
|
||||
TileSpreader.staticDreamwood = metadata == 2 || metadata == 3;
|
||||
TileSpreader.staticUltra = metadata == 3;
|
||||
@@ -34,7 +34,7 @@ public class RenderSpreader implements ISimpleBlockRenderingHandler {
|
||||
TileSpreader spreader = new TileSpreader();
|
||||
spreader.rotationX = -180F;
|
||||
TileEntityRendererDispatcher.instance.renderTileEntityAt(spreader, 0.0D, 0.0D, 0.0D, 0.0F);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -25,10 +25,10 @@ public class RenderTeruTeruBozu implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, -0.3F, -0.5F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(-0.5F, -0.3F, -0.5F);
|
||||
TileEntityRendererDispatcher.instance.renderTileEntityAt(new TileTeruTeruBozu(), 0.0D, 0.0D, 0.0D, 0.0F);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -25,10 +25,10 @@ public class RenderTinyPotato implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, 0F, -0.5F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(-0.5F, 0F, -0.5F);
|
||||
TileEntityRendererDispatcher.instance.renderTileEntityAt(new TileTinyPotato(), 0.0D, 0.0D, 0.0D, 0.0F);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -36,55 +36,55 @@ public class RenderBabylonWeapon extends Render {
|
||||
@Override
|
||||
public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) {
|
||||
EntityBabylonWeapon weapon = (EntityBabylonWeapon) par1Entity;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)par2, (float)par4, (float)par6);
|
||||
GL11.glRotatef(weapon.getRotation(), 0F, 1F, 0F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate((float)par2, (float)par4, (float)par6);
|
||||
GlStateManager.rotate(weapon.getRotation(), 0F, 1F, 0F);
|
||||
|
||||
int live = weapon.getLiveTicks();
|
||||
int delay = weapon.getDelay();
|
||||
float charge = Math.min(10F, Math.max(live, weapon.getChargeTicks()) + par9);
|
||||
float chargeMul = charge / 10F;
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture);
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
float s = 1.5F;
|
||||
GL11.glScalef(s, s, s);
|
||||
GL11.glRotatef(-90F, 0F, 1F, 0F);
|
||||
GL11.glRotatef(45F, 0F, 0F, 1F);
|
||||
GlStateManager.scale(s, s, s);
|
||||
GlStateManager.rotate(-90F, 0F, 1F, 0F);
|
||||
GlStateManager.rotate(45F, 0F, 0F, 1F);
|
||||
IIcon icon = ItemKingKey.weaponIcons[weapon.getVariety()];
|
||||
GL11.glColor4f(1F, 1F, 1F, chargeMul);
|
||||
GlStateManager.color(1F, 1F, 1F, chargeMul);
|
||||
float f = icon.getMinU();
|
||||
float f1 = icon.getMaxU();
|
||||
float f2 = icon.getMinV();
|
||||
float f3 = icon.getMaxV();
|
||||
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240, 240);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GlStateManager.disableLighting();
|
||||
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glColor4f(1F, 1F, 1F, chargeMul);
|
||||
GlStateManager.disableCull();
|
||||
GlStateManager.shadeModel(GL11.GL_SMOOTH);
|
||||
GlStateManager.color(1F, 1F, 1F, chargeMul);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(babylon);
|
||||
|
||||
Tessellator tes = Tessellator.getInstance();
|
||||
ShaderHelper.useShader(ShaderHelper.halo);
|
||||
Random rand = new Random(weapon.getUniqueID().getMostSignificantBits());
|
||||
GL11.glRotatef(-90F, 1F, 0F, 0F);
|
||||
GL11.glTranslatef(0F, -0.3F + rand.nextFloat() * 0.1F, 1F);
|
||||
GlStateManager.rotate(-90F, 1F, 0F, 0F);
|
||||
GlStateManager.translate(0F, -0.3F + rand.nextFloat() * 0.1F, 1F);
|
||||
|
||||
s = chargeMul;
|
||||
if(live > delay)
|
||||
s -= Math.min(1F, (live - delay + par9) * 0.2F);
|
||||
s *= 2F;
|
||||
GL11.glScalef(s, s, s);
|
||||
GlStateManager.scale(s, s, s);
|
||||
|
||||
GL11.glRotatef(charge * 9F + (weapon.ticksExisted + par9) * 0.5F + rand.nextFloat() * 360F, 0F, 1F, 0F);
|
||||
GlStateManager.rotate(charge * 9F + (weapon.ticksExisted + par9) * 0.5F + rand.nextFloat() * 360F, 0F, 1F, 0F);
|
||||
|
||||
tes.startDrawingQuads();
|
||||
tes.addVertexWithUV(-1, 0, -1, 0, 0);
|
||||
@@ -95,10 +95,10 @@ public class RenderBabylonWeapon extends Render {
|
||||
|
||||
ShaderHelper.releaseShader();
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.enableLighting();
|
||||
GlStateManager.shadeModel(GL11.GL_FLAT);
|
||||
GlStateManager.enableCull();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,6 +12,7 @@ package vazkii.botania.client.render.entity;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
@@ -37,7 +38,7 @@ public class RenderCorporeaSpark extends RenderSparkBase<EntityCorporeaSpark> {
|
||||
@Override
|
||||
public void colorSpinningIcon(EntityCorporeaSpark entity) {
|
||||
int network = Math.min(15, entity.getNetwork());
|
||||
GL11.glColor3f(EntitySheep.fleeceColorTable[network][0], EntitySheep.fleeceColorTable[network][1], EntitySheep.fleeceColorTable[network][2]);
|
||||
GlStateManager.color(EntitySheep.fleeceColorTable[network][0], EntitySheep.fleeceColorTable[network][1], EntitySheep.fleeceColorTable[network][2]);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -53,14 +54,14 @@ public class RenderCorporeaSpark extends RenderSparkBase<EntityCorporeaSpark> {
|
||||
|
||||
float absTime = Math.abs(time) - pticks;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(90F, 1F, 0F, 0F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.rotate(90F, 1F, 0F, 0F);
|
||||
float scalef = 1F / 6F;
|
||||
GL11.glScalef(scalef, scalef, scalef);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glColor4f(1F, 1F, 1F, absTime / 10);
|
||||
GL11.glTranslatef(0F, 0F, -2F + (time < 0 ? -absTime : absTime) / 6);
|
||||
GlStateManager.scale(scalef, scalef, scalef);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.color(1F, 1F, 1F, absTime / 10);
|
||||
GlStateManager.translate(0F, 0F, -2F + (time < 0 ? -absTime : absTime) / 6);
|
||||
|
||||
ItemStack stack = entity.getDisplayedItem();
|
||||
if(stack == null)
|
||||
@@ -84,20 +85,20 @@ public class RenderCorporeaSpark extends RenderSparkBase<EntityCorporeaSpark> {
|
||||
int shift = pieces / 2;
|
||||
|
||||
float scale = 1F / pieces * 3F;
|
||||
GL11.glScalef(scale, scale, 1F);
|
||||
GlStateManager.scale(scale, scale, 1F);
|
||||
for(int i = -shift; i < shift; i++) {
|
||||
GL11.glTranslated(gap * i, 0F, 0F);
|
||||
GlStateManager.translate(gap * i, 0F, 0F);
|
||||
for(int j = -shift; j < shift; j++) {
|
||||
GL11.glTranslated(0F, gap * j, 0F);
|
||||
GlStateManager.translate(0F, gap * j, 0F);
|
||||
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), minU + stepU * (i + shift), minV + stepV * (j + shift + 1), minU + stepU * (i + shift + 1), minV + stepV * (j + shift), icon.getIconWidth() / pieces, icon.getIconHeight() / pieces, 1F / 8F);
|
||||
GL11.glTranslated(0F, -gap * j, 0F);
|
||||
GlStateManager.translate(0F, -gap * j, 0F);
|
||||
}
|
||||
GL11.glTranslated(-gap * i, 0F, 0F);
|
||||
GlStateManager.translate(-gap * i, 0F, 0F);
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -10,6 +10,7 @@
|
||||
*/
|
||||
package vazkii.botania.client.render.entity;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@@ -24,15 +25,15 @@ public class RenderManaStorm extends Render {
|
||||
|
||||
@Override
|
||||
public void doRender(Entity e, double x, double y, double z, float something, float pticks) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x, y, z);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(x, y, z);
|
||||
EntityManaStorm storm = (EntityManaStorm) e;
|
||||
float maxScale = 1.95F;
|
||||
float scale = 0.05F + ((float) storm.burstsFired / EntityManaStorm.TOTAL_BURSTS - (storm.deathTime == 0 ? 0 : storm.deathTime + pticks) / EntityManaStorm.DEATH_TIME) * maxScale;
|
||||
RenderHelper.renderStar(0x00FF00, scale, scale, scale, e.getUniqueID().getMostSignificantBits());
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.disableRescaleNormal();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -69,21 +69,21 @@ public class RenderPixie extends RenderLiving {
|
||||
else {
|
||||
bindTexture(getEntityTexture(par1EntityPixie));
|
||||
float f1 = 1.0F;
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.disableAlpha();
|
||||
GlStateManager.blendFunc(GL11.GL_ONE, GL11.GL_ONE);
|
||||
|
||||
if (par1EntityPixie.isInvisible())
|
||||
GL11.glDepthMask(false);
|
||||
GlStateManager.depthMask(false);
|
||||
else
|
||||
GL11.glDepthMask(true);
|
||||
GlStateManager.depthMask(true);
|
||||
|
||||
char c0 = 61680;
|
||||
int j = c0 % 65536;
|
||||
int k = c0 / 65536;
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, j / 1.0F, k / 1.0F);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, f1);
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, f1);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,42 +32,42 @@ public class RenderSparkBase<T extends Entity> extends RenderEntity {
|
||||
T tEntity = (T) par1Entity;
|
||||
IIcon iicon = getBaseIcon(tEntity);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)par2, (float)par4, (float)par6);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0.05F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate((float)par2, (float)par4, (float)par6);
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.alphaFunc(GL11.GL_GREATER, 0.05F);
|
||||
|
||||
double time = ClientTickHandler.ticksInGame + par9;
|
||||
time += new Random(par1Entity.getEntityId()).nextInt();
|
||||
GL11.glColor4f(1F, 1F, 1F, 0.7F + 0.3F * (float) (Math.sin(time / 5.0) + 0.5) * 2);
|
||||
GlStateManager.color(1F, 1F, 1F, 0.7F + 0.3F * (float) (Math.sin(time / 5.0) + 0.5) * 2);
|
||||
|
||||
float scale = 0.75F + 0.1F * (float) Math.sin(time / 10);
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GlStateManager.scale(scale, scale, scale);
|
||||
bindEntityTexture(par1Entity);
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
float r = 180.0F - renderManager.playerViewY;
|
||||
GL11.glRotatef(r, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-renderManager.playerViewX, 1F, 0F, 0F);
|
||||
GlStateManager.rotate(r, 0.0F, 1.0F, 0.0F);
|
||||
GlStateManager.rotate(-renderManager.playerViewX, 1F, 0F, 0F);
|
||||
func_77026_a(tessellator, iicon);
|
||||
|
||||
IIcon spinningIcon = getSpinningIcon(tEntity);
|
||||
if(spinningIcon != null) {
|
||||
GL11.glTranslatef(-0.02F + (float) Math.sin(time / 20) * 0.2F, 0.24F + (float) Math.cos(time / 20) * 0.2F, 0.005F);
|
||||
GL11.glScalef(0.2F, 0.2F, 0.2F);
|
||||
GlStateManager.translate(-0.02F + (float) Math.sin(time / 20) * 0.2F, 0.24F + (float) Math.cos(time / 20) * 0.2F, 0.005F);
|
||||
GlStateManager.scale(0.2F, 0.2F, 0.2F);
|
||||
colorSpinningIcon(tEntity);
|
||||
func_77026_a(tessellator, spinningIcon);
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.popMatrix();
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
renderCallback(tEntity, par9);
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.disableRescaleNormal();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
public IIcon getBaseIcon(T entity) {
|
||||
|
||||
@@ -33,16 +33,16 @@ public class RenderThornChakram extends Render {
|
||||
IIcon iicon = ModItems.thornChakram.getIconFromDamage(fire ? 1 : 0);
|
||||
|
||||
if(iicon != null) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_);
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.scale(0.5F, 0.5F, 0.5F);
|
||||
bindEntityTexture(p_76986_1_);
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
|
||||
func_77026_a(tessellator, iicon, fire ? 240 : -1);
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.disableRescaleNormal();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,8 +59,8 @@ public class RenderThornChakram extends Render {
|
||||
float f4 = 1.0F;
|
||||
float f5 = 0.5F;
|
||||
float f6 = 0.25F;
|
||||
GL11.glRotatef(180.0F - renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
|
||||
GlStateManager.rotate(180.0F - renderManager.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
GlStateManager.rotate(-renderManager.playerViewX, 1.0F, 0.0F, 0.0F);
|
||||
p_77026_1_.startDrawingQuads();
|
||||
p_77026_1_.setNormal(0.0F, 1.0F, 0.0F);
|
||||
if(light != -1)
|
||||
|
||||
@@ -38,12 +38,12 @@ public class RenderBow implements IItemRenderer {
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
switch(type) {
|
||||
case ENTITY : {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, 0F, 0F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(-0.5F, 0F, 0F);
|
||||
if(item.isOnItemFrame())
|
||||
GL11.glTranslatef(0F, -0.3F, 0.01F);
|
||||
GlStateManager.translate(0F, -0.3F, 0.01F);
|
||||
render(item, null, false);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
break;
|
||||
}
|
||||
case EQUIPPED : {
|
||||
@@ -66,9 +66,9 @@ public class RenderBow implements IItemRenderer {
|
||||
int time = ReflectionHelper.getPrivateValue(EntityPlayer.class, player, LibObfuscation.ITEM_IN_USE_COUNT);
|
||||
icon = item.getItem().getIcon(item, 0, player, using, time);
|
||||
if(transform) {
|
||||
GL11.glTranslatef(0.2F, -0.3F, 0.1F);
|
||||
//GL11.glRotatef(20.0F, 0.0F, 1.0F, 0.0F);
|
||||
//GL11.glRotatef(-100.0F, 1.0F, 0.0F, 0.0F);
|
||||
GlStateManager.translate(0.2F, -0.3F, 0.1F);
|
||||
//GlStateManager.rotate(20.0F, 0.0F, 1.0F, 0.0F);
|
||||
//GlStateManager.rotate(-100.0F, 1.0F, 0.0F, 0.0F);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,16 +78,16 @@ public class RenderBow implements IItemRenderer {
|
||||
float f3 = icon.getMaxV();
|
||||
float scale = 1F / 16F;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), scale);
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -36,19 +36,19 @@ public class RenderFloatingFlowerItem implements IItemRenderer {
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack stack, Object... data) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(-0.5F, -0.5F, -0.5F);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
float s = 1.4F;
|
||||
GL11.glScalef(s, s, s);
|
||||
GL11.glRotatef(-5F, 1F, 0F, 0F);
|
||||
GlStateManager.scale(s, s, s);
|
||||
GlStateManager.rotate(-5F, 1F, 0F, 0F);
|
||||
Item item = stack.getItem();
|
||||
TileFloatingFlower.forcedStack = item instanceof ItemBlockFloatingSpecialFlower ? ItemBlockSpecialFlower.ofType(ItemBlockSpecialFlower.getType(stack)) : new ItemStack(ModBlocks.flower, 1, stack.getItemDamage());
|
||||
|
||||
TileEntityRendererDispatcher.instance.renderTileEntityAt(new TileFloatingFlower(), 0.0D, 0.0D, 0.0D, 0.0F);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -44,12 +44,12 @@ public class RenderLens implements IItemRenderer {
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
switch(type) {
|
||||
case ENTITY : {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, 0F, 0F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(-0.5F, 0F, 0F);
|
||||
if(item.isOnItemFrame())
|
||||
GL11.glTranslatef(0F, -0.3F, 0.01F);
|
||||
GlStateManager.translate(0F, -0.3F, 0.01F);
|
||||
render(item);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
break;
|
||||
}
|
||||
case EQUIPPED : {
|
||||
@@ -78,29 +78,29 @@ public class RenderLens implements IItemRenderer {
|
||||
float f3 = icon.getMaxV();
|
||||
float scale = 1F / 16F;
|
||||
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), scale);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.enableCull();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
Color color = new Color(color_);
|
||||
GL11.glColor4ub((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue(), (byte) 255);
|
||||
GlStateManager.color((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue(), (byte) 255);
|
||||
|
||||
boolean shiny = ItemLens.getStoredColor(item) != -1;
|
||||
icon = ItemLens.iconGlass;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glTranslatef(0F, 0F, -0.5F);
|
||||
GlStateManager.scale(scale, scale, scale);
|
||||
GlStateManager.translate(0F, 0F, -0.5F);
|
||||
renderShinyLensIcon(icon, shiny);
|
||||
GL11.glRotatef(180F, 0F, 1F, 0F);
|
||||
GL11.glTranslatef(-16F, 0F, 0F);
|
||||
GlStateManager.rotate(180F, 0F, 1F, 0F);
|
||||
GlStateManager.translate(-16F, 0F, 0F);
|
||||
renderShinyLensIcon(icon, shiny);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.disableCull();
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
}
|
||||
|
||||
public static void renderShinyLensIcon(IIcon icon, boolean shiny) {
|
||||
|
||||
@@ -44,7 +44,7 @@ public class RenderLexicon implements IItemRenderer {
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
mc.renderEngine.bindTexture(texture);
|
||||
float opening = 0F;
|
||||
@@ -57,10 +57,10 @@ public class RenderLexicon implements IItemRenderer {
|
||||
else ticks -= ClientTickHandler.partialTicks;
|
||||
}
|
||||
|
||||
GL11.glTranslatef(0.3F + 0.02F * ticks, 0.475F + 0.01F * ticks, -0.2F - 0.01F * ticks);
|
||||
GL11.glRotatef(87.5F + ticks * 5, 0F, 1F, 0F);
|
||||
GL11.glRotatef(ticks * 2.5F, 0F, 0F, 1F);
|
||||
GL11.glScalef(0.9F, 0.9F, 0.9F);
|
||||
GlStateManager.translate(0.3F + 0.02F * ticks, 0.475F + 0.01F * ticks, -0.2F - 0.01F * ticks);
|
||||
GlStateManager.rotate(87.5F + ticks * 5, 0F, 1F, 0F);
|
||||
GlStateManager.rotate(ticks * 2.5F, 0F, 0F, 1F);
|
||||
GlStateManager.scale(0.9F, 0.9F, 0.9F);
|
||||
opening = ticks / 12F;
|
||||
|
||||
float pageFlipTicks = ClientTickHandler.pageFlipTicks;
|
||||
@@ -72,9 +72,9 @@ public class RenderLexicon implements IItemRenderer {
|
||||
model.render(null, 0F, 0F, pageFlip, opening, 0F, 1F / 16F);
|
||||
if(ticks < 3) {
|
||||
FontRenderer font = Minecraft.getMinecraft().fontRenderer;
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glTranslatef(-0.3F, -0.21F, -0.07F);
|
||||
GL11.glScalef(0.0035F, 0.0035F, -0.0035F);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.translate(-0.3F, -0.21F, -0.07F);
|
||||
GlStateManager.scale(0.0035F, 0.0035F, -0.0035F);
|
||||
boolean bevo = Minecraft.getMinecraft().thePlayer.getCommandSenderName().equalsIgnoreCase("BevoLJ");
|
||||
boolean saice = Minecraft.getMinecraft().thePlayer.getCommandSenderName().equalsIgnoreCase("saice");
|
||||
|
||||
@@ -89,27 +89,27 @@ public class RenderLexicon implements IItemRenderer {
|
||||
title = StatCollector.translateToLocal("item.botania:lexicon.saice");
|
||||
|
||||
font.drawString(font.trimStringToWidth(title, 80), 0, 0, 0xD69700);
|
||||
GL11.glTranslatef(0F, 10F, 0F);
|
||||
GL11.glScalef(0.6F, 0.6F, 0.6F);
|
||||
GlStateManager.translate(0F, 10F, 0F);
|
||||
GlStateManager.scale(0.6F, 0.6F, 0.6F);
|
||||
font.drawString(EnumChatFormatting.ITALIC + "" + EnumChatFormatting.BOLD + String.format(StatCollector.translateToLocal("botaniamisc.edition"), ItemLexicon.getEdition()), 0, 0, 0xA07100);
|
||||
|
||||
GL11.glTranslatef(0F, 15F, 0F);
|
||||
GlStateManager.translate(0F, 15F, 0F);
|
||||
font.drawString(StatCollector.translateToLocal("botaniamisc.lexiconcover0"), 0, 0, 0x79ff92);
|
||||
|
||||
GL11.glTranslatef(0F, 10F, 0F);
|
||||
GlStateManager.translate(0F, 10F, 0F);
|
||||
font.drawString(EnumChatFormatting.UNDERLINE + StatCollector.translateToLocal("botaniamisc.lexiconcover1"), 0, 0, 0x79ff92);
|
||||
|
||||
GL11.glTranslatef(0F, 50F, 0F);
|
||||
GlStateManager.translate(0F, 50F, 0F);
|
||||
font.drawString(StatCollector.translateToLocal("botaniamisc.lexiconcover2"), 0, 0, 0x79ff92);
|
||||
GL11.glTranslatef(0F, 10F, 0F);
|
||||
GlStateManager.translate(0F, 10F, 0F);
|
||||
font.drawString(EnumChatFormatting.ITALIC + StatCollector.translateToLocal("botaniamisc.lexiconcover3"), 0, 0, 0x79ff92);
|
||||
if(bevo || saice) {
|
||||
GL11.glTranslatef(0F, 10F, 0F);
|
||||
GlStateManager.translate(0F, 10F, 0F);
|
||||
font.drawString(StatCollector.translateToLocal("botaniamisc.lexiconcover" + (bevo ? 4 : 5)), 0, 0, 0x79ff92);
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -34,12 +34,12 @@ public class RenderTransparentItem implements IItemRenderer {
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
switch(type) {
|
||||
case ENTITY : {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, 0F, 0F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(-0.5F, 0F, 0F);
|
||||
if(item.isOnItemFrame())
|
||||
GL11.glTranslatef(0F, -0.3F, 0.01F);
|
||||
GlStateManager.translate(0F, -0.3F, 0.01F);
|
||||
render(item);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
break;
|
||||
}
|
||||
case EQUIPPED : {
|
||||
@@ -63,16 +63,16 @@ public class RenderTransparentItem implements IItemRenderer {
|
||||
float f3 = icon.getMaxV();
|
||||
float scale = 1F / 16F;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), scale);
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -31,39 +31,39 @@ public class RenderTileAlfPortal extends TileEntitySpecialRenderer {
|
||||
if(meta == 0)
|
||||
return;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(d0, d1, d2);
|
||||
GL11.glTranslatef(-1F, 1F, 0.25F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(d0, d1, d2);
|
||||
GlStateManager.translate(-1F, 1F, 0.25F);
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.disableAlpha();
|
||||
GlStateManager.enableCull();
|
||||
float alpha = (float) Math.min(1F, (Math.sin((ClientTickHandler.ticksInGame + f) / 8D) + 1D) / 7D + 0.6D) * (Math.min(60, portal.ticksOpen) / 60F) * 0.5F;
|
||||
GL11.glColor4f(1F, 1F, 1F, alpha);
|
||||
GlStateManager.color(1F, 1F, 1F, alpha);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
|
||||
if(meta == 2) {
|
||||
GL11.glTranslatef(1.25F, 0F, 1.75F);
|
||||
GL11.glRotatef(90F, 0F, 1F, 0F);
|
||||
GlStateManager.translate(1.25F, 0F, 1.75F);
|
||||
GlStateManager.rotate(90F, 0F, 1F, 0F);
|
||||
}
|
||||
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GlStateManager.disableCull();
|
||||
GlStateManager.disableLighting();
|
||||
renderIcon(0, 0, BlockAlfPortal.portalTex, 3, 3, 240);
|
||||
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glTranslated(0F, 0F, 0.5F);
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.translate(0F, 0F, 0.5F);
|
||||
renderIcon(0, 0, BlockAlfPortal.portalTex, 3, 3, 240);
|
||||
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.enableCull();
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.enableLighting();
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
public void renderIcon(int par1, int par2, IIcon par3Icon, int par4, int par5, int brightness) {
|
||||
|
||||
@@ -55,21 +55,21 @@ public class RenderTileAltar extends TileEntitySpecialRenderer {
|
||||
public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float pticks, int digProgress) {
|
||||
TileAltar altar = (TileAltar) tileentity;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(altar.isMossy ? textureMossy : textures[Math.min(textures.length - 1, forceMeta == -1 ? tileentity.getBlockMetadata() : forceMeta)]);
|
||||
|
||||
GL11.glTranslated(d0 + 0.5, d1 + 1.5, d2 + 0.5);
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
GlStateManager.translate(d0 + 0.5, d1 + 1.5, d2 + 0.5);
|
||||
GlStateManager.scale(1F, -1F, -1F);
|
||||
model.render();
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GlStateManager.scale(1F, -1F, -1F);
|
||||
GlStateManager.enableRescaleNormal();
|
||||
|
||||
boolean water = altar.hasWater();
|
||||
boolean lava = altar.hasLava();
|
||||
if(water || lava) {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
float s = 1F / 256F * 10F;
|
||||
float v = 1F / 8F;
|
||||
float w = -v * 2.5F;
|
||||
@@ -90,9 +90,9 @@ public class RenderTileAltar extends TileEntitySpecialRenderer {
|
||||
double ticks = (ClientTickHandler.ticksInGame + pticks) * 0.5;
|
||||
float offsetPerPetal = 360 / petals;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.05F, -0.5F, 0F);
|
||||
GL11.glScalef(v, v, v);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(-0.05F, -0.5F, 0F);
|
||||
GlStateManager.scale(v, v, v);
|
||||
for(int i = 0; i < petals; i++) {
|
||||
float offset = offsetPerPetal * i;
|
||||
float deg = (int) (ticks / rotationModifier % 360F + offset);
|
||||
@@ -103,38 +103,38 @@ public class RenderTileAltar extends TileEntitySpecialRenderer {
|
||||
float z = (float) (radiusZ * Math.sin(rad));
|
||||
float y = (float) Math.cos((ticks + 50 * i) / 5F) / 10F;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(x, y, z);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(x, y, z);
|
||||
float xRotate = (float) Math.sin(ticks * rotationModifier) / 2F;
|
||||
float yRotate = (float) Math.max(0.6F, Math.sin(ticks * 0.1F) / 2F + 0.5F);
|
||||
float zRotate = (float) Math.cos(ticks * rotationModifier) / 2F;
|
||||
|
||||
v /= 2F;
|
||||
GL11.glTranslatef(v, v, v);
|
||||
GL11.glRotatef(deg, xRotate, yRotate, zRotate);
|
||||
GL11.glTranslatef(-v, -v, -v);
|
||||
GlStateManager.translate(v, v, v);
|
||||
GlStateManager.rotate(deg, xRotate, yRotate, zRotate);
|
||||
GlStateManager.translate(-v, -v, -v);
|
||||
v *= 2F;
|
||||
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
|
||||
ItemStack stack = altar.getStackInSlot(i);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
IIcon icon = stack.getItem().getIcon(stack, 0);
|
||||
if(icon != null) {
|
||||
Color color = new Color(stack.getItem().getColorFromItemStack(stack, 0));
|
||||
GL11.glColor3ub((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
|
||||
GlStateManager.color((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
|
||||
float f = icon.getMinU();
|
||||
float f1 = icon.getMaxU();
|
||||
float f2 = icon.getMinV();
|
||||
float f3 = icon.getMaxV();
|
||||
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F);
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,24 +143,24 @@ public class RenderTileAltar extends TileEntitySpecialRenderer {
|
||||
int brightness = lava ? 240 : -1;
|
||||
float alpha = lava ? 1F : 0.7F;
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.disableAlpha();
|
||||
if(lava)
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glColor4f(1F, 1F, 1F, alpha);
|
||||
GL11.glTranslatef(w, -0.3F, w);
|
||||
GL11.glRotatef(90F, 1F, 0F, 0F);
|
||||
GL11.glScalef(s, s, s);
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.color(1F, 1F, 1F, alpha);
|
||||
GlStateManager.translate(w, -0.3F, w);
|
||||
GlStateManager.rotate(90F, 1F, 0F, 0F);
|
||||
GlStateManager.scale(s, s, s);
|
||||
|
||||
renderIcon(0, 0, block.getIcon(0, 0), 16, 16, brightness);
|
||||
if(lava)
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.enableLighting();
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
forceMeta = -1;
|
||||
}
|
||||
|
||||
@@ -45,69 +45,69 @@ public class RenderTileAvatar extends TileEntitySpecialRenderer {
|
||||
public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float pticks, int digProgress) {
|
||||
TileAvatar avatar = (TileAvatar) tileentity;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glTranslated(d0, d1, d2);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.translate(d0, d1, d2);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||
int meta = avatar.getWorld() != null ? avatar.getBlockMetadata() : 0;
|
||||
|
||||
GL11.glTranslatef(0.5F, 1.6F, 0.5F);
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
GL11.glRotatef(ROTATIONS[Math.max(Math.min(ROTATIONS.length - 1, meta - 2), 0)], 0F, 1F, 0F);
|
||||
GlStateManager.translate(0.5F, 1.6F, 0.5F);
|
||||
GlStateManager.scale(1F, -1F, -1F);
|
||||
GlStateManager.rotate(ROTATIONS[Math.max(Math.min(ROTATIONS.length - 1, meta - 2), 0)], 0F, 1F, 0F);
|
||||
model.render();
|
||||
|
||||
ItemStack stack = avatar.getStackInSlot(0);
|
||||
if(stack != null) {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
float s = 0.4F;
|
||||
GL11.glScalef(s, s, s);
|
||||
GL11.glRotatef(90F, 0F, 1F, 0F);
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glTranslated(-1.2F, -3.5F, -0.65F);
|
||||
GL11.glRotatef(20F, 0F, 0F, 1F);
|
||||
GlStateManager.scale(s, s, s);
|
||||
GlStateManager.rotate(90F, 0F, 1F, 0F);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.translate(-1.2F, -3.5F, -0.65F);
|
||||
GlStateManager.rotate(20F, 0F, 0F, 1F);
|
||||
|
||||
int renderPass = 0;
|
||||
do {
|
||||
IIcon icon = stack.getItem().getIcon(stack, renderPass);
|
||||
if(icon != null) {
|
||||
Color color = new Color(stack.getItem().getColorFromItemStack(stack, renderPass));
|
||||
GL11.glColor3ub((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
|
||||
GlStateManager.color((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
|
||||
float f = icon.getMinU();
|
||||
float f1 = icon.getMaxU();
|
||||
float f2 = icon.getMinV();
|
||||
float f3 = icon.getMaxV();
|
||||
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F);
|
||||
}
|
||||
renderPass++;
|
||||
} while(renderPass < stack.getItem().getRenderPasses(stack.getItemDamage()));
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
IAvatarWieldable wieldable = (IAvatarWieldable) stack.getItem();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(wieldable.getOverlayResource(avatar, stack));
|
||||
s = 1.01F;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glScalef(s, s, s);
|
||||
GL11.glTranslatef(0F, -0.01F, 0F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.scale(s, s, s);
|
||||
GlStateManager.translate(0F, -0.01F, 0F);
|
||||
int light = 15728880;
|
||||
int lightmapX = light % 65536;
|
||||
int lightmapY = light / 65536;
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lightmapX, lightmapY);
|
||||
float alpha = (float) Math.sin(ClientTickHandler.ticksInGame / 20D) / 2F + 0.5F;
|
||||
GL11.glColor4f(1F, 1F, 1F, alpha + 0.183F);
|
||||
GlStateManager.color(1F, 1F, 1F, alpha + 0.183F);
|
||||
model.render();
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.color(1F, 1F, 1F);
|
||||
GlStateManager.scale(1F, -1F, -1F);
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -35,22 +35,22 @@ public class RenderTileBellows extends TileEntitySpecialRenderer {
|
||||
public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f, int digProgress) {
|
||||
TileBellows bellows = (TileBellows) tileentity;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glTranslated(d0, d1, d2);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.translate(d0, d1, d2);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||
int meta = bellows.getWorld() != null ? bellows.getBlockMetadata() : 0;
|
||||
|
||||
GL11.glTranslatef(0.5F, 1.5F, 0.5F);
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
GL11.glRotatef(ROTATIONS[Math.max(Math.min(ROTATIONS.length, meta - 2), 0)], 0F, 1F, 0F);
|
||||
GlStateManager.translate(0.5F, 1.5F, 0.5F);
|
||||
GlStateManager.scale(1F, -1F, -1F);
|
||||
GlStateManager.rotate(ROTATIONS[Math.max(Math.min(ROTATIONS.length, meta - 2), 0)], 0F, 1F, 0F);
|
||||
model.render(Math.max(0.1F, 1F - (bellows.movePos + bellows.moving * f + 0.1F)));
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.color(1F, 1F, 1F);
|
||||
GlStateManager.scale(1F, -1F, -1F);
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -43,22 +43,22 @@ public class RenderTileBrewery extends TileEntitySpecialRenderer {
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f, int digProgress) {
|
||||
brewery = (TileBrewery) tileentity;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glTranslated(d0, d1, d2);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.translate(d0, d1, d2);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
GL11.glTranslatef(0.5F, -1.5F, -0.5F);
|
||||
GlStateManager.scale(1F, -1F, -1F);
|
||||
GlStateManager.translate(0.5F, -1.5F, -0.5F);
|
||||
|
||||
double time = ClientTickHandler.ticksInGame + f;
|
||||
if(!rotate)
|
||||
time = -1;
|
||||
|
||||
model.render(this, time);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
public void renderItemStack(ItemStack stack) {
|
||||
@@ -67,38 +67,38 @@ public class RenderTileBrewery extends TileEntitySpecialRenderer {
|
||||
mc.renderEngine.bindTexture(stack.getItem() instanceof ItemBlock ? TextureMap.locationBlocksTexture : TextureMap.locationItemsTexture);
|
||||
|
||||
float s = 0.25F;
|
||||
GL11.glScalef(s, s, s);
|
||||
GL11.glScalef(2F, 2F, 2F);
|
||||
GlStateManager.scale(s, s, s);
|
||||
GlStateManager.scale(2F, 2F, 2F);
|
||||
if(!ForgeHooksClient.renderEntityItem(new EntityItem(brewery.getWorld(), brewery.xCoord, brewery.yCoord, brewery.zCoord, stack), stack, 0F, 0F, brewery.getWorld().rand, mc.renderEngine, RenderBlocks.getInstance(), 1)) {
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GlStateManager.scale(0.5F, 0.5F, 0.5F);
|
||||
if(stack.getItem() instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.getBlockFromItem(stack.getItem()).getRenderType())) {
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glTranslatef(1F, 1.1F, 0F);
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.scale(0.5F, 0.5F, 0.5F);
|
||||
GlStateManager.translate(1F, 1.1F, 0F);
|
||||
GlStateManager.pushMatrix();
|
||||
RenderBlocks.getInstance().renderBlockAsItem(Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 1F);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glTranslatef(-1F, -1.1F, 0F);
|
||||
GL11.glScalef(2F, 2F, 2F);
|
||||
GlStateManager.popMatrix();
|
||||
GlStateManager.translate(-1F, -1.1F, 0F);
|
||||
GlStateManager.scale(2F, 2F, 2F);
|
||||
} else {
|
||||
int renderPass = 0;
|
||||
do {
|
||||
IIcon icon = stack.getItem().getIcon(stack, renderPass);
|
||||
if(icon != null) {
|
||||
Color color = new Color(stack.getItem().getColorFromItemStack(stack, renderPass));
|
||||
GL11.glColor3ub((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
|
||||
GlStateManager.color((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
|
||||
float f = icon.getMinU();
|
||||
float f1 = icon.getMaxU();
|
||||
float f2 = icon.getMinV();
|
||||
float f3 = icon.getMaxV();
|
||||
|
||||
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F);
|
||||
}
|
||||
renderPass++;
|
||||
} while(renderPass < stack.getItem().getRenderPasses(stack.getItemDamage()));
|
||||
}
|
||||
}
|
||||
GL11.glScalef(1F / s, 1F / s, 1F / s);
|
||||
GlStateManager.scale(1F / s, 1F / s, 1F / s);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||
}
|
||||
|
||||
@@ -39,19 +39,19 @@ public class RenderTileCocoon extends TileEntitySpecialRenderer {
|
||||
rot = (float) Math.sin(v) * (float) Math.log(cocoon.timePassed + f);
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glTranslated(d0, d1, d2);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.translate(d0, d1, d2);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||
GL11.glRotatef(90F, 1F, 0F, 0F);
|
||||
GL11.glTranslatef(0.5F, -0.5F - 3F / 16F, -0.5F + 1F / 16F);
|
||||
GL11.glRotatef(rot, 0F, 1F, 0F);
|
||||
GlStateManager.rotate(90F, 1F, 0F, 0F);
|
||||
GlStateManager.translate(0.5F, -0.5F - 3F / 16F, -0.5F + 1F / 16F);
|
||||
GlStateManager.rotate(rot, 0F, 1F, 0F);
|
||||
model.render();
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.color(1F, 1F, 1F);
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
+27
-27
@@ -50,31 +50,31 @@ public class RenderTileCorporeaCrystalCube extends TileEntitySpecialRenderer {
|
||||
double worldTicks = tileentity.getWorld() == null ? 0 : time;
|
||||
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glTranslated(d0, d1, d2);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.translate(d0, d1, d2);
|
||||
mc.renderEngine.bindTexture(texture);
|
||||
GL11.glTranslatef(0.5F, 1.5F, 0.5F);
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
GlStateManager.translate(0.5F, 1.5F, 0.5F);
|
||||
GlStateManager.scale(1F, -1F, -1F);
|
||||
model.renderBase();
|
||||
GL11.glTranslatef(0F, (float) Math.sin(worldTicks / 20.0) * 0.05F, 0F);
|
||||
GlStateManager.translate(0F, (float) Math.sin(worldTicks / 20.0) * 0.05F, 0F);
|
||||
if(stack != null) {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
float s = stack.getItem() instanceof ItemBlock ? 0.7F : 0.5F;
|
||||
GL11.glTranslatef(0F, 0.8F, 0F);
|
||||
GL11.glScalef(s, s, s);
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GlStateManager.translate(0F, 0.8F, 0F);
|
||||
GlStateManager.scale(s, s, s);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
((Render) mc.getRenderManager().entityRenderMap.get(EntityItem.class)).doRender(entity, 0, 0, 0, 1F, f);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
mc.renderEngine.bindTexture(texture);
|
||||
}
|
||||
|
||||
GL11.glColor4f(1F, 1F, 1F, 0.4F);
|
||||
GlStateManager.color(1F, 1F, 1F, 0.4F);
|
||||
model.renderCube();
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F);
|
||||
|
||||
if(stack != null) {
|
||||
int count = cube.getItemCount();
|
||||
@@ -92,26 +92,26 @@ public class RenderTileCorporeaCrystalCube extends TileEntitySpecialRenderer {
|
||||
int colorShade = (color & 16579836) >> 2 | color & -16777216;
|
||||
|
||||
float s = 1F / 64F;
|
||||
GL11.glScalef(s, s, s);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GlStateManager.scale(s, s, s);
|
||||
GlStateManager.disableLighting();
|
||||
int l = mc.fontRendererObj.getStringWidth(countStr);
|
||||
|
||||
GL11.glTranslatef(0F, 55F, 0F);
|
||||
GlStateManager.translate(0F, 55F, 0F);
|
||||
float tr = -16.5F;
|
||||
for(int i = 0; i < 4; i++) {
|
||||
GL11.glRotatef(90F, 0F, 1F, 0F);
|
||||
GL11.glTranslatef(0F, 0F, tr);
|
||||
GlStateManager.rotate(90F, 0F, 1F, 0F);
|
||||
GlStateManager.translate(0F, 0F, tr);
|
||||
mc.fontRendererObj.drawString(countStr, -l / 2, 0, color);
|
||||
GL11.glTranslatef(0F, 0F, 0.1F);
|
||||
GlStateManager.translate(0F, 0F, 0.1F);
|
||||
mc.fontRendererObj.drawString(countStr, -l / 2 + 1, 1, colorShade);
|
||||
GL11.glTranslatef(0F, 0F, -tr - 0.1F);
|
||||
GlStateManager.translate(0F, 0F, -tr - 0.1F);
|
||||
}
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GlStateManager.enableLighting();
|
||||
}
|
||||
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.scale(1F, -1F, -1F);
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -32,16 +32,16 @@ public class RenderTileCorporeaIndex extends TileEntitySpecialRenderer {
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partticks, int digProgress) {
|
||||
TileCorporeaIndex index = (TileCorporeaIndex) tile;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5, y, z + 0.5);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(x + 0.5, y, z + 0.5);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||
|
||||
float translation = move ? (float) ((Math.cos((index.ticksWithCloseby + (index.hasCloseby ? partticks : 0)) / 10F) * 0.5 + 0.5) * 0.25) : 0F;
|
||||
float rotation = move ? index.ticks * 2 + partticks : 0F;
|
||||
float scale = 0.6F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GlStateManager.scale(scale, scale, scale);
|
||||
crystal.render(null, 0F, rotation, translation, 0F, 0F, 1F / 16F);
|
||||
GL11.glScalef(1F / scale, 1F / scale, 1F / scale);
|
||||
GlStateManager.scale(1F / scale, 1F / scale, 1F / scale);
|
||||
|
||||
if(index.closeby > 0F) {
|
||||
float starScale = 0.02F;
|
||||
@@ -52,22 +52,22 @@ public class RenderTileCorporeaIndex extends TileEntitySpecialRenderer {
|
||||
int color = 0xFF00FF;
|
||||
int seed = index.getPos().getX() ^ index.getPos().getY() ^ index.getPos().getZ();
|
||||
|
||||
GL11.glTranslated(starX, 0.3, starZ);
|
||||
GlStateManager.translate(starX, 0.3, starZ);
|
||||
RenderHelper.renderStar(color, starScale, starScale, starScale, seed);
|
||||
GL11.glTranslated(-starX * 2, 0, -starZ * 2);
|
||||
GlStateManager.translate(-starX * 2, 0, -starZ * 2);
|
||||
RenderHelper.renderStar(color, starScale, starScale, starScale, seed);
|
||||
GL11.glTranslated(starX, 0, starZ);
|
||||
GlStateManager.translate(starX, 0, starZ);
|
||||
|
||||
rads = -rads;
|
||||
starX = Math.cos(rads) * starRadius;
|
||||
starZ = Math.sin(rads) * starRadius;
|
||||
GL11.glTranslated(starX, 0, starZ);
|
||||
GlStateManager.translate(starX, 0, starZ);
|
||||
RenderHelper.renderStar(color, starScale, starScale, starScale, seed);
|
||||
GL11.glTranslated(-starX * 2, 0, -starZ * 2);
|
||||
GlStateManager.translate(-starX * 2, 0, -starZ * 2);
|
||||
RenderHelper.renderStar(color, starScale, starScale, starScale, seed);
|
||||
GL11.glTranslated(starX, 0, starZ);
|
||||
GlStateManager.translate(starX, 0, starZ);
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -51,33 +51,33 @@ public class RenderTileEnchanter extends TileEntitySpecialRenderer {
|
||||
item.age = ClientTickHandler.ticksInGame;
|
||||
item.setEntityItemStack(enchanter.itemToEnchant);
|
||||
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glTranslatef(0.5F, 1.25F, 0.5F);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.translate(0.5F, 1.25F, 0.5F);
|
||||
((Render) Minecraft.getMinecraft().getRenderManager().entityRenderMap.get(EntityItem.class)).doRender(item, d0, d1, d2, 1F, f);
|
||||
GL11.glTranslatef(-0.5F, -1.25F, -0.5F);
|
||||
GlStateManager.translate(-0.5F, -1.25F, -0.5F);
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(d0, d1, d2);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(d0, d1, d2);
|
||||
|
||||
GL11.glRotated(90F, 1F, 0F, 0F);
|
||||
GL11.glTranslatef(-2F, -2F, -0.001F);
|
||||
GlStateManager.rotate(90F, 1F, 0F, 0F);
|
||||
GlStateManager.translate(-2F, -2F, -0.001F);
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.disableAlpha();
|
||||
float alpha = (float) ((Math.sin((ClientTickHandler.ticksInGame + f) / 8D) + 1D) / 5D + 0.4D) * alphaMod;
|
||||
|
||||
if(alpha > 0) {
|
||||
if(ShaderHelper.useShaders())
|
||||
GL11.glColor4f(1F, 1F, 1F, alpha);
|
||||
GlStateManager.color(1F, 1F, 1F, alpha);
|
||||
else {
|
||||
int light = 15728880;
|
||||
int lightmapX = light % 65536;
|
||||
int lightmapY = light / 65536;
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lightmapX, lightmapY);
|
||||
GL11.glColor4f(0.6F + (float) ((Math.cos((ClientTickHandler.ticksInGame + f) / 6D) + 1D) / 5D), 0.1F, 0.9F, alpha);
|
||||
GlStateManager.color(0.6F + (float) ((Math.cos((ClientTickHandler.ticksInGame + f) / 6D) + 1D) / 5D), 0.1F, 0.9F, alpha);
|
||||
}
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
@@ -88,10 +88,10 @@ public class RenderTileEnchanter extends TileEntitySpecialRenderer {
|
||||
float yTranslation = Math.min(20, ticks) / 20F * 1.15F;
|
||||
float scale = ticks < 10 ? 1F : 1F - Math.min(20, ticks - 10) / 20F * 0.75F;
|
||||
|
||||
GL11.glTranslatef(2.5F, 2.5F, -yTranslation);
|
||||
GL11.glScalef(scale, scale, 1F);
|
||||
GL11.glRotatef(angle, 0F, 0F, 1F);
|
||||
GL11.glTranslatef(-2.5F, -2.5F, 0F);
|
||||
GlStateManager.translate(2.5F, 2.5F, -yTranslation);
|
||||
GlStateManager.scale(scale, scale, 1F);
|
||||
GlStateManager.rotate(angle, 0F, 0F, 1F);
|
||||
GlStateManager.translate(-2.5F, -2.5F, 0F);
|
||||
}
|
||||
|
||||
ShaderHelper.useShader(ShaderHelper.enchanterRune);
|
||||
@@ -99,10 +99,10 @@ public class RenderTileEnchanter extends TileEntitySpecialRenderer {
|
||||
ShaderHelper.releaseShader();
|
||||
}
|
||||
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
public void renderIcon(int par1, int par2, IIcon par3Icon, int par4, int par5, int brightness) {
|
||||
|
||||
@@ -33,29 +33,29 @@ public class RenderTileFloatingFlower extends TileEntitySpecialRenderer {
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double d0, double d1, double d2, float t, int digProgress) {
|
||||
IFloatingFlower flower = (IFloatingFlower) tile;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glTranslated(d0, d1, d2);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.translate(d0, d1, d2);
|
||||
|
||||
double worldTime = tile.getWorld() == null ? 0 : (double) (ClientTickHandler.ticksInGame + t);
|
||||
if(tile.getWorld() != null)
|
||||
worldTime += new Random(tile.getPos().hashCode()).nextInt(1000);
|
||||
|
||||
GL11.glTranslatef(0.5F, 0F, 0.5F);
|
||||
GL11.glRotatef(-((float) worldTime * 0.5F), 0F, 1F, 0F);
|
||||
GL11.glTranslatef(-0.5F, 0F, -0.5F);
|
||||
GlStateManager.translate(0.5F, 0F, 0.5F);
|
||||
GlStateManager.rotate(-((float) worldTime * 0.5F), 0F, 1F, 0F);
|
||||
GlStateManager.translate(-0.5F, 0F, -0.5F);
|
||||
|
||||
if(tile.getWorld() != null) {
|
||||
GL11.glTranslatef(0F, (float) Math.sin(worldTime * 0.05F) * 0.1F, 0F);
|
||||
GL11.glRotatef(4F * (float) Math.sin(worldTime * 0.04F), 1F, 0F, 0F);
|
||||
GlStateManager.translate(0F, (float) Math.sin(worldTime * 0.05F) * 0.1F, 0F);
|
||||
GlStateManager.rotate(4F * (float) Math.sin(worldTime * 0.04F), 1F, 0F, 0F);
|
||||
}
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(flower.getIslandType().getResource());
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.5F, 1.4F, 0.5F);
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(0.5F, 1.4F, 0.5F);
|
||||
GlStateManager.scale(1F, -1F, -1F);
|
||||
model.render();
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
ItemStack stack = flower.getDisplayStack();
|
||||
IIcon icon = stack.getIconIndex();
|
||||
@@ -65,11 +65,11 @@ public class RenderTileFloatingFlower extends TileEntitySpecialRenderer {
|
||||
float f1 = icon.getMaxU();
|
||||
float f2 = icon.getMinV();
|
||||
float f3 = icon.getMaxV();
|
||||
GL11.glTranslatef(0.25F, 0.4F, 0.5F);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GlStateManager.translate(0.25F, 0.4F, 0.5F);
|
||||
GlStateManager.scale(0.5F, 0.5F, 0.5F);
|
||||
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 32F);
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.color(1F, 1F, 1F);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -34,11 +34,11 @@ public class RenderTileHourglass extends TileEntitySpecialRenderer {
|
||||
public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float ticks, int digProgress) {
|
||||
TileHourglass hourglass = (TileHourglass) tileentity;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glTranslated(d0, d1, d2);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.translate(d0, d1, d2);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||
|
||||
int wtime = tileentity.getWorld() == null ? 0 : ClientTickHandler.ticksInGame;
|
||||
@@ -53,17 +53,17 @@ public class RenderTileHourglass extends TileEntitySpecialRenderer {
|
||||
|
||||
float fract1 = stack == null ? 0 : hourglass.timeFraction;
|
||||
float fract2 = stack == null ? 0 : 1F - hourglass.timeFraction;
|
||||
GL11.glTranslatef(x, y, z);
|
||||
GlStateManager.translate(x, y, z);
|
||||
|
||||
float rot = hourglass.flip ? 180F : 1F;
|
||||
if(hourglass.flipTicks > 0)
|
||||
rot += (hourglass.flipTicks - ticks) * (180F / 4F);
|
||||
GL11.glRotatef(rot, 0F, 0F, 1F);
|
||||
GlStateManager.rotate(rot, 0F, 0F, 1F);
|
||||
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
GlStateManager.scale(1F, -1F, -1F);
|
||||
model.render(fract1, fract2, hourglass.flip, hourglass.getColor());
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.scale(1F, -1F, -1F);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -43,48 +43,48 @@ public class RenderTileIncensePlate extends TileEntitySpecialRenderer {
|
||||
|
||||
int meta = plate.getWorld() != null ? plate.getBlockMetadata() : 0;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glTranslated(d0, d1, d2);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.translate(d0, d1, d2);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||
GL11.glTranslatef(0.5F, 1.5F, 0.5F);
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
GL11.glRotatef(ROTATIONS[Math.max(Math.min(ROTATIONS.length, meta - 2), 0)], 0F, 1F, 0F);
|
||||
GlStateManager.translate(0.5F, 1.5F, 0.5F);
|
||||
GlStateManager.scale(1F, -1F, -1F);
|
||||
GlStateManager.rotate(ROTATIONS[Math.max(Math.min(ROTATIONS.length, meta - 2), 0)], 0F, 1F, 0F);
|
||||
model.render();
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
GlStateManager.scale(1F, -1F, -1F);
|
||||
|
||||
ItemStack stack = plate.getStackInSlot(0);
|
||||
if(stack != null) {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
float s = 0.4F;
|
||||
GL11.glTranslatef(0.1F, -1.46F, 0F);
|
||||
GL11.glScalef(s, s, s);
|
||||
GL11.glRotatef(180F, 0F, 1F, 0F);
|
||||
GlStateManager.translate(0.1F, -1.46F, 0F);
|
||||
GlStateManager.scale(s, s, s);
|
||||
GlStateManager.rotate(180F, 0F, 1F, 0F);
|
||||
|
||||
int renderPass = 0;
|
||||
do {
|
||||
IIcon icon = stack.getItem().getIcon(stack, renderPass);
|
||||
if(icon != null) {
|
||||
Color color = new Color(stack.getItem().getColorFromItemStack(stack, renderPass));
|
||||
GL11.glColor3ub((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
|
||||
GlStateManager.color((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
|
||||
float f = icon.getMinU();
|
||||
float f1 = icon.getMaxU();
|
||||
float f2 = icon.getMinV();
|
||||
float f3 = icon.getMaxV();
|
||||
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 32F);
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F);
|
||||
}
|
||||
renderPass++;
|
||||
} while(renderPass < stack.getItem().getRenderPasses(stack.getItemDamage()));
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.color(1F, 1F, 1F);
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,6 +11,7 @@
|
||||
package vazkii.botania.client.render.tile;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
@@ -31,37 +32,37 @@ public class RenderTileLightRelay extends TileEntitySpecialRenderer {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
IIcon iicon = tile.getBlockMetadata() > 0 ? BlockLightRelay.worldIconRed : BlockLightRelay.worldIcon;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5, y + 0.3, z + 0.5);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0.05F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(x + 0.5, y + 0.3, z + 0.5);
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.alphaFunc(GL11.GL_GREATER, 0.05F);
|
||||
|
||||
double time = ClientTickHandler.ticksInGame + pticks;
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
|
||||
float scale = 0.75F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GlStateManager.scale(scale, scale, scale);
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
float r = 180.0F - mc.getRenderManager().playerViewY;
|
||||
GL11.glRotatef(r, 0F, 1F, 0F);
|
||||
GL11.glRotatef(-mc.getRenderManager().playerViewX, 1F, 0F, 0F);
|
||||
GlStateManager.rotate(r, 0F, 1F, 0F);
|
||||
GlStateManager.rotate(-mc.getRenderManager().playerViewX, 1F, 0F, 0F);
|
||||
|
||||
float off = 0.25F;
|
||||
GL11.glTranslatef(0F, off, 0F);
|
||||
GL11.glRotated(time, 0F, 0F, 1F);
|
||||
GL11.glTranslatef(0F, -off, 0F);
|
||||
GlStateManager.translate(0F, off, 0F);
|
||||
GlStateManager.rotate(time, 0F, 0F, 1F);
|
||||
GlStateManager.translate(0F, -off, 0F);
|
||||
|
||||
mc.renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
func_77026_a(tessellator, iicon);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.disableRescaleNormal();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
// todo 1.8 looks like vanilla copypasta, update it
|
||||
|
||||
@@ -49,27 +49,27 @@ public class RenderTilePool extends TileEntitySpecialRenderer {
|
||||
public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f, int digProgress) {
|
||||
TilePool pool = (TilePool) tileentity;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.enableRescaleNormal();
|
||||
float a = MultiblockRenderHandler.rendering ? 0.6F : 1F;
|
||||
GL11.glColor4f(1F, 1F, 1F, a);
|
||||
GL11.glTranslated(d0, d1, d2);
|
||||
GlStateManager.color(1F, 1F, 1F, a);
|
||||
GlStateManager.translate(d0, d1, d2);
|
||||
boolean inf = tileentity.getWorld() == null ? forceMeta == 1 : tileentity.getBlockMetadata() == 1;
|
||||
boolean dil = tileentity.getWorld() == null ? forceMeta == 2 : tileentity.getBlockMetadata() == 2;
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(inf ? textureInf : dil ? textureDil : texture);
|
||||
|
||||
GL11.glTranslatef(0.5F, 1.5F, 0.5F);
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
GlStateManager.translate(0.5F, 1.5F, 0.5F);
|
||||
GlStateManager.scale(1F, -1F, -1F);
|
||||
int color = pool.color;
|
||||
float[] acolor = EntitySheep.fleeceColorTable[color];
|
||||
GL11.glColor4f(acolor[0], acolor[1], acolor[2], a);
|
||||
GlStateManager.color(acolor[0], acolor[1], acolor[2], a);
|
||||
model.render();
|
||||
GL11.glColor4f(1F, 1F, 1F, a);
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GlStateManager.color(1F, 1F, 1F, a);
|
||||
GlStateManager.scale(1F, -1F, -1F);
|
||||
GlStateManager.enableRescaleNormal();
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
|
||||
@@ -93,44 +93,44 @@ public class RenderTilePool extends TileEntitySpecialRenderer {
|
||||
if(below instanceof IPoolOverlayProvider) {
|
||||
IIcon overlay = ((IPoolOverlayProvider) below).getIcon(pool.getWorld(), pool.xCoord, pool.yCoord - 1, pool.zCoord);
|
||||
if(overlay != null) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glColor4f(1F, 1F, 1F, a * (float) ((Math.sin((ClientTickHandler.ticksInGame + f) / 20.0) + 1) * 0.3 + 0.2));
|
||||
GL11.glTranslatef(-0.5F, -1F - 0.43F, -0.5F);
|
||||
GL11.glRotatef(90F, 1F, 0F, 0F);
|
||||
GL11.glScalef(s, s, s);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.disableAlpha();
|
||||
GlStateManager.color(1F, 1F, 1F, a * (float) ((Math.sin((ClientTickHandler.ticksInGame + f) / 20.0) + 1) * 0.3 + 0.2));
|
||||
GlStateManager.translate(-0.5F, -1F - 0.43F, -0.5F);
|
||||
GlStateManager.rotate(90F, 1F, 0F, 0F);
|
||||
GlStateManager.scale(s, s, s);
|
||||
|
||||
renderIcon(0, 0, overlay, 16, 16, 240);
|
||||
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(waterLevel > 0) {
|
||||
s = 1F / 256F * 14F;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glColor4f(1F, 1F, 1F, a);
|
||||
GL11.glTranslatef(w, -1F - (0.43F - waterLevel), w);
|
||||
GL11.glRotatef(90F, 1F, 0F, 0F);
|
||||
GL11.glScalef(s, s, s);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.disableAlpha();
|
||||
GlStateManager.color(1F, 1F, 1F, a);
|
||||
GlStateManager.translate(w, -1F - (0.43F - waterLevel), w);
|
||||
GlStateManager.rotate(90F, 1F, 0F, 0F);
|
||||
GlStateManager.scale(s, s, s);
|
||||
|
||||
ShaderHelper.useShader(ShaderHelper.manaPool);
|
||||
renderIcon(0, 0, BlockPool.manaIcon, 16, 16, 240);
|
||||
ShaderHelper.releaseShader();
|
||||
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
forceMeta = 0;
|
||||
forceMana = false;
|
||||
|
||||
@@ -28,8 +28,8 @@ public class RenderTilePrism extends TileEntitySpecialRenderer {
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float partTicks, int digProgress) {
|
||||
TilePrism prism = (TilePrism) tile;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x, y, z);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(x, y, z);
|
||||
float pos = (float) Math.sin((ClientTickHandler.ticksInGame + partTicks) * 0.05F) * 0.5F * (1F - 1F / 16F) - 0.5F;
|
||||
|
||||
ItemStack stack = prism.getStackInSlot(0);
|
||||
@@ -38,14 +38,14 @@ public class RenderTilePrism extends TileEntitySpecialRenderer {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
if(stack.getItem() instanceof ILens) {
|
||||
ILens lens = (ILens) stack.getItem();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(90F, 1F, 0F, 0F);
|
||||
GL11.glTranslatef(0F, 0F, pos);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.rotate(90F, 1F, 0F, 0F);
|
||||
GlStateManager.translate(0F, 0F, pos);
|
||||
RenderLens.render(stack, lens.getLensColor(stack));
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -35,22 +35,22 @@ public class RenderTilePump extends TileEntitySpecialRenderer {
|
||||
public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f, int digProgress) {
|
||||
TilePump pump = (TilePump) tileentity;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glTranslated(d0, d1, d2);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.translate(d0, d1, d2);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||
int meta = pump.getWorld() != null ? pump.getBlockMetadata() : 0;
|
||||
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
GL11.glRotatef(ROTATIONS[Math.max(Math.min(ROTATIONS.length - 1, meta - 2), 0)], 0F, 1F, 0F);
|
||||
GlStateManager.translate(0.5F, 0.5F, 0.5F);
|
||||
GlStateManager.scale(1F, -1F, -1F);
|
||||
GlStateManager.rotate(ROTATIONS[Math.max(Math.min(ROTATIONS.length - 1, meta - 2), 0)], 0F, 1F, 0F);
|
||||
model.render(Math.max(0F, Math.min(8F, pump.innerRingPos + pump.moving * f)));
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.color(1F, 1F, 1F);
|
||||
GlStateManager.scale(1F, -1F, -1F);
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -50,12 +50,12 @@ public class RenderTilePylon extends TileEntitySpecialRenderer {
|
||||
if(model == null)
|
||||
model = ConfigHandler.oldPylonModel ? new ModelPylonOld() : new ModelPylon();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
float a = MultiblockRenderHandler.rendering ? 0.6F : 1F;
|
||||
GL11.glColor4f(1F, 1F, 1F, a);
|
||||
GlStateManager.color(1F, 1F, 1F, a);
|
||||
if(tileentity.getWorld() != null) {
|
||||
green = tileentity.getBlockMetadata() == 1;
|
||||
pink = tileentity.getBlockMetadata() == 2;
|
||||
@@ -71,69 +71,69 @@ public class RenderTilePylon extends TileEntitySpecialRenderer {
|
||||
worldTime += new Random(tileentity.getPos().hashCode()).nextInt(360);
|
||||
|
||||
if(ConfigHandler.oldPylonModel) {
|
||||
GL11.glTranslated(d0 + 0.5, d1 + 2.2, d2 + 0.5);
|
||||
GL11.glScalef(1F, -1.5F, -1F);
|
||||
GlStateManager.translate(d0 + 0.5, d1 + 2.2, d2 + 0.5);
|
||||
GlStateManager.scale(1F, -1.5F, -1F);
|
||||
} else {
|
||||
GL11.glTranslated(d0 + 0.2 + (green ? -0.1 : 0), d1 + 0.05, d2 + 0.8 + (green ? 0.1 : 0));
|
||||
GlStateManager.translate(d0 + 0.2 + (green ? -0.1 : 0), d1 + 0.05, d2 + 0.8 + (green ? 0.1 : 0));
|
||||
float scale = green ? 0.8F : 0.6F;
|
||||
GL11.glScalef(scale, 0.6F, scale);
|
||||
GlStateManager.scale(scale, 0.6F, scale);
|
||||
}
|
||||
|
||||
if(!green) {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
if(!ConfigHandler.oldPylonModel)
|
||||
GL11.glTranslatef(0.5F, 0F, -0.5F);
|
||||
GL11.glRotatef((float) worldTime * 1.5F, 0F, 1F, 0F);
|
||||
GlStateManager.translate(0.5F, 0F, -0.5F);
|
||||
GlStateManager.rotate((float) worldTime * 1.5F, 0F, 1F, 0F);
|
||||
if(!ConfigHandler.oldPylonModel)
|
||||
GL11.glTranslatef(-0.5F, 0F, 0.5F);
|
||||
GlStateManager.translate(-0.5F, 0F, 0.5F);
|
||||
|
||||
model.renderRing();
|
||||
GL11.glTranslated(0D, Math.sin(worldTime / 20D) / 20 - 0.025, 0D);
|
||||
GlStateManager.translate(0D, Math.sin(worldTime / 20D) / 20 - 0.025, 0D);
|
||||
model.renderGems();
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(0D, Math.sin(worldTime / 20D) / 17.5, 0D);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(0D, Math.sin(worldTime / 20D) / 17.5, 0D);
|
||||
|
||||
if(!ConfigHandler.oldPylonModel)
|
||||
GL11.glTranslatef(0.5F, 0F, -0.5F);
|
||||
GlStateManager.translate(0.5F, 0F, -0.5F);
|
||||
|
||||
GL11.glRotatef((float) -worldTime, 0F, 1F, 0F);
|
||||
GlStateManager.rotate((float) -worldTime, 0F, 1F, 0F);
|
||||
if(!ConfigHandler.oldPylonModel)
|
||||
GL11.glTranslatef(-0.5F, 0F, 0.5F);
|
||||
GlStateManager.translate(-0.5F, 0F, 0.5F);
|
||||
|
||||
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GlStateManager.disableCull();
|
||||
model.renderCrystal();
|
||||
|
||||
GL11.glColor4f(1F, 1F, 1F, a);
|
||||
GlStateManager.color(1F, 1F, 1F, a);
|
||||
if(!ShaderHelper.useShaders()) {
|
||||
int light = 15728880;
|
||||
int lightmapX = light % 65536;
|
||||
int lightmapY = light / 65536;
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lightmapX, lightmapY);
|
||||
float alpha = (float) ((Math.sin(worldTime / 20D) / 2D + 0.5) / (ConfigHandler.oldPylonModel ? 1D : 2D));
|
||||
GL11.glColor4f(1F, 1F, 1F, a * (alpha + 0.183F));
|
||||
GlStateManager.color(1F, 1F, 1F, a * (alpha + 0.183F));
|
||||
}
|
||||
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glScalef(1.1F, 1.1F, 1.1F);
|
||||
GlStateManager.disableAlpha();
|
||||
GlStateManager.scale(1.1F, 1.1F, 1.1F);
|
||||
if(!ConfigHandler.oldPylonModel)
|
||||
GL11.glTranslatef(-0.05F, -0.1F, 0.05F);
|
||||
else GL11.glTranslatef(0F, -0.09F, 0F);
|
||||
GlStateManager.translate(-0.05F, -0.1F, 0.05F);
|
||||
else GlStateManager.translate(0F, -0.09F, 0F);
|
||||
|
||||
ShaderHelper.useShader(ShaderHelper.pylonGlow);
|
||||
model.renderCrystal();
|
||||
ShaderHelper.releaseShader();
|
||||
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.enableCull();
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -40,9 +40,9 @@ public class RenderTileRuneAltar extends TileEntitySpecialRenderer {
|
||||
public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float partticks, int digProgress) {
|
||||
TileRuneAltar altar = (TileRuneAltar) tileentity;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glTranslated(x, y, z);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.translate(x, y, z);
|
||||
|
||||
int items = 0;
|
||||
for(int i = 0; i < altar.getSizeInventory(); i++)
|
||||
@@ -59,67 +59,67 @@ public class RenderTileRuneAltar extends TileEntitySpecialRenderer {
|
||||
double time = ClientTickHandler.ticksInGame + partticks;
|
||||
|
||||
for(int i = 0; i < altar.getSizeInventory(); i++) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glTranslatef(1F, 2.5F, 1F);
|
||||
GL11.glRotatef(angles[i] + (float) time, 0F, 1F, 0F);
|
||||
GL11.glTranslatef(2.25F, 0F, 0.5F);
|
||||
GL11.glRotatef(90F, 0F, 1F, 0F);
|
||||
GL11.glTranslated(0D, 0.15 * Math.sin((time + i * 10) / 5D), 0F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.scale(0.5F, 0.5F, 0.5F);
|
||||
GlStateManager.translate(1F, 2.5F, 1F);
|
||||
GlStateManager.rotate(angles[i] + (float) time, 0F, 1F, 0F);
|
||||
GlStateManager.translate(2.25F, 0F, 0.5F);
|
||||
GlStateManager.rotate(90F, 0F, 1F, 0F);
|
||||
GlStateManager.translate(0D, 0.15 * Math.sin((time + i * 10) / 5D), 0F);
|
||||
ItemStack stack = altar.getStackInSlot(i);
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
if(stack != null) {
|
||||
mc.renderEngine.bindTexture(stack.getItem() instanceof ItemBlock ? TextureMap.locationBlocksTexture : TextureMap.locationItemsTexture);
|
||||
|
||||
GL11.glScalef(2F, 2F, 2F);
|
||||
GlStateManager.scale(2F, 2F, 2F);
|
||||
if(!ForgeHooksClient.renderEntityItem(new EntityItem(altar.getWorld(), altar.xCoord, altar.yCoord, altar.zCoord, stack), stack, 0F, 0F, altar.getWorld().rand, mc.renderEngine, renderBlocks, 1)) {
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GlStateManager.scale(0.5F, 0.5F, 0.5F);
|
||||
if(stack.getItem() instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.getBlockFromItem(stack.getItem()).getRenderType())) {
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glTranslatef(1F, 1.1F, 0F);
|
||||
GlStateManager.scale(0.5F, 0.5F, 0.5F);
|
||||
GlStateManager.translate(1F, 1.1F, 0F);
|
||||
renderBlocks.renderBlockAsItem(Block.getBlockFromItem(stack.getItem()), stack.getItemDamage(), 1F);
|
||||
GL11.glTranslatef(-1F, -1.1F, 0F);
|
||||
GL11.glScalef(2F, 2F, 2F);
|
||||
GlStateManager.translate(-1F, -1.1F, 0F);
|
||||
GlStateManager.scale(2F, 2F, 2F);
|
||||
} else {
|
||||
int renderPass = 0;
|
||||
do {
|
||||
IIcon icon = stack.getItem().getIcon(stack, renderPass);
|
||||
if(icon != null) {
|
||||
Color color = new Color(stack.getItem().getColorFromItemStack(stack, renderPass));
|
||||
GL11.glColor3ub((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
|
||||
GlStateManager.color((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
|
||||
float f = icon.getMinU();
|
||||
float f1 = icon.getMaxU();
|
||||
float f2 = icon.getMinV();
|
||||
float f3 = icon.getMaxV();
|
||||
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F);
|
||||
}
|
||||
renderPass++;
|
||||
} while(renderPass < stack.getItem().getRenderPasses(stack.getItemDamage()));
|
||||
}
|
||||
}
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.5F, 1.8F, 0.5F);
|
||||
GL11.glRotatef(180F, 1F, 0F, 1F);
|
||||
GlStateManager.disableAlpha();
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(0.5F, 1.8F, 0.5F);
|
||||
GlStateManager.rotate(180F, 1F, 0F, 1F);
|
||||
int repeat = 15;
|
||||
cubes.renderSpinningCubes(2, repeat, repeat);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
GL11.glTranslatef(0F, 0.2F, 0F);
|
||||
GlStateManager.translate(0F, 0.2F, 0F);
|
||||
float scale = altar.getTargetMana() == 0 ? 0 : (float) altar.getCurrentMana() / (float) altar.getTargetMana() / 75F;
|
||||
|
||||
if(scale != 0) {
|
||||
int seed = altar.getPos().getX() ^ altar.getPos().getY() ^ altar.getPos().getZ();
|
||||
GL11.glTranslatef(0.5F, 0.7F, 0.5F);
|
||||
GlStateManager.translate(0.5F, 0.7F, 0.5F);
|
||||
RenderHelper.renderStar(0x00E4D7, scale, scale, scale, seed);
|
||||
}
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GlStateManager.enableAlpha();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
@@ -53,31 +53,31 @@ public class RenderTileSkullOverride extends TileEntitySkullRenderer {
|
||||
}
|
||||
}
|
||||
bindTexture(resourcelocation);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.disableCull();
|
||||
if (par4 != 1) {
|
||||
switch (par4) {
|
||||
case 2:
|
||||
GL11.glTranslatef(par1 + 0.5F, par2 + 0.25F, par3 + 0.74F);
|
||||
GlStateManager.translate(par1 + 0.5F, par2 + 0.25F, par3 + 0.74F);
|
||||
break;
|
||||
case 3:
|
||||
GL11.glTranslatef(par1 + 0.5F, par2 + 0.25F, par3 + 0.26F);
|
||||
GlStateManager.translate(par1 + 0.5F, par2 + 0.25F, par3 + 0.26F);
|
||||
par5 = 180.0F;
|
||||
break;
|
||||
case 4:
|
||||
GL11.glTranslatef(par1 + 0.74F, par2 + 0.25F, par3 + 0.5F);
|
||||
GlStateManager.translate(par1 + 0.74F, par2 + 0.25F, par3 + 0.5F);
|
||||
par5 = 270.0F;
|
||||
break;
|
||||
case 5:
|
||||
default:
|
||||
GL11.glTranslatef(par1 + 0.26F, par2 + 0.25F, par3 + 0.5F);
|
||||
GlStateManager.translate(par1 + 0.26F, par2 + 0.25F, par3 + 0.5F);
|
||||
par5 = 90.0F;
|
||||
}
|
||||
} else GL11.glTranslatef(par1 + 0.5F, par2, par3 + 0.5F);
|
||||
} else GlStateManager.translate(par1 + 0.5F, par2, par3 + 0.5F);
|
||||
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glScalef(-1.0F, -1.0F, 1.0F);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.scale(-1.0F, -1.0F, 1.0F);
|
||||
GlStateManager.enableAlpha();
|
||||
if(gaia)
|
||||
ShaderHelper.useShader(ShaderHelper.doppleganger, RenderDoppleganger.defaultCallback);
|
||||
|
||||
@@ -85,7 +85,7 @@ public class RenderTileSkullOverride extends TileEntitySkullRenderer {
|
||||
|
||||
if(gaia)
|
||||
ShaderHelper.releaseShader();
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
} else super.func_152674_a(par1, par2, par3, par4, par5, par6, gameProfile);
|
||||
}
|
||||
}
|
||||
@@ -28,38 +28,38 @@ public class RenderTileSparkChanger extends TileEntitySpecialRenderer {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float pticks, int digProgress) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(d0, d1, d2);
|
||||
GL11.glRotated(90F, 1F, 0F, 0F);
|
||||
GL11.glTranslatef(0.8F, 0.2F, -0.22F);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(d0, d1, d2);
|
||||
GlStateManager.rotate(90F, 1F, 0F, 0F);
|
||||
GlStateManager.translate(0.8F, 0.2F, -0.22F);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
ItemStack stack = ((TileSparkChanger) tileentity).getStackInSlot(0);
|
||||
if(stack != null) {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
float s = 0.6F;
|
||||
GL11.glScalef(s, s, s);
|
||||
GL11.glRotatef(180F, 0F, 1F, 0F);
|
||||
GlStateManager.scale(s, s, s);
|
||||
GlStateManager.rotate(180F, 0F, 1F, 0F);
|
||||
|
||||
int renderPass = 0;
|
||||
do {
|
||||
IIcon icon = stack.getItem().getIcon(stack, renderPass);
|
||||
if(icon != null) {
|
||||
Color color = new Color(stack.getItem().getColorFromItemStack(stack, renderPass));
|
||||
GL11.glColor3ub((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
|
||||
GlStateManager.color((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
|
||||
float f = icon.getMinU();
|
||||
float f1 = icon.getMaxU();
|
||||
float f2 = icon.getMinV();
|
||||
float f3 = icon.getMaxV();
|
||||
ItemRenderer.renderItemIn2D(Tessellator.getInstance(), f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F);
|
||||
}
|
||||
renderPass++;
|
||||
} while(renderPass < stack.getItem().getRenderPasses(stack.getItemDamage()));
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -28,20 +28,20 @@ public class RenderTileSpawnerClaw extends TileEntitySpecialRenderer {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity var1, double d0, double d1, double d2, float var8, int digProgress) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glTranslated(d0, d1, d2);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.translate(d0, d1, d2);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||
|
||||
GL11.glTranslatef(0.5F, 1.5F, 0.5F);
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
GlStateManager.translate(0.5F, 1.5F, 0.5F);
|
||||
GlStateManager.scale(1F, -1F, -1F);
|
||||
|
||||
model.render();
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.color(1F, 1F, 1F);
|
||||
GlStateManager.scale(1F, -1F, -1F);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -49,50 +49,50 @@ public class RenderTileSpreader extends TileEntitySpecialRenderer {
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float ticks, int digProgress) {
|
||||
TileSpreader spreader = (TileSpreader) tileentity;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glTranslated(d0, d1, d2);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.translate(d0, d1, d2);
|
||||
|
||||
GL11.glTranslatef(0.5F, 1.5F, 0.5F);
|
||||
GL11.glRotatef(spreader.rotationX + 90F, 0F, 1F, 0F);
|
||||
GL11.glTranslatef(0F, -1F, 0F);
|
||||
GL11.glRotatef(spreader.rotationY, 1F, 0F, 0F);
|
||||
GL11.glTranslatef(0F, 1F, 0F);
|
||||
GlStateManager.translate(0.5F, 1.5F, 0.5F);
|
||||
GlStateManager.rotate(spreader.rotationX + 90F, 0F, 1F, 0F);
|
||||
GlStateManager.translate(0F, -1F, 0F);
|
||||
GlStateManager.rotate(spreader.rotationY, 1F, 0F, 0F);
|
||||
GlStateManager.translate(0F, 1F, 0F);
|
||||
|
||||
ResourceLocation r = spreader.isRedstone() ? textureRs : spreader.isDreamwood() ? textureDw : texture;
|
||||
if(ClientProxy.dootDoot)
|
||||
r = spreader.isRedstone() ? textureRsHalloween : spreader.isDreamwood() ? textureDwHalloween : textureHalloween;
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(r);
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
GlStateManager.scale(1F, -1F, -1F);
|
||||
|
||||
double time = ClientTickHandler.ticksInGame + ticks;
|
||||
|
||||
if(spreader.isULTRA_SPREADER()) {
|
||||
Color color = Color.getHSBColor((float) ((time * 5 + new Random(spreader.getPos().hashCode()).nextInt(10000)) % 360) / 360F, 0.4F, 0.9F);
|
||||
GL11.glColor3f(color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F);
|
||||
GlStateManager.color(color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F);
|
||||
}
|
||||
model.render();
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
GlStateManager.color(1F, 1F, 1F);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
double worldTicks = tileentity.getWorld() == null ? 0 : time;
|
||||
GL11.glRotatef((float) worldTicks % 360, 0F, 1F, 0F);
|
||||
GL11.glTranslatef(0F, (float) Math.sin(worldTicks / 20.0) * 0.05F, 0F);
|
||||
GlStateManager.rotate((float) worldTicks % 360, 0F, 1F, 0F);
|
||||
GlStateManager.translate(0F, (float) Math.sin(worldTicks / 20.0) * 0.05F, 0F);
|
||||
model.renderCube();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
GlStateManager.popMatrix();
|
||||
GlStateManager.scale(1F, -1F, -1F);
|
||||
ItemStack stack = spreader.getStackInSlot(0);
|
||||
|
||||
if(stack != null) {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
ILens lens = (ILens) stack.getItem();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.4F, -1.4F, -0.4375F);
|
||||
GL11.glScalef(0.8F, 0.8F, 0.8F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(-0.4F, -1.4F, -0.4375F);
|
||||
GlStateManager.scale(0.8F, 0.8F, 0.8F);
|
||||
RenderLens.render(stack, lens.getLensColor(stack));
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
if(spreader.paddingColor != -1) {
|
||||
@@ -102,28 +102,28 @@ public class RenderTileSpreader extends TileEntitySpecialRenderer {
|
||||
int color = spreader.paddingColor;
|
||||
RenderBlocks render = RenderBlocks.getInstance();
|
||||
float f = 1F / 16F;
|
||||
GL11.glTranslatef(0F, -f, 0F);
|
||||
GlStateManager.translate(0F, -f, 0F);
|
||||
render.renderBlockAsItem(block, color, 1F);
|
||||
GL11.glTranslatef(0F, -f * 15, 0F);
|
||||
GlStateManager.translate(0F, -f * 15, 0F);
|
||||
render.renderBlockAsItem(block, color, 1F);
|
||||
GL11.glRotatef(90F, 1F, 0F, 0F);
|
||||
GL11.glRotatef(90F, 0F, 1F, 0F);
|
||||
GlStateManager.rotate(90F, 1F, 0F, 0F);
|
||||
GlStateManager.rotate(90F, 0F, 1F, 0F);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(f * 14F, 1F, 1F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.scale(f * 14F, 1F, 1F);
|
||||
render.renderBlockAsItem(block, color, 1F);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
GL11.glRotatef(90F, 1F, 0F, 0F);
|
||||
GL11.glTranslatef(0F, 0F, -f / 2);
|
||||
GL11.glScalef(f * 14F, 1F, f * 15F);
|
||||
GlStateManager.rotate(90F, 1F, 0F, 0F);
|
||||
GlStateManager.translate(0F, 0F, -f / 2);
|
||||
GlStateManager.scale(f * 14F, 1F, f * 15F);
|
||||
render.renderBlockAsItem(block, color, 1F);
|
||||
GL11.glTranslatef(0F, f * 15F, 0F);
|
||||
GlStateManager.translate(0F, f * 15F, 0F);
|
||||
render.renderBlockAsItem(block, color, 1F);
|
||||
}
|
||||
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -15,11 +15,10 @@ import java.nio.FloatBuffer;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.ActiveRenderInfo;
|
||||
import net.minecraft.client.renderer.GLAllocation;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.*;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityEndPortal;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -35,91 +34,105 @@ public class RenderTileStarfield extends TileEntitySpecialRenderer {
|
||||
private static final ResourceLocation field_147526_d = new ResourceLocation("textures/entity/end_portal.png");
|
||||
private static final Random field_147527_e = new Random(31100L);
|
||||
FloatBuffer field_147528_b = GLAllocation.createDirectFloatBuffer(16);
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity p_147500_1_, double p_147500_2_, double p_147500_4_, double p_147500_6_, float p_147500_8_, int digProgress) {
|
||||
float f1 = (float)field_147501_a.field_147560_j;
|
||||
float f2 = (float)field_147501_a.field_147561_k;
|
||||
float f3 = (float)field_147501_a.field_147558_l;
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
field_147527_e.setSeed(31100L);
|
||||
float f4 = 0.24F;
|
||||
|
||||
for(int i = 0; i < 16; ++i) {
|
||||
GL11.glPushMatrix();
|
||||
float f5 = 16 - i;
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity p_180544_1_, double p_180544_2_, double p_180544_4_, double p_180544_6_, float p_180544_8_, int p_180544_9_) {
|
||||
float f1 = (float)this.rendererDispatcher.entityX;
|
||||
float f2 = (float)this.rendererDispatcher.entityY;
|
||||
float f3 = (float)this.rendererDispatcher.entityZ;
|
||||
GlStateManager.disableLighting();
|
||||
field_147527_e.setSeed(31100L);
|
||||
float f4 = 0.75F;
|
||||
|
||||
for (int j = 0; j < 16; ++j)
|
||||
{
|
||||
GlStateManager.pushMatrix();
|
||||
float f5 = (float)(16 - j);
|
||||
float f6 = 0.0625F;
|
||||
float f7 = 1.0F / (f5 + 1.0F);
|
||||
|
||||
if(i == 0) {
|
||||
bindTexture(field_147529_c);
|
||||
if (j == 0)
|
||||
{
|
||||
this.bindTexture(field_147529_c);
|
||||
f7 = 0.1F;
|
||||
f5 = 65.0F;
|
||||
f6 = 0.125F;
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(770, 771);
|
||||
}
|
||||
|
||||
if(i == 1) {
|
||||
bindTexture(field_147526_d);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_ONE, GL11.GL_ONE);
|
||||
if (j >= 1)
|
||||
{
|
||||
this.bindTexture(field_147526_d);
|
||||
}
|
||||
|
||||
if (j == 1)
|
||||
{
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(1, 1);
|
||||
f6 = 0.5F;
|
||||
}
|
||||
|
||||
float f8 = (float)-(p_147500_4_ + f4);
|
||||
float f9 = f8 + ActiveRenderInfo.objectY;
|
||||
float f10 = f8 + f5 + ActiveRenderInfo.objectY;
|
||||
float f8 = (float)(-(p_180544_4_ + (double)f4));
|
||||
float f9 = f8 + (float)ActiveRenderInfo.getPosition().yCoord;
|
||||
float f10 = f8 + f5 + (float)ActiveRenderInfo.getPosition().yCoord;
|
||||
float f11 = f9 / f10;
|
||||
f11 += (float)(p_147500_4_ + f4);
|
||||
GL11.glTranslatef(f1, f11, f3);
|
||||
GL11.glTexGeni(GL11.GL_S, GL11.GL_TEXTURE_GEN_MODE, GL11.GL_OBJECT_LINEAR);
|
||||
GL11.glTexGeni(GL11.GL_T, GL11.GL_TEXTURE_GEN_MODE, GL11.GL_OBJECT_LINEAR);
|
||||
GL11.glTexGeni(GL11.GL_R, GL11.GL_TEXTURE_GEN_MODE, GL11.GL_OBJECT_LINEAR);
|
||||
GL11.glTexGeni(GL11.GL_Q, GL11.GL_TEXTURE_GEN_MODE, GL11.GL_EYE_LINEAR);
|
||||
GL11.glTexGen(GL11.GL_S, GL11.GL_OBJECT_PLANE, func_147525_a(1.0F, 0.0F, 0.0F, 0.0F));
|
||||
GL11.glTexGen(GL11.GL_T, GL11.GL_OBJECT_PLANE, func_147525_a(0.0F, 0.0F, 1.0F, 0.0F));
|
||||
GL11.glTexGen(GL11.GL_R, GL11.GL_OBJECT_PLANE, func_147525_a(0.0F, 0.0F, 0.0F, 1.0F));
|
||||
GL11.glTexGen(GL11.GL_Q, GL11.GL_EYE_PLANE, func_147525_a(0.0F, 1.0F, 0.0F, 0.0F));
|
||||
GL11.glEnable(GL11.GL_TEXTURE_GEN_S);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_GEN_T);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_GEN_R);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_GEN_Q);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glMatrixMode(GL11.GL_TEXTURE);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glLoadIdentity();
|
||||
GL11.glTranslatef(0.0F, Minecraft.getSystemTime() % 20000L / 20000.0F, 0.0F);
|
||||
GL11.glScalef(f6, f6, f6);
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.0F);
|
||||
GL11.glRotatef((i * i * 4321 + i * 9) * 2.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-0.5F, -0.5F, 0.0F);
|
||||
GL11.glTranslatef(-f1, -f3, -f2);
|
||||
f9 = f8 + ActiveRenderInfo.objectY;
|
||||
GL11.glTranslatef(ActiveRenderInfo.objectX * f5 / f9, ActiveRenderInfo.objectZ * f5 / f9, -f2);
|
||||
f11 += (float)(p_180544_4_ + (double)f4);
|
||||
GlStateManager.translate(f1, f11, f3);
|
||||
GlStateManager.texGen(GlStateManager.TexGen.S, 9217);
|
||||
GlStateManager.texGen(GlStateManager.TexGen.T, 9217);
|
||||
GlStateManager.texGen(GlStateManager.TexGen.R, 9217);
|
||||
GlStateManager.texGen(GlStateManager.TexGen.Q, 9216);
|
||||
GlStateManager.func_179105_a(GlStateManager.TexGen.S, 9473, this.func_147525_a(1.0F, 0.0F, 0.0F, 0.0F));
|
||||
GlStateManager.func_179105_a(GlStateManager.TexGen.T, 9473, this.func_147525_a(0.0F, 0.0F, 1.0F, 0.0F));
|
||||
GlStateManager.func_179105_a(GlStateManager.TexGen.R, 9473, this.func_147525_a(0.0F, 0.0F, 0.0F, 1.0F));
|
||||
GlStateManager.func_179105_a(GlStateManager.TexGen.Q, 9474, this.func_147525_a(0.0F, 1.0F, 0.0F, 0.0F));
|
||||
GlStateManager.enableTexGenCoord(GlStateManager.TexGen.S);
|
||||
GlStateManager.enableTexGenCoord(GlStateManager.TexGen.T);
|
||||
GlStateManager.enableTexGenCoord(GlStateManager.TexGen.R);
|
||||
GlStateManager.enableTexGenCoord(GlStateManager.TexGen.Q);
|
||||
GlStateManager.popMatrix();
|
||||
GlStateManager.matrixMode(5890);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.loadIdentity();
|
||||
GlStateManager.translate(0.0F, (float)(Minecraft.getSystemTime() % 700000L) / 700000.0F, 0.0F);
|
||||
GlStateManager.scale(f6, f6, f6);
|
||||
GlStateManager.translate(0.5F, 0.5F, 0.0F);
|
||||
GlStateManager.rotate((float)(j * j * 4321 + j * 9) * 2.0F, 0.0F, 0.0F, 1.0F);
|
||||
GlStateManager.translate(-0.5F, -0.5F, 0.0F);
|
||||
GlStateManager.translate(-f1, -f3, -f2);
|
||||
f9 = f8 + (float)ActiveRenderInfo.getPosition().yCoord;
|
||||
GlStateManager.translate((float)ActiveRenderInfo.getPosition().xCoord * f5 / f9, (float)ActiveRenderInfo.getPosition().zCoord * f5 / f9, -f2);
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
tessellator.getWorldRenderer().startDrawingQuads();
|
||||
WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
||||
worldrenderer.startDrawingQuads();
|
||||
float f12 = field_147527_e.nextFloat() * 0.5F + 0.1F;
|
||||
float f13 = field_147527_e.nextFloat() * 0.5F + 0.4F;
|
||||
float f14 = field_147527_e.nextFloat() * 0.5F + 0.5F;
|
||||
|
||||
Color color = Color.getHSBColor(Minecraft.getSystemTime() / 20F % 360 / 360F, 1F, 1F);
|
||||
f11 = color.getRed() / 255F;
|
||||
float f12 = color.getGreen() / 255F;
|
||||
float f13 = color.getBlue() / 255F;
|
||||
if (j == 0)
|
||||
{
|
||||
f14 = 1.0F;
|
||||
f13 = 1.0F;
|
||||
f12 = 1.0F;
|
||||
}
|
||||
|
||||
tessellator.getWorldRenderer().setColorRGBA_F(f11 * f7, f12 * f7, f13 * f7, 1.0F);
|
||||
tessellator.getWorldRenderer().addVertex(p_147500_2_, p_147500_4_ + f4, p_147500_6_);
|
||||
tessellator.getWorldRenderer().addVertex(p_147500_2_, p_147500_4_ + f4, p_147500_6_ + 1.0D);
|
||||
tessellator.getWorldRenderer().addVertex(p_147500_2_ + 1.0D, p_147500_4_ + f4, p_147500_6_ + 1.0D);
|
||||
tessellator.getWorldRenderer().addVertex(p_147500_2_ + 1.0D, p_147500_4_ + f4, p_147500_6_);
|
||||
worldrenderer.setColorRGBA_F(f12 * f7, f13 * f7, f14 * f7, 1.0F);
|
||||
worldrenderer.addVertex(p_180544_2_, p_180544_4_ + (double)f4, p_180544_6_);
|
||||
worldrenderer.addVertex(p_180544_2_, p_180544_4_ + (double)f4, p_180544_6_ + 1.0D);
|
||||
worldrenderer.addVertex(p_180544_2_ + 1.0D, p_180544_4_ + (double)f4, p_180544_6_ + 1.0D);
|
||||
worldrenderer.addVertex(p_180544_2_ + 1.0D, p_180544_4_ + (double)f4, p_180544_6_);
|
||||
tessellator.draw();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glMatrixMode(GL11.GL_MODELVIEW);
|
||||
GlStateManager.popMatrix();
|
||||
GlStateManager.matrixMode(5888);
|
||||
}
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glDisable(GL11.GL_TEXTURE_GEN_S);
|
||||
GL11.glDisable(GL11.GL_TEXTURE_GEN_T);
|
||||
GL11.glDisable(GL11.GL_TEXTURE_GEN_R);
|
||||
GL11.glDisable(GL11.GL_TEXTURE_GEN_Q);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.disableTexGenCoord(GlStateManager.TexGen.S);
|
||||
GlStateManager.disableTexGenCoord(GlStateManager.TexGen.T);
|
||||
GlStateManager.disableTexGenCoord(GlStateManager.TexGen.R);
|
||||
GlStateManager.disableTexGenCoord(GlStateManager.TexGen.Q);
|
||||
GlStateManager.enableLighting();
|
||||
}
|
||||
|
||||
private FloatBuffer func_147525_a(float p_147525_1_, float p_147525_2_, float p_147525_3_, float p_147525_4_) {
|
||||
|
||||
@@ -33,25 +33,25 @@ public class RenderTileTerraPlate extends TileEntitySpecialRenderer {
|
||||
|
||||
float max = TileTerraPlate.MAX_MANA / 10F;
|
||||
float alphaMod = Math.min(max, plate.getCurrentMana()) / max;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(d0, d1, d2);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(d0, d1, d2);
|
||||
|
||||
GL11.glRotated(90F, 1F, 0F, 0F);
|
||||
GL11.glTranslatef(0F, 0F, -3F / 16F - 0.001F);
|
||||
GlStateManager.rotate(90F, 1F, 0F, 0F);
|
||||
GlStateManager.translate(0F, 0F, -3F / 16F - 0.001F);
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.disableAlpha();
|
||||
float alpha = (float) ((Math.sin((ClientTickHandler.ticksInGame + f) / 8D) + 1D) / 5D + 0.6D) * alphaMod;
|
||||
if(ShaderHelper.useShaders())
|
||||
GL11.glColor4f(1F, 1F, 1F, alpha);
|
||||
GlStateManager.color(1F, 1F, 1F, alpha);
|
||||
else {
|
||||
int light = 15728880;
|
||||
int lightmapX = light % 65536;
|
||||
int lightmapY = light / 65536;
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lightmapX, lightmapY);
|
||||
GL11.glColor4f(0.6F + (float) ((Math.cos((ClientTickHandler.ticksInGame + f) / 6D) + 1D) / 5D), 0.1F, 0.9F, alpha);
|
||||
GlStateManager.color(0.6F + (float) ((Math.cos((ClientTickHandler.ticksInGame + f) / 6D) + 1D) / 5D), 0.1F, 0.9F, alpha);
|
||||
}
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
@@ -60,10 +60,10 @@ public class RenderTileTerraPlate extends TileEntitySpecialRenderer {
|
||||
renderIcon(0, 0, BlockTerraPlate.overlay, 1, 1, 240);
|
||||
ShaderHelper.releaseShader();
|
||||
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
public void renderIcon(int par1, int par2, IIcon par3Icon, int par4, int par5, int brightness) {
|
||||
|
||||
@@ -33,33 +33,33 @@ public class RenderTileTeruTeruBozu extends TileEntitySpecialRenderer {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f, int digProgress) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glTranslated(d0, d1, d2);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.disableCull();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.translate(d0, d1, d2);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ClientProxy.dootDoot ? textureHalloween : texture);
|
||||
GL11.glRotatef(180F, 1F, 0F, 0F);
|
||||
GlStateManager.rotate(180F, 1F, 0F, 0F);
|
||||
double time = Botania.proxy.getWorldElapsedTicks() + f;
|
||||
boolean hasWorld = tileentity.getWorld() != null;
|
||||
if(hasWorld)
|
||||
time += new Random(tileentity.getPos().hashCode()).nextInt(1000);
|
||||
|
||||
GL11.glTranslatef(0.5F, -1.25F + (hasWorld ? (float) Math.sin(time * 0.01F) * 0.05F : 0F), -0.5F);
|
||||
GlStateManager.translate(0.5F, -1.25F + (hasWorld ? (float) Math.sin(time * 0.01F) * 0.05F : 0F), -0.5F);
|
||||
if(hasWorld) {
|
||||
GL11.glRotated(time * 0.3, 0F, 1F, 0F);
|
||||
GL11.glRotatef(4F * (float) Math.sin(time * 0.05F), 0F, 0F, 1F);
|
||||
GlStateManager.rotate(time * 0.3, 0F, 1F, 0F);
|
||||
GlStateManager.rotate(4F * (float) Math.sin(time * 0.05F), 0F, 0F, 1F);
|
||||
float s = 0.75F;
|
||||
GL11.glScalef(s, s, s);
|
||||
GlStateManager.scale(s, s, s);
|
||||
}
|
||||
|
||||
model.render();
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.color(1F, 1F, 1F);
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.enableCull();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -51,10 +51,10 @@ public class RenderTileTinyPotato extends TileEntitySpecialRenderer {
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity var1, double d0, double d1, double d2, float var8, int digProgress) {
|
||||
TileTinyPotato potato = (TileTinyPotato) var1;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glTranslated(d0, d1, d2);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.enableRescaleNormal();
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.translate(d0, d1, d2);
|
||||
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
mc.renderEngine.bindTexture(ClientProxy.dootDoot ? textureHalloween : texture);
|
||||
@@ -83,11 +83,11 @@ public class RenderTileTinyPotato extends TileEntitySpecialRenderer {
|
||||
usedShader = true;
|
||||
}
|
||||
|
||||
GL11.glTranslatef(0.5F, 1.5F, 0.5F);
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
GlStateManager.translate(0.5F, 1.5F, 0.5F);
|
||||
GlStateManager.scale(1F, -1F, -1F);
|
||||
int meta = potato.getWorld() == null ? 3 : potato.getBlockMetadata();
|
||||
float rotY = meta * 90F - 180F;
|
||||
GL11.glRotatef(rotY, 0F, 1F, 0F);
|
||||
GlStateManager.rotate(rotY, 0F, 1F, 0F);
|
||||
|
||||
float jump = potato.jumpTicks;
|
||||
if(jump > 0)
|
||||
@@ -96,259 +96,259 @@ public class RenderTileTinyPotato extends TileEntitySpecialRenderer {
|
||||
float up = (float) -Math.abs(Math.sin(jump / 10 * Math.PI)) * 0.2F;
|
||||
float rotZ = (float) Math.sin(jump / 10 * Math.PI) * 2;
|
||||
|
||||
GL11.glTranslatef(0F, up, 0F);
|
||||
GL11.glRotatef(rotZ, 0F, 0F, 1F);
|
||||
GlStateManager.translate(0F, up, 0F);
|
||||
GlStateManager.rotate(rotZ, 0F, 0F, 1F);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
if(name.equals("pahimar")) {
|
||||
GL11.glScalef(1F, 0.3F, 1F);
|
||||
GL11.glTranslatef(0F, 3.5F, 0F);
|
||||
GlStateManager.scale(1F, 0.3F, 1F);
|
||||
GlStateManager.translate(0F, 3.5F, 0F);
|
||||
} else if(name.equals("kyle hyde"))
|
||||
mc.renderEngine.bindTexture(textureGrayscale);
|
||||
else if(name.equals("dinnerbone") || name.equals("grumm")) {
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glTranslatef(0F, -2.625F, 0F);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.translate(0F, -2.625F, 0F);
|
||||
} else if(name.equals("aureylian"))
|
||||
GL11.glColor3f(1F, 0.5F, 1F);
|
||||
GlStateManager.color(1F, 0.5F, 1F);
|
||||
|
||||
|
||||
boolean render = !(name.equals("mami") || name.equals("soaryn") || name.equals("eloraam") && jump != 0);
|
||||
if(render)
|
||||
model.render();
|
||||
if(name.equals("kingdaddydmac")) {
|
||||
GL11.glTranslated(0.5F, 0F, 0F);
|
||||
GlStateManager.translate(0.5F, 0F, 0F);
|
||||
model.render();
|
||||
}
|
||||
|
||||
if(usedShader)
|
||||
ShaderHelper.releaseShader();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
if(!name.isEmpty()) {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
mc.renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
|
||||
ContributorFancinessHandler.firstStart();
|
||||
|
||||
float scale = 1F / 4F;
|
||||
GL11.glTranslatef(0F, 1F, 0F);
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GlStateManager.translate(0F, 1F, 0F);
|
||||
GlStateManager.scale(scale, scale, scale);
|
||||
if(name.equals("phi") || name.equals("vazkii")) {
|
||||
GL11.glTranslatef(0.45F, 0F, 0.4F);
|
||||
GL11.glRotatef(90F, 0F, 1F, 0F);
|
||||
GL11.glRotatef(20F, 1F, 0F, 1F);
|
||||
GlStateManager.translate(0.45F, 0F, 0.4F);
|
||||
GlStateManager.rotate(90F, 0F, 1F, 0F);
|
||||
GlStateManager.rotate(20F, 1F, 0F, 1F);
|
||||
renderIcon(((ItemManaResource) ModItems.manaResource).phiFlowerIcon);
|
||||
|
||||
if(name.equals("vazkii")) {
|
||||
GL11.glRotatef(-20F, 1F, 0F, 1F);
|
||||
GL11.glScalef(1.25F, 1.25F, 1.25F);
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glTranslatef(-1.5F, -1.3F, -0.75F);
|
||||
GlStateManager.rotate(-20F, 1F, 0F, 1F);
|
||||
GlStateManager.scale(1.25F, 1.25F, 1.25F);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.translate(-1.5F, -1.3F, -0.75F);
|
||||
renderIcon(((ItemManaResource) ModItems.manaResource).nerfBatIcon);
|
||||
}
|
||||
} else if(name.equals("skull kid")) {
|
||||
GL11.glScalef(1.25F, 1.25F, 1.25F);
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glTranslatef(-0.5F, -1.2F, -0.4F);
|
||||
GlStateManager.scale(1.25F, 1.25F, 1.25F);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.translate(-0.5F, -1.2F, -0.4F);
|
||||
renderIcon(ModItems.cosmetic.getIconFromDamage(23));
|
||||
} else if(name.equals("kamina")) {
|
||||
GL11.glScalef(1.25F, 1.25F, 1.25F);
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glTranslatef(-0.5F, -1.1F, -0.4F);
|
||||
GlStateManager.scale(1.25F, 1.25F, 1.25F);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.translate(-0.5F, -1.1F, -0.4F);
|
||||
renderIcon(ModItems.cosmetic.getIconFromDamage(26));
|
||||
} else if(name.equals("haighyorkie")) {
|
||||
GL11.glScalef(1.25F, 1.25F, 1.25F);
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glRotatef(90F, 0F, 1F, 0F);
|
||||
GL11.glTranslatef(-0.5F, -1.2F, -0.4F);
|
||||
GlStateManager.scale(1.25F, 1.25F, 1.25F);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.rotate(90F, 0F, 1F, 0F);
|
||||
GlStateManager.translate(-0.5F, -1.2F, -0.4F);
|
||||
renderIcon(((ItemManaResource) ModItems.manaResource).goldfishIcon);
|
||||
} else if(name.equals("chitoge")) {
|
||||
GL11.glScalef(1.25F, 1.25F, 1.25F);
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glTranslatef(-0.5F, -0.7F, 0.1F);
|
||||
GlStateManager.scale(1.25F, 1.25F, 1.25F);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.translate(-0.5F, -0.7F, 0.1F);
|
||||
renderIcon(ModItems.cosmetic.getIconFromDamage(7));
|
||||
} else if(name.equals("direwolf20")) {
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glTranslatef(-0.5F, -2.2F, -0.5F);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.translate(-0.5F, -2.2F, -0.5F);
|
||||
renderIcon(ModItems.cosmetic.getIconFromDamage(0));
|
||||
} else if(name.equals("doctor")) {
|
||||
GL11.glScalef(1.25F, 1.25F, 1.25F);
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glTranslatef(-0.5F, -1.15F, -0.4F);
|
||||
GlStateManager.scale(1.25F, 1.25F, 1.25F);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.translate(-0.5F, -1.15F, -0.4F);
|
||||
renderIcon(ModItems.cosmetic.getIconFromDamage(25));
|
||||
} else if(name.equals("snoo")) {
|
||||
GL11.glScalef(1.25F, 1.25F, 1.25F);
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glTranslatef(-0.5F, -0.7F, 0.1F);
|
||||
GL11.glRotatef(20F, 0F, 0F, 1F);
|
||||
GlStateManager.scale(1.25F, 1.25F, 1.25F);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.translate(-0.5F, -0.7F, 0.1F);
|
||||
GlStateManager.rotate(20F, 0F, 0F, 1F);
|
||||
renderIcon(ModItems.cosmetic.getIconFromDamage(24));
|
||||
} else if(name.equals("charlotte")) {
|
||||
GL11.glScalef(1.25F, 1.25F, 1.25F);
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glTranslatef(-0.5F, -1.2F, -0.4F);
|
||||
GlStateManager.scale(1.25F, 1.25F, 1.25F);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.translate(-0.5F, -1.2F, -0.4F);
|
||||
renderIcon(ModItems.cosmetic.getIconFromDamage(12));
|
||||
} else if(name.equals("greg") || name.equals("gregorioust")) {
|
||||
GL11.glScalef(1.25F, 1.25F, 1.25F);
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glRotatef(90F, 0F, 1F, 0F);
|
||||
GL11.glTranslatef(-0.5F, -1.5F, -0.4F);
|
||||
GlStateManager.scale(1.25F, 1.25F, 1.25F);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.rotate(90F, 0F, 1F, 0F);
|
||||
GlStateManager.translate(-0.5F, -1.5F, -0.4F);
|
||||
renderIcon(Items.book.getIconFromDamage(0));
|
||||
|
||||
mc.renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0F);
|
||||
GL11.glScalef(0.3F, 0.3F, 0.3F);
|
||||
GlStateManager.translate(0.5F, 0.5F, 0F);
|
||||
GlStateManager.scale(0.3F, 0.3F, 0.3F);
|
||||
|
||||
RenderBlocks.getInstance().renderBlockAsItem(Blocks.iron_ore, 0, 1F);
|
||||
} else if(name.equals("profmobius")) {
|
||||
GL11.glScalef(1.25F, 1.25F, 1.25F);
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glRotatef(90F, 0F, 1F, 0F);
|
||||
GL11.glTranslatef(-0.5F, -1.2F, -0.4F);
|
||||
GlStateManager.scale(1.25F, 1.25F, 1.25F);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.rotate(90F, 0F, 1F, 0F);
|
||||
GlStateManager.translate(-0.5F, -1.2F, -0.4F);
|
||||
renderIcon(Items.bread.getIconFromDamage(0));
|
||||
} else if(name.equals("martysgames") || name.equals("marty")) {
|
||||
GL11.glScalef(0.7F, 0.7F, 0.7F);
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glTranslatef(-0.75F, -2.4F, -0.7F);
|
||||
GL11.glRotatef(10F, 0F, 0F, 1F);
|
||||
GlStateManager.scale(0.7F, 0.7F, 0.7F);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.translate(-0.75F, -2.4F, -0.7F);
|
||||
GlStateManager.rotate(10F, 0F, 0F, 1F);
|
||||
renderIcon(ItemInfiniteFruit.dasBootIcon);
|
||||
} else if(name.equals("tromped")) {
|
||||
GL11.glScalef(1.25F, 1.25F, 1.25F);
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glRotatef(90F, 0F, 1F, 0F);
|
||||
GL11.glTranslatef(-0.5F, -1.2F, -0.4F);
|
||||
GlStateManager.scale(1.25F, 1.25F, 1.25F);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.rotate(90F, 0F, 1F, 0F);
|
||||
GlStateManager.translate(-0.5F, -1.2F, -0.4F);
|
||||
renderIcon(ModItems.cacophonium.getIconFromDamage(0));
|
||||
} else if(name.equals("kain vinosec")) {
|
||||
GL11.glScalef(1.25F, 1.25F, 1.25F);
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glRotatef(90F, 0F, 1F, 0F);
|
||||
GL11.glTranslatef(-0.3F, -1.5F, -0.4F);
|
||||
GlStateManager.scale(1.25F, 1.25F, 1.25F);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.rotate(90F, 0F, 1F, 0F);
|
||||
GlStateManager.translate(-0.3F, -1.5F, -0.4F);
|
||||
renderIcon(ModItems.recordGaia1.getIconFromDamage(0));
|
||||
GL11.glTranslatef(0F, 0F, 0.85F);
|
||||
GlStateManager.translate(0F, 0F, 0.85F);
|
||||
renderIcon(ModItems.recordGaia2.getIconFromDamage(0));
|
||||
} else if(name.equals("mankrik")) {
|
||||
GL11.glScalef(1.25F, 1.25F, 1.25F);
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glTranslatef(-0.5F, -0.2F, -0.1F);
|
||||
GlStateManager.scale(1.25F, 1.25F, 1.25F);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.translate(-0.5F, -0.2F, -0.1F);
|
||||
renderIcon(ModItems.cosmetic.getIconFromDamage(31));
|
||||
} else if(name.equals("kurumi")) {
|
||||
GL11.glScalef(0.4F, 0.4F, 0.4F);
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glTranslatef(-0.9F, -2.5F, -1.3F);
|
||||
GlStateManager.scale(0.4F, 0.4F, 0.4F);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.translate(-0.9F, -2.5F, -1.3F);
|
||||
renderIcon(ModItems.cosmetic.getIconFromDamage(17));
|
||||
} else if(name.equals("ichun")) {
|
||||
GL11.glScalef(1.25F, 1.25F, 1.25F);
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glTranslatef(-0.5F, -1.2F, -0.4F);
|
||||
GlStateManager.scale(1.25F, 1.25F, 1.25F);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.translate(-0.5F, -1.2F, -0.4F);
|
||||
renderIcon(ModItems.cosmetic.getIconFromDamage(15));
|
||||
} else if(name.equals("wiiv") || name.equals("dylan4ever") || name.equals("dylankaiser")) {
|
||||
GL11.glScalef(1.5F, 1.5F, 1.5F);
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glRotatef(90F, 0F, 1F, 0F);
|
||||
GL11.glTranslatef(-0.5F, -1.1F, -0.325F);
|
||||
GlStateManager.scale(1.5F, 1.5F, 1.5F);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.rotate(90F, 0F, 1F, 0F);
|
||||
GlStateManager.translate(-0.5F, -1.1F, -0.325F);
|
||||
renderIcon(Items.painting.getIconFromDamage(0));
|
||||
} else if(name.equals("jibril")) {
|
||||
GL11.glScalef(1.5F, 1.5F, 1.5F);
|
||||
GL11.glTranslatef(0F, 0.7F, 0F);
|
||||
GL11.glRotatef(90F, 0F, 1F, 0F);
|
||||
GlStateManager.scale(1.5F, 1.5F, 1.5F);
|
||||
GlStateManager.translate(0F, 0.7F, 0F);
|
||||
GlStateManager.rotate(90F, 0F, 1F, 0F);
|
||||
ItemFlightTiara.renderHalo(null, var8);
|
||||
} else if(name.equals("nebris")) {
|
||||
mc.renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
GL11.glRotatef(180F, 1F, 0F, 0F);
|
||||
GlStateManager.rotate(180F, 1F, 0F, 0F);
|
||||
RenderBlocks.getInstance().renderBlockAsItem(Blocks.glowstone, 0, 1F);
|
||||
} else if(name.equals("ible")) {
|
||||
mc.renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
GL11.glScalef(1.2F, 1.2F, 1.2F);
|
||||
GL11.glTranslatef(0F, 0.7F, 0F);
|
||||
GL11.glRotatef(180F, 1F, 0F, 0F);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.scale(1.2F, 1.2F, 1.2F);
|
||||
GlStateManager.translate(0F, 0.7F, 0F);
|
||||
GlStateManager.rotate(180F, 1F, 0F, 0F);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
RenderBlocks.getInstance().renderBlockAsItem(Blocks.portal, 0, 1F);
|
||||
} else if(name.equals("razz") || name.equals("razzleberryfox")) {
|
||||
GL11.glScalef(1.25F, 1.25F, 1.25F);
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glRotatef(90F, 0F, 1F, 0F);
|
||||
GL11.glTranslatef(-0.5F, -1F, 0.45F);
|
||||
GlStateManager.scale(1.25F, 1.25F, 1.25F);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.rotate(90F, 0F, 1F, 0F);
|
||||
GlStateManager.translate(-0.5F, -1F, 0.45F);
|
||||
renderIcon(ModItems.cosmetic.getIconFromDamage(8));
|
||||
} else if(name.equals("etho") || name.equals("ethoslab")) {
|
||||
GL11.glScalef(1.25F, 1.25F, 1.25F);
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glRotatef(90F, 0F, 1F, 0F);
|
||||
GL11.glTranslatef(-0.5F, -1.2F, -0.4F);
|
||||
GlStateManager.scale(1.25F, 1.25F, 1.25F);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.rotate(90F, 0F, 1F, 0F);
|
||||
GlStateManager.translate(-0.5F, -1.2F, -0.4F);
|
||||
renderIcon(Items.cookie.getIconFromDamage(0));
|
||||
} else if(name.equals("sethbling")) {
|
||||
mc.renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
GL11.glScalef(1.2F, 1.2F, 1.2F);
|
||||
GL11.glTranslatef(0F, 0.9F, 0F);
|
||||
GL11.glRotatef(180F, 1F, 0F, 0F);
|
||||
GlStateManager.scale(1.2F, 1.2F, 1.2F);
|
||||
GlStateManager.translate(0F, 0.9F, 0F);
|
||||
GlStateManager.rotate(180F, 1F, 0F, 0F);
|
||||
RenderBlocks.getInstance().renderBlockAsItem(Blocks.command_block, 0, 1F);
|
||||
} else if(name.equals("bdoubleo100") || name.equals("bdoubleo")) {
|
||||
GL11.glScalef(1.25F, 1.25F, 1.25F);
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glTranslatef(-1F, -1.1F, -0.1F);
|
||||
GlStateManager.scale(1.25F, 1.25F, 1.25F);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.translate(-1F, -1.1F, -0.1F);
|
||||
renderIcon(Items.stick.getIconFromDamage(0));
|
||||
} else if(name.equals("kingdaddydmac")) {
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glRotatef(90F, 0F, 1F, 0F);
|
||||
GL11.glTranslatef(-0.3F, -2.5F, 1.075F);
|
||||
GlStateManager.scale(0.5F, 0.5F, 0.5F);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.rotate(90F, 0F, 1F, 0F);
|
||||
GlStateManager.translate(-0.3F, -2.5F, 1.075F);
|
||||
renderIcon(ModItems.manaRing.getIconFromDamage(0));
|
||||
GL11.glTranslatef(0F, 0F, -4F);
|
||||
GlStateManager.translate(0F, 0F, -4F);
|
||||
renderIcon(ModItems.manaRing.getIconFromDamage(0));
|
||||
|
||||
mc.renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
GL11.glScalef(1.5F, 1.5F, 1.5F);
|
||||
GL11.glTranslatef(1.5F, -0.5F, 0.7F);
|
||||
GlStateManager.scale(1.5F, 1.5F, 1.5F);
|
||||
GlStateManager.translate(1.5F, -0.5F, 0.7F);
|
||||
RenderBlocks.getInstance().renderBlockAsItem(Blocks.cake, 0, 1F);
|
||||
} else if(name.equals("sjin")) {
|
||||
GL11.glScalef(1.25F, 1.25F, 1.25F);
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glTranslatef(-0.5F, -1.27F, -0.4F);
|
||||
GlStateManager.scale(1.25F, 1.25F, 1.25F);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.translate(-0.5F, -1.27F, -0.4F);
|
||||
renderIcon(ModItems.cosmetic.getIconFromDamage(27));
|
||||
} else if(name.equals("martyn") || name.equals("inthelittlewood")) {
|
||||
GL11.glScalef(1.25F, 1.25F, 1.25F);
|
||||
GL11.glRotatef(180F, 0F, 0F, 1F);
|
||||
GL11.glTranslatef(-0.5F, -0.45F, -0.1F);
|
||||
GlStateManager.scale(1.25F, 1.25F, 1.25F);
|
||||
GlStateManager.rotate(180F, 0F, 0F, 1F);
|
||||
GlStateManager.translate(-0.5F, -0.45F, -0.1F);
|
||||
mc.renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
renderIcon(Blocks.sapling.getIcon(0, 0));
|
||||
}else if(ContributorFancinessHandler.flowerMap != null && ContributorFancinessHandler.flowerMap.containsKey(name)) {
|
||||
IIcon icon = ContributorFancinessHandler.flowerMap.get(name);
|
||||
if(icon != null) {
|
||||
mc.renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
GL11.glRotatef(180F, 1F, 0F, 0F);
|
||||
GL11.glTranslatef(-0.5F, -0.5F, 0F);
|
||||
GlStateManager.rotate(180F, 1F, 0F, 0F);
|
||||
GlStateManager.translate(-0.5F, -0.5F, 0F);
|
||||
ShaderHelper.useShader(ShaderHelper.gold);
|
||||
renderIcon(icon);
|
||||
ShaderHelper.releaseShader();
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
MinecraftForge.EVENT_BUS.post(new TinyPotatoRenderEvent(potato, potato.name, d0, d1, d2, var8));
|
||||
|
||||
GL11.glRotatef(-rotZ, 0F, 0F, 1F);
|
||||
GL11.glRotatef(-rotY, 0F, 1F, 0F);
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
GlStateManager.rotate(-rotZ, 0F, 0F, 1F);
|
||||
GlStateManager.rotate(-rotY, 0F, 1F, 0F);
|
||||
GlStateManager.color(1F, 1F, 1F);
|
||||
GlStateManager.scale(1F, -1F, -1F);
|
||||
|
||||
MovingObjectPosition pos = mc.objectMouseOver;
|
||||
if(!name.isEmpty() && pos != null && pos.blockX == potato.xCoord && pos.blockY == potato.yCoord && pos.blockZ == potato.zCoord) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0F, -0.6F, 0F);
|
||||
GL11.glRotatef(-RenderManager.instance.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(RenderManager.instance.playerViewX, 1.0F, 0.0F, 0.0F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(0F, -0.6F, 0F);
|
||||
GlStateManager.rotate(-RenderManager.instance.playerViewY, 0.0F, 1.0F, 0.0F);
|
||||
GlStateManager.rotate(RenderManager.instance.playerViewX, 1.0F, 0.0F, 0.0F);
|
||||
float f = 1.6F;
|
||||
float f1 = 0.016666668F * f;
|
||||
GL11.glScalef(-f1, -f1, f1);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glTranslatef(0.0F, 0F / f1, 0.0F);
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GlStateManager.scale(-f1, -f1, f1);
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.translate(0.0F, 0F / f1, 0.0F);
|
||||
GlStateManager.depthMask(false);
|
||||
GlStateManager.enableBlend();
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GlStateManager.disableTexture2D();
|
||||
tessellator.getWorldRenderer().startDrawingQuads();
|
||||
int i = mc.fontRendererObj.getStringWidth(potato.name) / 2;
|
||||
tessellator.getWorldRenderer().setColorRGBA_F(0.0F, 0.0F, 0.0F, 0.25F);
|
||||
@@ -357,16 +357,16 @@ public class RenderTileTinyPotato extends TileEntitySpecialRenderer {
|
||||
tessellator.getWorldRenderer().addVertex(i + 1, 8.0D, 0.0D);
|
||||
tessellator.getWorldRenderer().addVertex(i + 1, -1.0D, 0.0D);
|
||||
tessellator.draw();
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glDepthMask(true);
|
||||
GlStateManager.enableTexture2D();
|
||||
GlStateManager.depthMask(true);
|
||||
mc.fontRendererObj.drawString(potato.name, -mc.fontRendererObj.getStringWidth(potato.name) / 2, 0, 0xFFFFFF);
|
||||
if(name.equals("pahimar") || name.equals("soaryn")) {
|
||||
GL11.glTranslatef(0F, 14F, 0F);
|
||||
GlStateManager.translate(0F, 14F, 0F);
|
||||
String s = name.equals("pahimar") ? "[WIP]" : "(soon)";
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GlStateManager.depthMask(false);
|
||||
GlStateManager.enableBlend();
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GlStateManager.disableTexture2D();
|
||||
tessellator.getWorldRenderer().startDrawingQuads();
|
||||
i = mc.fontRendererObj.getStringWidth(s) / 2;
|
||||
tessellator.getWorldRenderer().setColorRGBA_F(0.0F, 0.0F, 0.0F, 0.25F);
|
||||
@@ -375,19 +375,19 @@ public class RenderTileTinyPotato extends TileEntitySpecialRenderer {
|
||||
tessellator.getWorldRenderer().addVertex(i + 1, 8.0D, 0.0D);
|
||||
tessellator.getWorldRenderer().addVertex(i + 1, -1.0D, 0.0D);
|
||||
tessellator.draw();
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glDepthMask(true);
|
||||
GlStateManager.enableTexture2D();
|
||||
GlStateManager.depthMask(true);
|
||||
mc.fontRendererObj.drawString(s, -mc.fontRendererObj.getStringWidth(s) / 2, 0, 0xFFFFFF);
|
||||
}
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glScalef(1F / -f1, 1F / -f1, 1F / f1);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.enableLighting();
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||
GlStateManager.scale(1F / -f1, 1F / -f1, 1F / f1);
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
public void renderIcon(IIcon icon) {
|
||||
|
||||
@@ -192,7 +192,7 @@ public class BlockOpenCrate extends BlockModContainer implements ILexiconable, I
|
||||
|
||||
ItemStack item = craft.getStackInSlot(index);
|
||||
net.minecraft.client.renderer.RenderHelper.enableGUIStandardItemLighting();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GlStateManager.enableRescaleNormal();
|
||||
mc.getRenderItem().renderItemAndEffectIntoGUI(item, xp, yp);
|
||||
net.minecraft.client.renderer.RenderHelper.disableStandardItemLighting();
|
||||
}
|
||||
|
||||
@@ -221,13 +221,13 @@ public class SubTileHopperhock extends SubTileFunctional {
|
||||
|
||||
int color = getColor();
|
||||
String filter = StatCollector.translateToLocal("botaniamisc.filter" + filterType);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
int x = res.getScaledWidth() / 2 - mc.fontRendererObj.getStringWidth(filter) / 2;
|
||||
int y = res.getScaledHeight() / 2 + 30;
|
||||
|
||||
mc.fontRendererObj.drawStringWithShadow(filter, x, y, color);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GlStateManager.disableBlend();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+4
-4
@@ -164,8 +164,8 @@ public class SubTileRannuncarpus extends SubTileFunctional {
|
||||
ItemStack recieverStack = new ItemStack(Item.getItemFromBlock(filter.state.getBlock()), 1, filter.state.getBlock().getMetaFromState(filter.state));
|
||||
int color = getColor();
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
if(recieverStack != null && recieverStack.getItem() != null) {
|
||||
String stackName = recieverStack.getDisplayName();
|
||||
int width = 16 + mc.fontRendererObj.getStringWidth(stackName) / 2;
|
||||
@@ -178,8 +178,8 @@ public class SubTileRannuncarpus extends SubTileFunctional {
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
}
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.disableBlend();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -89,8 +89,8 @@ public class SubTileSpectrolus extends SubTileGenerating {
|
||||
ItemStack stack = new ItemStack(Blocks.wool, 1, nextColor);
|
||||
int color = getColor();
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
if(stack != null && stack.getItem() != null) {
|
||||
String stackName = stack.getDisplayName();
|
||||
int width = 16 + mc.fontRendererObj.getStringWidth(stackName) / 2;
|
||||
@@ -103,8 +103,8 @@ public class SubTileSpectrolus extends SubTileGenerating {
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
}
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.disableBlend();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Loaded 100 of 135 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user