This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package me.jezzadabomb.es2.common.entities; | |
| import java.util.ArrayList; | |
| import cofh.api.energy.EnergyStorage; | |
| import cofh.api.energy.IEnergyHandler; | |
| import cpw.mods.fml.common.registry.GameRegistry; | |
| import me.jezzadabomb.es2.common.ModBlocks; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static int getCurrentMousedOverSide(EntityPlayer player) { | |
| MovingObjectPosition mouseOver = getCurrentMovingObjectPosition(player); | |
| return mouseOver == null ? 0 : mouseOver.sideHit; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static MovingObjectPosition getCurrentMovingObjectPosition(EntityPlayer player) { | |
| double distance = player.capabilities.isCreativeMode ? 5.0F : 4.5F; | |
| Vec3 posVec = Vec3.createVectorHelper(player.posX, player.posY, player.posZ); | |
| Vec3 lookVec = player.getLook(1); | |
| posVec.yCoord += player.getEyeHeight(); | |
| lookVec = posVec.addVector(lookVec.xCoord * distance, lookVec.yCoord * distance, lookVec.zCoord * distance); | |
| return player.worldObj.clip(posVec, lookVec); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void drawTextInAir(double x, double y, double z, double partialTicks, String text) { | |
| if ((Minecraft.getMinecraft().renderViewEntity instanceof EntityPlayer)) { | |
| EntityPlayer player = (EntityPlayer) Minecraft.getMinecraft().renderViewEntity; | |
| double iPX = player.prevPosX + (player.posX - player.prevPosX) * partialTicks; | |
| double iPY = player.prevPosY + (player.posY - player.prevPosY) * partialTicks; | |
| double iPZ = player.prevPosZ + (player.posZ - player.prevPosZ) * partialTicks; | |
| GL11.glPushMatrix(); | |
| GL11.glTranslated(-iPX + x + 0.5D, -iPY + y + 1.5D, -iPZ + z + 0.5D); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package me.jezzadabomb.es2.client.tickers; | |
| import static org.lwjgl.opengl.GL11.*; | |
| import java.util.ArrayList; | |
| import java.util.EnumSet; | |
| import me.jezzadabomb.es2.common.core.ESLogger; | |
| import me.jezzadabomb.es2.common.hud.StoredQueues; | |
| import me.jezzadabomb.es2.common.packets.InventoryPacket; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void drawGuiAtXYZ(InventoryPacket p) { | |
| //System.out.println("Rendering: " + p); | |
| glPushMatrix(); | |
| glTranslatef((float) p.x - 0.5F, (float) p.y + 1.5F, (float) p.z - 0.5F); | |
| glColor4f(0.25F, 0.25F, 0.25F, 0.0F); | |
| glBegin(GL_QUADS); | |
| glVertex3f(0.0F, 0.0F, 1.0F); | |
| glVertex3f(0.0F, 2.0F, 3.0F); | |
| glVertex3f(2.0F, 2.0F, 5.0F); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| glPushMatrix(); | |
| glTranslatef((float) p.x + 0.5F, (float) p.y + 1.5F, (float) p.z + 0.5F); | |
| glColor4f(0.25F, 0.25F, 0.25F, 0.5F); | |
| glBegin(GL_QUADS); | |
| glVertex3f(0.0F, 0.0F, 0.0F); | |
| glVertex3f(0.0F, 100.0F, 0.0F); | |
| glVertex3f(100.0F, 100.0F, 0.0F); | |
| glVertex3f(100.0F, 0.0F, 0.0F); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package me.jezzadabomb.es2.client.tickers; | |
| import static org.lwjgl.opengl.GL11.*; | |
| import java.util.ArrayList; | |
| import java.util.EnumSet; | |
| import me.jezzadabomb.es2.common.core.ESLogger; | |
| import me.jezzadabomb.es2.common.hud.StoredQueues; | |
| import me.jezzadabomb.es2.common.packets.InventoryPacket; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| GL11.glPushMatrix(); | |
| GL11.glTranslatef((float) p.x + 0.5F, (float) p.y + 1.5F, (float) p.z + 0.5F); | |
| GL11.glColor4f(0.25F, 0.25F, 0.25F, 0.5F); | |
| GL11.glBegin(GL11.GL_QUADS); | |
| GL11.glVertex3f(0.0F, 0.0F, 0.0F); | |
| GL11.glVertex3f(0.0F, 1.0F, 0.0F); | |
| GL11.glVertex3f(1.0F, 1.0F, 0.0F); | |
| GL11.glVertex3f(1.0F, 0.0F, 0.0F); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| GL11.glPushMatrix(); | |
| GL11.glTranslatef((float) p.x + 0.5F, (float) p.y + 1.5F, (float) p.z + 0.5F); | |
| GL11.glColor4f(0.25F, 0.25F, 0.25F, 0.5F); | |
| GL11.glBegin(GL11.GL_QUADS); | |
| GL11.glVertex3f(0.0F, 0.0F, 0.0F); | |
| GL11.glVertex3f(1.0F, 0.0F, 0.0F); | |
| GL11.glVertex3f(0.0F, 1.0F, 0.0F); | |
| GL11.glVertex3f(1.0F, 1.0F, 0.0F); |