diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2018-05-24 16:03:42 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2018-05-24 16:03:42 -0400 |
| commit | 9a4d1e95ea7784f0f98ea2913701a3a3c28aefaa (patch) | |
| tree | b4307f58fe2197d2215707bb3f44cf8952229c6d /src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityShadowEyeRender.java | |
| parent | 4f7ad220df0438b6f3382110577b53f29da46453 (diff) | |
Formatting pass
Diffstat (limited to 'src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityShadowEyeRender.java')
| -rwxr-xr-x | src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityShadowEyeRender.java | 52 |
1 files changed, 32 insertions, 20 deletions
diff --git a/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityShadowEyeRender.java b/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityShadowEyeRender.java index 60277a2..5e191ec 100755 --- a/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityShadowEyeRender.java +++ b/src/main/java/darkknight/jewelrycraft/tileentity/renders/TileEntityShadowEyeRender.java @@ -19,8 +19,8 @@ import net.minecraft.util.ResourceLocation; import net.minecraft.world.World;
public class TileEntityShadowEyeRender extends TileEntitySpecialRenderer {
- ModelShadowEye eye = new ModelShadowEye();
- Sphere shadow = new Sphere();
+ ModelShadowEye eye = new ModelShadowEye();
+ Sphere shadow = new Sphere();
/**
* @param te
@@ -36,11 +36,12 @@ public class TileEntityShadowEyeRender extends TileEntitySpecialRenderer { GL11.glTranslatef((float) x + 0.5F, (float) y + 1.6F,
(float) z + 0.5F);
TileEntityShadowEye eyeS = (TileEntityShadowEye) te;
- String texture =
- "textures/tileentities/ShadowEye" + eyeS.opening + ".png";
- ResourceLocation blockTexture =
- new ResourceLocation(Variables.MODID, texture);
- Minecraft.getMinecraft().renderEngine.bindTexture(blockTexture);
+ String texture = "textures/tileentities/ShadowEye"
+ + eyeS.opening + ".png";
+ ResourceLocation blockTexture = new ResourceLocation(
+ Variables.MODID, texture);
+ Minecraft.getMinecraft().renderEngine
+ .bindTexture(blockTexture);
GL11.glPushMatrix();
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
try {
@@ -54,23 +55,32 @@ public class TileEntityShadowEyeRender extends TileEntitySpecialRenderer { } catch (Exception e) {
}
if (te != null && te.getWorldObj() != null) {
- EntityPlayer player = te.getWorldObj().getClosestPlayer(
- te.xCoord, te.yCoord, te.zCoord, 16D);
+ EntityPlayer player = te.getWorldObj()
+ .getClosestPlayer(te.xCoord,
+ te.yCoord,
+ te.zCoord, 16D);
if (player != null) {
- float x1 = (float) (te.xCoord - player.posX) + 0.5F;
- float y1 = (float) (te.yCoord - player.posY) + 0.5F;
- float z1 = (float) (te.zCoord - player.posZ) + 0.5F;
+ float x1 = (float) (te.xCoord
+ - player.posX) + 0.5F;
+ float y1 = (float) (te.yCoord
+ - player.posY) + 0.5F;
+ float z1 = (float) (te.zCoord
+ - player.posZ) + 0.5F;
eyeS.model.render(player, 0,
- (float) (x1 >= 0 ? Math.atan(z1 / x1)
- : Math.PI + Math.atan(z1 / x1)),
- (float) (y1 >= 0 ? Math.atan(y1 / x1)
+ (float) (x1 >= 0 ? Math
+ .atan(z1 / x1)
+ : Math.PI + Math.atan(
+ z1 / x1)),
+ (float) (y1 >= 0 ? Math
+ .atan(y1 / x1)
: Math.atan(y1 / x1)),
- te.blockMetadata, eyeS.opening, 0.0625F);
+ te.blockMetadata,
+ eyeS.opening, 0.0625F);
}
} else
- eyeS.model.render((Entity) null, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F,
- 0.0625F);
+ eyeS.model.render((Entity) null, 0.0F, 0.0F, 0.0F,
+ 0.0F, 0.0F, 0.0625F);
if (eyeS.opening == 4) {
GL11.glPushMatrix();
@@ -104,11 +114,13 @@ public class TileEntityShadowEyeRender extends TileEntitySpecialRenderer { Block block) {
Tessellator tess = Tessellator.instance;
float brightness = block.getLightOpacity(world, i, j, k);
- int skyLight = world.getLightBrightnessForSkyBlocks(i, j, k, 0);
+ int skyLight = world.getLightBrightnessForSkyBlocks(i, j,
+ k, 0);
int modulousModifier = skyLight % 65536;
int divModifier = skyLight / 65536;
tess.setColorOpaque_F(brightness, brightness, brightness);
- OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit,
+ OpenGlHelper.setLightmapTextureCoords(
+ OpenGlHelper.lightmapTexUnit,
modulousModifier, divModifier);
}
}
|
