mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-18 11:29:23 +00:00
Use GlStateManager
This commit is contained in:
1 parent
31a305ffc2
commit
9c4b081f6d
24 files changed
+144
-152
No files matched your search
@@ -20,19 +20,19 @@ public class ItemMetadataRenderer //implements IItemRenderer
|
||||
//
|
||||
// @Override
|
||||
// public void renderItem(final IItemRenderer.ItemRenderType type, final ItemStack item, final Object... data) {
|
||||
// GL11.glPushMatrix();
|
||||
// GlStateManager.pushMatrix();
|
||||
// final Block block = Block.getBlockFromItem(item.getItem());
|
||||
// if (type == IItemRenderer.ItemRenderType.EQUIPPED_FIRST_PERSON) {
|
||||
// GL11.glTranslated(0.5, 0.5, 0.5);
|
||||
// GlStateManager.translate(0.5, 0.5, 0.5);
|
||||
// }
|
||||
// if (type == IItemRenderer.ItemRenderType.INVENTORY && block.getRenderBlockPass() != 0) {
|
||||
// GL11.glAlphaFunc(516, 0.1f);
|
||||
// GL11.glEnable(3042);
|
||||
// GlStateManager.enableBlend();
|
||||
// OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
// }
|
||||
// GL11.glPushMatrix();
|
||||
// GlStateManager.pushMatrix();
|
||||
// ((RenderBlocks) data[0]).renderBlockAsItem(block, TileEntityMetadata.getItemDamage(item), 1.0f);
|
||||
// GL11.glPopMatrix();
|
||||
// GL11.glPopMatrix();
|
||||
// GlStateManager.popMatrix();
|
||||
// GlStateManager.popMatrix();
|
||||
// }
|
||||
}
|
||||
@@ -2,9 +2,9 @@ package binnie.core.machines;
|
||||
|
||||
import binnie.core.BinnieCore;
|
||||
import binnie.core.resource.BinnieResource;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class MachineRendererBlock {
|
||||
@@ -16,16 +16,16 @@ public class MachineRendererBlock {
|
||||
this.model = new ModelBlock();
|
||||
}
|
||||
|
||||
public void renderMachine(final BinnieResource texture, final double x, final double y, final double z, final float var8) {
|
||||
public void renderMachine(final BinnieResource texture, final double x, final double y, final double z, final float partialTicks) {
|
||||
this.texture = texture;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5, y + 1.5, z + 0.5);
|
||||
GL11.glRotatef(180.0f, 0.0f, 0.0f, 1.0f);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(x + 0.5, y + 1.5, z + 0.5);
|
||||
GlStateManager.rotate(180.0f, 0.0f, 0.0f, 1.0f);
|
||||
|
||||
BinnieCore.proxy.bindTexture(texture);
|
||||
GL11.glPushMatrix();
|
||||
this.model.render((float) x, (float) y, (float) z, 0.0625f, 0.0625f, 0.0625f);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,9 +3,9 @@ package binnie.core.machines.storage;
|
||||
import binnie.core.BinnieCore;
|
||||
import binnie.core.machines.Machine;
|
||||
import binnie.core.resource.BinnieResource;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
class MachineRendererCompartment {
|
||||
@@ -17,7 +17,7 @@ class MachineRendererCompartment {
|
||||
}
|
||||
|
||||
public void renderMachine(final Machine machine, final int colour, final BinnieResource texture, final double x, final double y, final double z, final float var8) {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
int i1 = 0;
|
||||
final int ix = machine.getTileEntity().getPos().getX();
|
||||
final int iy = machine.getTileEntity().getPos().getY();
|
||||
@@ -26,13 +26,13 @@ class MachineRendererCompartment {
|
||||
i1 = ix * iy * iz + ix * iy - ix * iz + iy * iz - ix + iy - iz;
|
||||
}
|
||||
final float phase = (float) Math.max(0.0, Math.sin((System.currentTimeMillis() + i1) * 0.003));
|
||||
GL11.glTranslated(x + 0.5, y + 1.5, z + 0.5);
|
||||
GL11.glRotatef(180.0f, 0.0f, 0.0f, 1.0f);
|
||||
GlStateManager.translate(x + 0.5, y + 1.5, z + 0.5);
|
||||
GlStateManager.rotate(180.0f, 0.0f, 0.0f, 1.0f);
|
||||
|
||||
BinnieCore.proxy.bindTexture(texture);
|
||||
GL11.glPushMatrix();
|
||||
this.model.render(null, (float) x, (float) y, (float) z, 0.0625f, 0.0625f, 0.0625f);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -23,7 +23,6 @@ import net.minecraftforge.fml.client.FMLClientHandler;
|
||||
import net.minecraftforge.fml.client.registry.ClientRegistry;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.io.File;
|
||||
@@ -80,7 +79,6 @@ public final class BinnieProxyClient extends BinnieProxy implements IBinnieProxy
|
||||
|
||||
@Override
|
||||
public void bindTexture(final BinnieResource texture) {
|
||||
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
this.bindTexture(texture.getResourceLocation());
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.client.config.GuiUtils;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
@@ -159,9 +158,9 @@ public class CraftGUIUtil {
|
||||
if (rotating) {
|
||||
GlStateManager.pushMatrix();
|
||||
final float phase = Minecraft.getSystemTime() / 20;
|
||||
GL11.glTranslatef(8, 8, 0);
|
||||
GL11.glRotatef(phase, 0, -0.866f, 0.5f);
|
||||
GL11.glTranslatef(-8, -8, -67.1f);
|
||||
GlStateManager.translate(8, 8, 0);
|
||||
GlStateManager.rotate(phase, 0, -0.866f, 0.5f);
|
||||
GlStateManager.translate(-8, -8, -67.1f);
|
||||
}
|
||||
|
||||
minecraft.getRenderItem().renderItemAndEffectIntoGUI(null, itemStack, pos.x(), pos.y());
|
||||
|
||||
@@ -14,6 +14,7 @@ import binnie.extratrees.core.ExtraTreeTexture;
|
||||
import binnie.extratrees.machines.lumbermill.LumbermillMachine;
|
||||
import binnie.extratrees.machines.lumbermill.LumbermillRecipes;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -35,14 +36,14 @@ public class ControlLumbermillProgress extends ControlProgressBase {
|
||||
|
||||
@Override
|
||||
public void onRenderForeground(int guiWidth, int guiHeight) {
|
||||
GL11.glDisable(2896);
|
||||
GlStateManager.disableLighting();
|
||||
final int sawX = (int) (63 * this.progress);
|
||||
CraftGUI.render.texture(ControlLumbermillProgress.Saw, new IPoint(sawX, -8 + Math.round(6 * (float) Math.sin(this.animation))));
|
||||
final ItemStack item = Window.get(this).getInventory().getStackInSlot(LumbermillMachine.SLOT_LOG);
|
||||
if (item == null) {
|
||||
return;
|
||||
}
|
||||
GL11.glDisable(2896);
|
||||
GlStateManager.disableLighting();
|
||||
Block block = null;
|
||||
if (item.getItem() instanceof ItemBlock) {
|
||||
block = ((ItemBlock) item.getItem()).getBlock();
|
||||
@@ -70,12 +71,12 @@ public class ControlLumbermillProgress extends ControlProgressBase {
|
||||
final IPoint size = this.getSize();
|
||||
final IPoint pos = this.getAbsolutePosition();
|
||||
CraftGUI.render.limitArea(new IArea(pos.add(IPoint.ZERO), new IPoint(Math.round(this.progress * 64) + 2, 18)), guiWidth, guiHeight);
|
||||
GL11.glEnable(3089);
|
||||
GL11.glEnable(GL11.GL_SCISSOR_TEST);
|
||||
for (int j = 0; j < 4; ++j) {
|
||||
//TODO RENDERING
|
||||
//CraftGUI.Render.iconBlock(new IPoint(1 + j * 16, 1), icon2);
|
||||
}
|
||||
GL11.glDisable(3089);
|
||||
GL11.glDisable(GL11.GL_SCISSOR_TEST);
|
||||
CraftGUI.render.texture(ControlLumbermillProgress.Saw2, new IPoint(sawX + 2, -8 + Math.round(6 * (float) Math.sin(this.animation))));
|
||||
}
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@ import binnie.craftgui.core.IWidget;
|
||||
import binnie.craftgui.core.Tooltip;
|
||||
import binnie.craftgui.core.geometry.IPoint;
|
||||
import binnie.craftgui.minecraft.Window;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fml.client.FMLClientHandler;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class ControlFluidDisplay extends Control implements ITooltip {
|
||||
FluidStack itemStack;
|
||||
@@ -59,19 +59,19 @@ public class ControlFluidDisplay extends Control implements ITooltip {
|
||||
final int b = hex & 0xFF;
|
||||
final ResourceLocation iconRL = this.itemStack.getFluid().getStill();
|
||||
TextureAtlasSprite icon = FMLClientHandler.instance().getClient().getTextureMapBlocks().getAtlasSprite(iconRL.toString());
|
||||
GL11.glColor4f(r / 255.0f, g / 255.0f, b / 255.0f, 1.0f);
|
||||
GL11.glEnable(3042);
|
||||
GL11.glBlendFunc(770, 771);
|
||||
GlStateManager.color(r / 255.0f, g / 255.0f, b / 255.0f, 1.0f);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(770, 771);
|
||||
if (this.getSize().x() != 16) {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
final float scale = this.getSize().x() / 16.0f;
|
||||
GL11.glScalef(scale, scale, 1.0f);
|
||||
GlStateManager.scale(scale, scale, 1.0f);
|
||||
CraftGUI.render.sprite(IPoint.ZERO, icon);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
} else {
|
||||
CraftGUI.render.sprite(IPoint.ZERO, icon);
|
||||
}
|
||||
GL11.glDisable(3042);
|
||||
GlStateManager.disableBlend();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import binnie.craftgui.events.EventMouse;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
@@ -20,7 +21,6 @@ import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
@@ -71,17 +71,17 @@ public class GuiCraftGUI extends GuiContainer {
|
||||
public void drawScreen(final int mouseX, final int mouseY, final float par3) {
|
||||
this.window.setMousePosition(mouseX - (int) this.window.getPosition().x(), mouseY - (int) this.window.getPosition().y());
|
||||
this.drawDefaultBackground();
|
||||
GL11.glDisable(32826);
|
||||
GlStateManager.disableRescaleNormal();
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
GL11.glDisable(2896);
|
||||
GL11.glDisable(2929);
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.disableDepth();
|
||||
this.zLevel = 10.0f;
|
||||
//GuiScreen.itemRender.zLevel = this.zLevel;
|
||||
this.window.render(this.width, this.height);
|
||||
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(32826);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.enableRescaleNormal();
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240.0f, 240.0f);
|
||||
final InventoryPlayer playerInventory = this.mc.thePlayer.inventory;
|
||||
this.draggedItem = playerInventory.getItemStack();
|
||||
@@ -89,10 +89,10 @@ public class GuiCraftGUI extends GuiContainer {
|
||||
CraftGUIUtil.renderItem(new IPoint(mouseX - 8, mouseY - 8), this.draggedItem, false);
|
||||
}
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
GL11.glDisable(32826);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glDisable(2896);
|
||||
GL11.glDisable(2929);
|
||||
GlStateManager.disableRescaleNormal();
|
||||
GlStateManager.popMatrix();
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.disableDepth();
|
||||
final MinecraftTooltip tooltip = new MinecraftTooltip();
|
||||
if (this.isHelpMode()) {
|
||||
tooltip.setType(Tooltip.Type.Help);
|
||||
@@ -105,18 +105,18 @@ public class GuiCraftGUI extends GuiContainer {
|
||||
this.renderTooltip(new IPoint(mouseX, mouseY), tooltip);
|
||||
}
|
||||
this.zLevel = 0.0f;
|
||||
GL11.glEnable(2896);
|
||||
GL11.glEnable(2929);
|
||||
GlStateManager.enableLighting();
|
||||
GlStateManager.enableDepth();
|
||||
}
|
||||
|
||||
public void renderTooltip(final IPoint mousePosition, final MinecraftTooltip tooltip) {
|
||||
final int mouseX = (int) mousePosition.x();
|
||||
final int mouseY = (int) mousePosition.y();
|
||||
final FontRenderer font = this.getFontRenderer();
|
||||
GL11.glDisable(32826);
|
||||
GlStateManager.disableRescaleNormal();
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
GL11.glDisable(2896);
|
||||
GL11.glDisable(2929);
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.disableDepth();
|
||||
int k = 0;
|
||||
final List<String> strings = new ArrayList<>();
|
||||
for (final String string : tooltip.getList()) {
|
||||
@@ -175,11 +175,11 @@ public class GuiCraftGUI extends GuiContainer {
|
||||
try {
|
||||
final NBTTagCompound nbt = JsonToNBT.getTagFromJson(split);
|
||||
final ItemStack stack = ItemStack.loadItemStackFromNBT(nbt);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(i1, j1 - 1.5f, 0.0f);
|
||||
GL11.glScalef(0.6f, 0.6f, 1.0f);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(i1, j1 - 1.5f, 0.0f);
|
||||
GlStateManager.scale(0.6f, 0.6f, 1.0f);
|
||||
CraftGUIUtil.renderItem(IPoint.ZERO, stack, false);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
} catch (NBTException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -193,10 +193,10 @@ public class GuiCraftGUI extends GuiContainer {
|
||||
}
|
||||
this.zLevel = 0.0f;
|
||||
//GuiScreen.itemRender.zLevel = 0.0f;
|
||||
GL11.glEnable(2896);
|
||||
GL11.glEnable(2929);
|
||||
GlStateManager.enableLighting();
|
||||
GlStateManager.enableDepth();
|
||||
RenderHelper.enableStandardItemLighting();
|
||||
GL11.glEnable(32826);
|
||||
GlStateManager.enableRescaleNormal();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,7 +18,6 @@ import binnie.craftgui.minecraft.Window;
|
||||
import binnie.craftgui.resource.minecraft.CraftGUITexture;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class ControlEnergyBar extends Control implements ITooltip {
|
||||
public static boolean isError;
|
||||
@@ -77,7 +76,8 @@ public class ControlEnergyBar extends Control implements ITooltip {
|
||||
public void onRenderBackground(int guiWidth, int guiHeight) {
|
||||
CraftGUI.render.texture(CraftGUITexture.EnergyBarBack, this.getArea());
|
||||
final float percentage = this.getPercentage() / 100.0f;
|
||||
CraftGUI.render.colour(this.getColourFromPercentage(percentage));
|
||||
int colourFromPercentage = this.getColourFromPercentage(percentage);
|
||||
CraftGUI.render.colour(colourFromPercentage);
|
||||
final IArea area = this.getArea();
|
||||
switch (this.direction) {
|
||||
case Top:
|
||||
@@ -119,14 +119,12 @@ public class ControlEnergyBar extends Control implements ITooltip {
|
||||
}
|
||||
|
||||
public int getColourFromPercentage(final float percentage) {
|
||||
int colour = 16777215;
|
||||
if (percentage > 0.5) {
|
||||
final int r = (int) ((1.0 - 2.0 * (percentage - 0.5)) * 255.0);
|
||||
colour = (r << 16) + 65280;
|
||||
return (r << 16) + 65280;
|
||||
} else {
|
||||
final int g = (int) (255.0f * (2.0f * percentage));
|
||||
colour = 16711680 + (g << 8);
|
||||
return 16711680 + (g << 8);
|
||||
}
|
||||
return colour;
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import binnie.craftgui.core.geometry.Position;
|
||||
import binnie.craftgui.core.geometry.TextJustification;
|
||||
import binnie.craftgui.resource.Texture;
|
||||
import binnie.craftgui.resource.minecraft.CraftGUITexture;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
|
||||
public class ControlSlide extends Control {
|
||||
private IArea expanded;
|
||||
@@ -49,16 +49,16 @@ public class ControlSlide extends Control {
|
||||
texture = CraftGUI.render.getTexture(CraftGUITexture.TabOutline).crop(this.anchor.opposite(), 8);
|
||||
CraftGUI.render.texture(texture, tabArea.inset(2));
|
||||
final IArea labelArea = new IArea(-lw / 2, 0, lw, lh);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(shift.x() + this.anchor.x() * 2, shift.y() + this.anchor.y() * 2, 0);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(shift.x() + this.anchor.x() * 2, shift.y() + this.anchor.y() * 2, 0);
|
||||
if (this.anchor.x() != 0) {
|
||||
GL11.glRotatef(90.0f, 0.0f, 0.0f, this.anchor.x());
|
||||
GlStateManager.rotate(90.0f, 0.0f, 0.0f, this.anchor.x());
|
||||
}
|
||||
if (this.anchor.y() > 0) {
|
||||
GL11.glTranslatef(0.0f, -lh, 0.0f);
|
||||
GlStateManager.translate(0.0f, -lh, 0.0f);
|
||||
}
|
||||
CraftGUI.render.text(labelArea, TextJustification.MiddleCenter, this.label, 16777215);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
CraftGUI.render.texture(CraftGUITexture.Window, this.getArea());
|
||||
final Object slideTexture = (this.anchor == Position.Bottom) ? CraftGUITexture.SlideDown : ((this.anchor == Position.Top) ? CraftGUITexture.SlideUp : ((this.anchor == Position.Left) ? CraftGUITexture.SlideLeft : CraftGUITexture.SlideRight));
|
||||
|
||||
@@ -9,7 +9,7 @@ public class BlockDrinkRenderer //implements ISimpleBlockRenderingHandler
|
||||
//
|
||||
// @Override
|
||||
// public boolean renderWorldBlock(final IBlockAccess world, final int x, final int y, final int z, final Block block, final int modelId, final RenderBlocks renderer) {
|
||||
// GL11.glPushMatrix();
|
||||
// GlStateManager.pushMatrix();
|
||||
// Tessellator.instance.setColorRGBA(255, 255, 255, 150);
|
||||
// final Tessellator tess = Tessellator.instance;
|
||||
// renderer.renderFaceYPos(block, x, y, z, Blocks.dirt.getIcon(0, 0));
|
||||
@@ -24,7 +24,7 @@ public class BlockDrinkRenderer //implements ISimpleBlockRenderingHandler
|
||||
// tess.addVertexWithUV(x + 0.5f + d1, y + h3, z + 0.5f - d1, 0.0, 0.0);
|
||||
// tess.addVertexWithUV(x + 0.5f + d1, y + h2, z + 0.5f - d1, 0.0, 0.0);
|
||||
// }
|
||||
// GL11.glPopMatrix();
|
||||
// GlStateManager.popMatrix();
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
|
||||
@@ -4,7 +4,7 @@ public class CocktailRenderer //implements IItemRenderer
|
||||
{
|
||||
// private void renderCocktail(final RenderBlocks renderBlocks, final ItemStack item, final float p, final float q, final float r) {
|
||||
// final RenderItem renderItem = new RenderItem();
|
||||
// GL11.glEnable(3042);
|
||||
// GlStateManager.enableBlend();
|
||||
// GL11.glBlendFunc(770, 771);
|
||||
// final Glassware glass = ExtraTrees.drink.getGlassware(item);
|
||||
// final FluidStack fluid = ExtraTrees.drink.getFluid(item);
|
||||
@@ -31,7 +31,7 @@ public class CocktailRenderer //implements IItemRenderer
|
||||
// tessellator.addVertexWithUV(x + 0.0f, y + 0.0f, renderItem.zLevel, icon.getMinU(), minV);
|
||||
// tessellator.draw();
|
||||
// }
|
||||
// GL11.glDisable(3042);
|
||||
// GlStateManager.disableBlend();
|
||||
// }
|
||||
//
|
||||
// private void setColor(final int i1, final float alpha) {
|
||||
@@ -86,7 +86,7 @@ public class CocktailRenderer //implements IItemRenderer
|
||||
// case EQUIPPED:
|
||||
// case EQUIPPED_FIRST_PERSON: {
|
||||
// if (type == IItemRenderer.ItemRenderType.ENTITY) {
|
||||
// GL11.glTranslatef(-0.5f, -0.25f, -0.0f);
|
||||
// GlStateManager.translate(-0.5f, -0.25f, -0.0f);
|
||||
// }
|
||||
// final TextureManager texturemanager = BinnieCore.proxy.getMinecraftInstance().getTextureManager();
|
||||
// final Glassware glass = ExtraTrees.drink.getGlassware(item);
|
||||
|
||||
@@ -18,7 +18,7 @@ public class GateItemRenderer //implements IItemRenderer
|
||||
// if (k == 2) {
|
||||
// renderBlocks.setRenderBounds(0.5f - f2, 0.5, 0.0, 0.5f + f2, 1.0f - f2, 1.0);
|
||||
// }
|
||||
// GL11.glTranslatef(-0.5f, -0.5f, -0.5f);
|
||||
// GlStateManager.translate(-0.5f, -0.5f, -0.5f);
|
||||
// tessellator.startDrawingQuads();
|
||||
// tessellator.setNormal(0.0f, -1.0f, 0.0f);
|
||||
// renderBlocks.renderFaceYNeg(block, 0.0, 0.0, 0.0, renderBlocks.getBlockIconFromSideAndMetadata(block, 0, item.getItemDamage()));
|
||||
@@ -43,7 +43,7 @@ public class GateItemRenderer //implements IItemRenderer
|
||||
// tessellator.setNormal(1.0f, 0.0f, 0.0f);
|
||||
// renderBlocks.renderFaceXPos(block, 0.0, 0.0, 0.0, renderBlocks.getBlockIconFromSideAndMetadata(block, 5, item.getItemDamage()));
|
||||
// tessellator.draw();
|
||||
// GL11.glTranslatef(0.5f, 0.5f, 0.5f);
|
||||
// GlStateManager.translate(0.5f, 0.5f, 0.5f);
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ public class FenceRenderer //implements ISimpleBlockRenderingHandler
|
||||
// }
|
||||
// }
|
||||
// renderer.setRenderBoundsFromBlock(block);
|
||||
// GL11.glTranslatef(-0.5f, -0.5f, -0.5f);
|
||||
// GlStateManager.translate(-0.5f, -0.5f, -0.5f);
|
||||
// tess.startDrawingQuads();
|
||||
// tess.setNormal(0.0f, -1.0f, 0.0f);
|
||||
// renderer.renderFaceYNeg(block, 0.0, 0.0, 0.0, block.getIcon(0, metadata));
|
||||
@@ -117,7 +117,7 @@ public class FenceRenderer //implements ISimpleBlockRenderingHandler
|
||||
// tess.setNormal(1.0f, 0.0f, 0.0f);
|
||||
// renderer.renderFaceZPos(block, 0.0, 0.0, 0.0, block.getIcon(5, metadata));
|
||||
// tess.draw();
|
||||
// GL11.glTranslatef(0.5f, 0.5f, 0.5f);
|
||||
// GlStateManager.translate(0.5f, 0.5f, 0.5f);
|
||||
// }
|
||||
// block.setBlockBounds(0.0f, 0.0f, 0.0f, 1.0f, 1.0f, 1.0f);
|
||||
// renderer.setRenderBoundsFromBlock(block);
|
||||
|
||||
@@ -11,7 +11,7 @@ public class HedgeRenderer //implements ISimpleBlockRenderingHandler
|
||||
// GL11.glColor3f(r / 255.0f, g / 255.0f, b / 255.0f);
|
||||
// renderer.setRenderBounds(0.25, 0.0, 0.25, 0.75, 1.0, 0.75);
|
||||
// final Tessellator tess = Tessellator.instance;
|
||||
// GL11.glTranslatef(-0.5f, -0.5f, -0.5f);
|
||||
// GlStateManager.translate(-0.5f, -0.5f, -0.5f);
|
||||
// tess.startDrawingQuads();
|
||||
// tess.setNormal(0.0f, -1.0f, 0.0f);
|
||||
// renderer.renderFaceYNeg(block, 0.0, 0.0, 0.0, block.getIcon(0, metadata));
|
||||
@@ -36,7 +36,7 @@ public class HedgeRenderer //implements ISimpleBlockRenderingHandler
|
||||
// tess.setNormal(1.0f, 0.0f, 0.0f);
|
||||
// renderer.renderFaceZPos(block, 0.0, 0.0, 0.0, block.getIcon(5, metadata));
|
||||
// tess.draw();
|
||||
// GL11.glTranslatef(0.5f, 0.5f, 0.5f);
|
||||
// GlStateManager.translate(0.5f, 0.5f, 0.5f);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
@@ -47,7 +47,7 @@ public class HedgeRenderer //implements ISimpleBlockRenderingHandler
|
||||
// final boolean connectPosX = hedge.canConnectFenceTo(world, x + 1, y, z);
|
||||
// final boolean connectNegZ = hedge.canConnectFenceTo(world, x, y, z - 1);
|
||||
// final boolean connectPosZ = hedge.canConnectFenceTo(world, x, y, z + 1);
|
||||
// GL11.glPushMatrix();
|
||||
// GlStateManager.pushMatrix();
|
||||
// renderer.setRenderBounds(0.25, 0.0, 0.25, 0.75, 1.0, 0.75);
|
||||
// renderer.renderStandardBlock(block, x, y, z);
|
||||
// renderer.renderFaceYPos(block, x, y, z, icon);
|
||||
@@ -96,7 +96,7 @@ public class HedgeRenderer //implements ISimpleBlockRenderingHandler
|
||||
// renderer.renderFaceXNeg(block, x, y, z, icon);
|
||||
// renderer.renderFaceXPos(block, x, y, z, icon);
|
||||
// }
|
||||
// GL11.glPopMatrix();
|
||||
// GlStateManager.popMatrix();
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
|
||||
@@ -36,8 +36,8 @@ public class MachineRendererKitchen {
|
||||
// }
|
||||
// tess.startDrawingQuads();
|
||||
// tess.draw();
|
||||
// GL11.glPushMatrix();
|
||||
// GL11.glTranslated(x + 0.5, y + 1.0, z + 0.5);
|
||||
// GlStateManager.pushMatrix();
|
||||
// GlStateManager.translate(x + 0.5, y + 1.0, z + 0.5);
|
||||
// RenderManager.instance.renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
// final float ux = icon.getMinU();
|
||||
// final float uy = icon.getMinV();
|
||||
@@ -60,9 +60,9 @@ public class MachineRendererKitchen {
|
||||
// ang += 0.05f;
|
||||
// }
|
||||
// for (int angle = 0; angle < 360; angle += 90) {
|
||||
// GL11.glPushMatrix();
|
||||
// GL11.glRotatef(angle, 0.0f, 1.0f, 0.0f);
|
||||
// GL11.glTranslatef(-0.5f, 0.0f, 0.0f);
|
||||
// GlStateManager.pushMatrix();
|
||||
// GlStateManager.rotate(angle, 0.0f, 1.0f, 0.0f);
|
||||
// GlStateManager.translate(-0.5f, 0.0f, 0.0f);
|
||||
// tess.startDrawingQuads();
|
||||
// tess.setColorRGBA(255, 255, 255, 150);
|
||||
// tess.addVertexWithUV(half - d1 * ang, h2, -d1 * ang, 0.0, 0.0);
|
||||
@@ -76,10 +76,10 @@ public class MachineRendererKitchen {
|
||||
// tess.addVertexWithUV(half - d2 * ang, h3, -d2 * ang, 0.0, 0.0);
|
||||
// tess.addVertexWithUV(half - d1 * ang, h2, -d1 * ang, 0.0, 0.0);
|
||||
// tess.draw();
|
||||
// GL11.glPopMatrix();
|
||||
// GlStateManager.popMatrix();
|
||||
// }
|
||||
// }
|
||||
// GL11.glPopMatrix();
|
||||
// GlStateManager.popMatrix();
|
||||
// if (wasTessellating) {
|
||||
// tess.startDrawingQuads();
|
||||
// }
|
||||
|
||||
@@ -4,7 +4,7 @@ import binnie.core.BinnieCore;
|
||||
import binnie.core.resource.BinnieResource;
|
||||
import binnie.core.resource.ResourceType;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
|
||||
public class MachineRendererNursery {
|
||||
public static MachineRendererNursery instance = new MachineRendererNursery();
|
||||
@@ -19,12 +19,12 @@ public class MachineRendererNursery {
|
||||
|
||||
public void renderMachine(final BinnieResource texture, final double x, final double y, final double z, final float var8) {
|
||||
this.texture = texture;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(x + 0.5, y, z + 0.5);
|
||||
GL11.glScaled(0.05, 0.05, 0.05);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(x + 0.5, y, z + 0.5);
|
||||
GlStateManager.scale(0.05, 0.05, 0.05);
|
||||
BinnieCore.proxy.bindTexture(new BinnieResource(ExtraTrees.instance, ResourceType.Tile, "test.png"));
|
||||
//this.casinoMachine.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -31,10 +31,10 @@ public class AnalystPageAppearance extends ControlAnalystPage {
|
||||
new ControlIconDisplay(this, (this.w() - w) / 2, y - ((sections == 1) ? 0 : 0), null) {
|
||||
@Override
|
||||
public void onRenderForeground(int guiWidth, int guiHeight) {
|
||||
// GL11.glPushMatrix();
|
||||
// GlStateManager.pushMatrix();
|
||||
// final float scale = w / 16.0f;
|
||||
// final float dy = (sections > 1) ? 16.0f : 0.0f;
|
||||
// GL11.glScalef(scale, scale, 1.0f);
|
||||
// GlStateManager.scale(scale, scale, 1.0f);
|
||||
// CraftGUI.Render.colour(ind.getGenome().getStemColor().getColor(false));
|
||||
// if (sections > 1) {
|
||||
// CraftGUI.Render.iconBlock(IPoint.ZERO, ind.getGenome().getType().getStem(EnumFlowerStage.FLOWER, true, 1));
|
||||
@@ -50,7 +50,7 @@ public class AnalystPageAppearance extends ControlAnalystPage {
|
||||
// CraftGUI.Render.iconBlock(IPoint.ZERO, ind.getGenome().getType().getVariantIcon(EnumFlowerStage.FLOWER, true, 1));
|
||||
// }
|
||||
// CraftGUI.Render.iconBlock(new IPoint(0, dy), ind.getGenome().getType().getVariantIcon(EnumFlowerStage.FLOWER, true, 0));
|
||||
// GL11.glPopMatrix();
|
||||
// GlStateManager.popMatrix();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IChromosomeType;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import forestry.api.genetics.ISpeciesRoot;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
|
||||
public class AnalystPageGenome extends ControlAnalystPage {
|
||||
boolean active;
|
||||
@@ -32,14 +32,14 @@ public class AnalystPageGenome extends ControlAnalystPage {
|
||||
final Control scaled = new Control(this, 0, y, 0, 0) {
|
||||
@Override
|
||||
public void onRenderBackground(int guiWidth, int guiHeight) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(10.0f, -15.0f, 0.0f);
|
||||
GL11.glScalef(0.9f, 0.95f, 1.0f);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(10.0f, -15.0f, 0.0f);
|
||||
GlStateManager.scale(0.9f, 0.95f, 1.0f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRenderForeground(int guiWidth, int guiHeight) {
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
};
|
||||
for (final IChromosomeType chromo : system.getActiveKaryotype()) {
|
||||
|
||||
@@ -4,17 +4,17 @@ import binnie.core.BinnieCore;
|
||||
import binnie.core.machines.Machine;
|
||||
import binnie.core.machines.component.IRender;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class MachineRendererGenetics {
|
||||
public static MachineRendererGenetics instance = new MachineRendererGenetics();
|
||||
|
||||
public void renderMachine(Machine machine, double x, double y, double z, float partialTicks, int destroyStage) {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
int i1 = 0;
|
||||
BlockPos pos = machine.getTileEntity().getPos();
|
||||
final int ix = pos.getX();
|
||||
@@ -24,17 +24,15 @@ public class MachineRendererGenetics {
|
||||
i1 = ix * iy * iz + ix * iy - ix * iz + iy * iz - ix + iy - iz;
|
||||
}
|
||||
final float phase = (float) Math.max(0.0, Math.sin((System.currentTimeMillis() + i1) * 0.003));
|
||||
GL11.glTranslated(x + 0.5, y + 1.5, z + 0.5);
|
||||
GL11.glRotatef(180.0f, 0.0f, 0.0f, 1.0f);
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.translate(x + 0.5, y + 1.5, z + 0.5);
|
||||
GlStateManager.rotate(180.0f, 0.0f, 0.0f, 1.0f);
|
||||
BinnieCore.proxy.getMinecraftInstance();
|
||||
if (Minecraft.isFancyGraphicsEnabled()) {
|
||||
for (IRender.Render render : machine.getInterfaces(IRender.Render.class)) {
|
||||
render.renderInWorld(x, y, z);
|
||||
}
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,10 +1,9 @@
|
||||
package binnie.genetics.machine;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import binnie.core.BinnieCore;
|
||||
import binnie.core.machines.Machine;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -28,7 +27,7 @@ public class MachineRendererLab {
|
||||
}
|
||||
|
||||
public void renderMachine(Machine machine, double x, double y, double z, float partialTicks, int destroyStage) {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
int i1 = 0;
|
||||
BlockPos pos = machine.getTileEntity().getPos();
|
||||
int ix = pos.getX();
|
||||
@@ -38,8 +37,8 @@ public class MachineRendererLab {
|
||||
i1 = ix * iy * iz + ix * iy - ix * iz + iy * iz - ix + iy - iz;
|
||||
}
|
||||
float phase = (float) Math.max(0.0, Math.sin((System.currentTimeMillis() + i1) * 0.003));
|
||||
GL11.glTranslated(x + 0.5, y + 1.5, z + 0.5);
|
||||
GL11.glRotatef(180.0f, 0.0f, 0.0f, 1.0f);
|
||||
GlStateManager.translate(x + 0.5, y + 1.5, z + 0.5);
|
||||
GlStateManager.rotate(180.0f, 0.0f, 0.0f, 1.0f);
|
||||
World world = machine.getWorld();
|
||||
LaboratoryMachine.ComponentGUIHolder holder = Machine.getInterface(LaboratoryMachine.ComponentGUIHolder.class, machine);
|
||||
Label_0591: {
|
||||
@@ -53,33 +52,33 @@ public class MachineRendererLab {
|
||||
this.lastTick = world.getTotalWorldTime();
|
||||
this.dummyEntityItem.onUpdate();
|
||||
}
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
final EntityPlayer player = BinnieCore.proxy.getPlayer();
|
||||
final double dx = ix + 0.5 - player.lastTickPosX;
|
||||
final double dz = iz + 0.5 - player.lastTickPosZ;
|
||||
final double t = Math.atan2(dz, dx) * 180.0 / 3.1415;
|
||||
GL11.glRotatef(90.0f, 1.0f, 0.0f, 0.0f);
|
||||
GL11.glTranslatef(0.0f, 0.0f, -0.55f);
|
||||
GL11.glRotatef(90.0f + (float) (-t), 0.0f, 0.0f, 1.0f);
|
||||
GL11.glTranslatef(0.0f, -0.125f, 0.0f);
|
||||
GL11.glScalef(1.2f, 1.2f, 1.2f);
|
||||
GL11.glRotatef(45.0f, 1.0f, 0.0f, 0.0f);
|
||||
GL11.glTranslatef(0.0f, 0.1f, 0.1f);
|
||||
GlStateManager.rotate(90.0f, 1.0f, 0.0f, 0.0f);
|
||||
GlStateManager.translate(0.0f, 0.0f, -0.55f);
|
||||
GlStateManager.rotate(90.0f + (float) (-t), 0.0f, 0.0f, 1.0f);
|
||||
GlStateManager.translate(0.0f, -0.125f, 0.0f);
|
||||
GlStateManager.scale(1.2f, 1.2f, 1.2f);
|
||||
GlStateManager.rotate(45.0f, 1.0f, 0.0f, 0.0f);
|
||||
GlStateManager.translate(0.0f, 0.1f, 0.1f);
|
||||
RenderManager renderManager = BinnieCore.proxy.getMinecraftInstance().getRenderManager();
|
||||
renderManager.doRenderEntity(this.dummyEntityItem, 0.0, 0.0, 0.0, 0.0f, 0.0f, false);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
int rot = 0;
|
||||
for (EntityItem item : this.itemSides) {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
item.worldObj = world;
|
||||
item.setEntityItemStack(stack);
|
||||
GL11.glRotatef(rot, 0.0f, 1.0f, 0.0f);
|
||||
GL11.glRotatef(180.0f, 1.0f, 0.0f, 0.0f);
|
||||
GL11.glTranslated(0.0, -1.13, 0.4);
|
||||
GL11.glScalef(0.8f, 0.8f, 0.8f);
|
||||
GlStateManager.rotate(rot, 0.0f, 1.0f, 0.0f);
|
||||
GlStateManager.rotate(180.0f, 1.0f, 0.0f, 0.0f);
|
||||
GlStateManager.translate(0.0, -1.13, 0.4);
|
||||
GlStateManager.scale(0.8f, 0.8f, 0.8f);
|
||||
renderManager.doRenderEntity(item, 0.0, 0.0, 0.0, 0.0f, 0.0f, false);
|
||||
rot += 90;
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
break Label_0591;
|
||||
}
|
||||
@@ -89,7 +88,7 @@ public class MachineRendererLab {
|
||||
item2.setEntityItemStack((ItemStack) null);
|
||||
}
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import binnie.core.machines.MachineComponent;
|
||||
import binnie.core.machines.component.IRender;
|
||||
import binnie.core.machines.network.INetwork;
|
||||
import net.minecraft.client.particle.Particle;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -15,7 +16,6 @@ import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
@@ -82,11 +82,11 @@ public class AnalyserFX extends MachineComponent implements IRender.DisplayTick,
|
||||
final double dx = x + 0.5 - player.lastTickPosX;
|
||||
final double dz = z + 0.5 - player.lastTickPosZ;
|
||||
final double t = Math.atan2(dz, dx) * 180.0 / 3.1415;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180.0f, 0.0f, 0.0f, 1.0f);
|
||||
GL11.glTranslatef(0.0f, -0.2f, 0.0f);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.rotate(180.0f, 0.0f, 0.0f, 1.0f);
|
||||
GlStateManager.translate(0.0f, -0.2f, 0.0f);
|
||||
BinnieCore.proxy.getMinecraftInstance().getRenderItem().renderItem(dummyEntityItem.getEntityItem(), ItemCameraTransforms.TransformType.FIXED);//doRender(this.dummyEntityItem.getEntityItem(), 0.0, 0.0, 0.0, 0.0f, 0.0f);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -6,6 +6,7 @@ import binnie.core.machines.MachineComponent;
|
||||
import binnie.core.machines.component.IRender;
|
||||
import binnie.core.machines.network.INetwork;
|
||||
import net.minecraft.client.particle.Particle;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -15,7 +16,6 @@ import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
@@ -93,11 +93,11 @@ public class InoculatorFX extends MachineComponent implements IRender.DisplayTic
|
||||
final double dx = x + 0.5 - player.lastTickPosX;
|
||||
final double dz = z + 0.5 - player.lastTickPosZ;
|
||||
final double t = Math.atan2(dz, dx) * 180.0 / 3.1415;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180.0f, 0.0f, 0.0f, 1.0f);
|
||||
GL11.glTranslatef(0.0f, -0.25f, 0.0f);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.rotate(180.0f, 0.0f, 0.0f, 1.0f);
|
||||
GlStateManager.translate(0.0f, -0.25f, 0.0f);
|
||||
BinnieCore.proxy.getMinecraftInstance().getRenderItem().renderItem(this.dummyEntityItem.getEntityItem(), ItemCameraTransforms.TransformType.FIXED); //, 0.0, 0.0, 0.0, 0.0f, 0.0f);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
package binnie.genetics.machine.splicer;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import binnie.core.BinnieCore;
|
||||
import binnie.core.machines.IMachine;
|
||||
import binnie.core.machines.MachineComponent;
|
||||
import binnie.core.machines.component.IRender;
|
||||
import binnie.core.machines.network.INetwork;
|
||||
import net.minecraft.client.particle.Particle;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -20,6 +17,8 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class SplicerFX extends MachineComponent implements IRender.DisplayTick, IRender.Render, INetwork.TilePacketSync {
|
||||
private final EntityItem dummyEntityItem;
|
||||
|
||||
@@ -88,11 +87,11 @@ public class SplicerFX extends MachineComponent implements IRender.DisplayTick,
|
||||
final double dx = x + 0.5 - player.lastTickPosX;
|
||||
final double dz = z + 0.5 - player.lastTickPosZ;
|
||||
final double t = Math.atan2(dz, dx) * 180.0 / 3.1415;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180.0f, 0.0f, 0.0f, 1.0f);
|
||||
GL11.glTranslatef(0.0f, -0.25f, 0.0f);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.rotate(180.0f, 0.0f, 0.0f, 1.0f);
|
||||
GlStateManager.translate(0.0f, -0.25f, 0.0f);
|
||||
BinnieCore.proxy.getMinecraftInstance().getRenderItem().renderItem(dummyEntityItem.getEntityItem(), ItemCameraTransforms.TransformType.FIXED);//doRender(this.dummyEntityItem, 0.0, 0.0, 0.0, 0.0f, 0.0f);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user