mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-27 23:33:11 +00:00
Lots of things. Read the description.
-Redid item and block unlocalized names to include the MODID -Revamped the ConfigGUI -Localize everything except Thaumonomicon titles -Fix config GUI refreshing config on change. -Fix custom mob drops -Make some tooltips easier to read -Organize Item/Block registry order to make things flow
This commit is contained in:
1 parent
121203da31
commit
cc08a6a8cb
121 files changed
+6705
-6529
No files matched your search
@@ -9,83 +9,84 @@
|
||||
* Electro-Magic Tools is a derivative work on Thaumcraft 4 (c) Azanor 2012.
|
||||
* http://www.minecraftforum.net/topic/1585216-
|
||||
******************************************************************************/
|
||||
|
||||
package tombenpotter.emt.client.renderer;
|
||||
|
||||
import tombenpotter.emt.ElectroMagicTools;
|
||||
import tombenpotter.emt.common.module.base.entities.EntityLaser;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
import tombenpotter.emt.ModInformation;
|
||||
import tombenpotter.emt.common.module.base.entities.EntityLaser;
|
||||
|
||||
public class RenderLaser extends Render {
|
||||
|
||||
private static final ResourceLocation laserTexture = new ResourceLocation(ElectroMagicTools.texturePath, "textures/models/lasermodel.png");
|
||||
private static final ResourceLocation laserTexture = new ResourceLocation(ModInformation.texturePath, "textures/models/lasermodel.png");
|
||||
|
||||
public void renderArrow(EntityLaser entityLaser, double par2, double par4, double par6, float par8, float par9) {
|
||||
public void renderArrow(EntityLaser entityLaser, double par2, double par4, double par6, float par8, float par9) {
|
||||
|
||||
this.bindEntityTexture(entityLaser);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) par2, (float) par4, (float) par6);
|
||||
GL11.glRotatef(entityLaser.prevRotationYaw + (entityLaser.rotationYaw - entityLaser.prevRotationYaw) * par9 - 90.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(entityLaser.prevRotationPitch + (entityLaser.rotationPitch - entityLaser.prevRotationPitch) * par9, 0.0F, 0.0F, 1.0F);
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
byte b0 = 0;
|
||||
float f2 = 0.4F;
|
||||
float f3 = 0.7F;
|
||||
float f4 = (float) (0 + b0 * 10) / 32.0F;
|
||||
float f5 = (float) (5 + b0 * 10) / 32.0F;
|
||||
float f6 = 0.0F;
|
||||
float f7 = 0.15625F;
|
||||
float f8 = (float) (5 + b0 * 10) / 32.0F;
|
||||
float f9 = (float) (10 + b0 * 10) / 32.0F;
|
||||
float f10 = 0.05625F;
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
this.bindEntityTexture(entityLaser);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) par2, (float) par4, (float) par6);
|
||||
GL11.glRotatef(entityLaser.prevRotationYaw + (entityLaser.rotationYaw - entityLaser.prevRotationYaw) * par9 - 90.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(entityLaser.prevRotationPitch + (entityLaser.rotationPitch - entityLaser.prevRotationPitch) * par9, 0.0F, 0.0F, 1.0F);
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
byte b0 = 0;
|
||||
float f2 = 0.4F;
|
||||
float f3 = 0.7F;
|
||||
float f4 = (float) (0 + b0 * 10) / 32.0F;
|
||||
float f5 = (float) (5 + b0 * 10) / 32.0F;
|
||||
float f6 = 0.0F;
|
||||
float f7 = 0.15625F;
|
||||
float f8 = (float) (5 + b0 * 10) / 32.0F;
|
||||
float f9 = (float) (10 + b0 * 10) / 32.0F;
|
||||
float f10 = 0.05625F;
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
|
||||
GL11.glRotatef(45.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glScalef(f10, f10, f10);
|
||||
GL11.glTranslatef(-4.0F, 0.0F, 0.0F);
|
||||
GL11.glNormal3f(f10, 0.0F, 0.0F);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double) f6, (double) f8);
|
||||
tessellator.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double) f7, (double) f8);
|
||||
tessellator.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double) f7, (double) f9);
|
||||
tessellator.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double) f6, (double) f9);
|
||||
tessellator.draw();
|
||||
GL11.glNormal3f(-f10, 0.0F, 0.0F);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double) f6, (double) f8);
|
||||
tessellator.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double) f7, (double) f8);
|
||||
tessellator.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double) f7, (double) f9);
|
||||
tessellator.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double) f6, (double) f9);
|
||||
tessellator.draw();
|
||||
GL11.glRotatef(45.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glScalef(f10, f10, f10);
|
||||
GL11.glTranslatef(-4.0F, 0.0F, 0.0F);
|
||||
GL11.glNormal3f(f10, 0.0F, 0.0F);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double) f6, (double) f8);
|
||||
tessellator.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double) f7, (double) f8);
|
||||
tessellator.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double) f7, (double) f9);
|
||||
tessellator.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double) f6, (double) f9);
|
||||
tessellator.draw();
|
||||
GL11.glNormal3f(-f10, 0.0F, 0.0F);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.addVertexWithUV(-7.0D, 2.0D, -2.0D, (double) f6, (double) f8);
|
||||
tessellator.addVertexWithUV(-7.0D, 2.0D, 2.0D, (double) f7, (double) f8);
|
||||
tessellator.addVertexWithUV(-7.0D, -2.0D, 2.0D, (double) f7, (double) f9);
|
||||
tessellator.addVertexWithUV(-7.0D, -2.0D, -2.0D, (double) f6, (double) f9);
|
||||
tessellator.draw();
|
||||
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glNormal3f(0.0F, 0.0F, f10);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.addVertexWithUV(-8.0D, -2.0D, 0.0D, (double) f2, (double) f4);
|
||||
tessellator.addVertexWithUV(8.0D, -2.0D, 0.0D, (double) f3, (double) f4);
|
||||
tessellator.addVertexWithUV(8.0D, 2.0D, 0.0D, (double) f3, (double) f5);
|
||||
tessellator.addVertexWithUV(-8.0D, 2.0D, 0.0D, (double) f2, (double) f5);
|
||||
tessellator.draw();
|
||||
}
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
GL11.glRotatef(90.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glNormal3f(0.0F, 0.0F, f10);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.addVertexWithUV(-8.0D, -2.0D, 0.0D, (double) f2, (double) f4);
|
||||
tessellator.addVertexWithUV(8.0D, -2.0D, 0.0D, (double) f3, (double) f4);
|
||||
tessellator.addVertexWithUV(8.0D, 2.0D, 0.0D, (double) f3, (double) f5);
|
||||
tessellator.addVertexWithUV(-8.0D, 2.0D, 0.0D, (double) f2, (double) f5);
|
||||
tessellator.draw();
|
||||
}
|
||||
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
protected ResourceLocation getArrowTextures(EntityLaser entityLaser) {
|
||||
return laserTexture;
|
||||
}
|
||||
protected ResourceLocation getArrowTextures(EntityLaser entityLaser) {
|
||||
return laserTexture;
|
||||
}
|
||||
|
||||
protected ResourceLocation getEntityTexture(Entity par1Entity) {
|
||||
return this.getArrowTextures((EntityLaser) par1Entity);
|
||||
}
|
||||
protected ResourceLocation getEntityTexture(Entity par1Entity) {
|
||||
return this.getArrowTextures((EntityLaser) par1Entity);
|
||||
}
|
||||
|
||||
public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) {
|
||||
this.renderArrow((EntityLaser) par1Entity, par2, par4, par6, par8, par9);
|
||||
}
|
||||
public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) {
|
||||
this.renderArrow((EntityLaser) par1Entity, par2, par4, par6, par8, par9);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user