Run formatter

This commit is contained in:
Nicholas Ignoffo 2017-08-15 21:30:48 -07:00
parent 61c44a831b
commit 08258fd6ef
606 changed files with 13464 additions and 22975 deletions

View file

@ -1,5 +1,6 @@
package WayofTime.bloodmagic.client.render.entity;
import WayofTime.bloodmagic.entity.projectile.EntitySentientArrow;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.Tessellator;
@ -10,27 +11,21 @@ import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import org.lwjgl.opengl.GL11;
import WayofTime.bloodmagic.entity.projectile.EntitySentientArrow;
@SideOnly(Side.CLIENT)
public class RenderEntitySentientArrow extends Render<EntitySentientArrow>
{
public class RenderEntitySentientArrow extends Render<EntitySentientArrow> {
private static final ResourceLocation defaultTexture = new ResourceLocation("bloodmagic:textures/entities/soulArrow.png");
private static final ResourceLocation corrosiveTexture = new ResourceLocation("bloodmagic:textures/entities/soulArrow_corrosive.png");
private static final ResourceLocation vengefulTexture = new ResourceLocation("bloodmagic:textures/entities/soulArrow_vengeful.png");
private static final ResourceLocation destructiveTexture = new ResourceLocation("bloodmagic:textures/entities/soulArrow_destructive.png");
private static final ResourceLocation steadfastTexture = new ResourceLocation("bloodmagic:textures/entities/soulArrow_steadfast.png");
public RenderEntitySentientArrow(RenderManager renderManagerIn)
{
public RenderEntitySentientArrow(RenderManager renderManagerIn) {
super(renderManagerIn);
}
public void doRender(EntitySentientArrow entity, double x, double y, double z, float entityYaw, float partialTicks)
{
public void doRender(EntitySentientArrow entity, double x, double y, double z, float entityYaw, float partialTicks) {
this.bindEntityTexture(entity);
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
GlStateManager.pushMatrix();
@ -52,8 +47,7 @@ public class RenderEntitySentientArrow extends Render<EntitySentientArrow>
GlStateManager.enableRescaleNormal();
float f9 = (float) entity.arrowShake - partialTicks;
if (f9 > 0.0F)
{
if (f9 > 0.0F) {
float f10 = -MathHelper.sin(f9 * 3.0F) * f9;
GlStateManager.rotate(f10, 0.0F, 0.0F, 1.0F);
}
@ -76,8 +70,7 @@ public class RenderEntitySentientArrow extends Render<EntitySentientArrow>
worldrenderer.pos(-7.0D, -2.0D, -2.0D).tex((double) f4, (double) f7).endVertex();
tessellator.draw();
for (int j = 0; j < 4; ++j)
{
for (int j = 0; j < 4; ++j) {
GlStateManager.rotate(90.0F, 1.0F, 0.0F, 0.0F);
GL11.glNormal3f(0.0F, 0.0F, f8);
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX);
@ -97,21 +90,19 @@ public class RenderEntitySentientArrow extends Render<EntitySentientArrow>
* Returns the location of an entity's texture. Doesn't seem to be called
* unless you call Render.bindEntityTexture.
*/
protected ResourceLocation getEntityTexture(EntitySentientArrow entity)
{
switch (entity.type)
{
case CORROSIVE:
return corrosiveTexture;
case DESTRUCTIVE:
return destructiveTexture;
case STEADFAST:
return steadfastTexture;
case VENGEFUL:
return vengefulTexture;
case DEFAULT:
default:
return defaultTexture;
protected ResourceLocation getEntityTexture(EntitySentientArrow entity) {
switch (entity.type) {
case CORROSIVE:
return corrosiveTexture;
case DESTRUCTIVE:
return destructiveTexture;
case STEADFAST:
return steadfastTexture;
case VENGEFUL:
return vengefulTexture;
case DEFAULT:
default:
return defaultTexture;
}
}
}