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

@ -6,11 +6,9 @@ import WayofTime.bloodmagic.tile.TileAlchemyArray;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.ItemStack;
public class RenderAlchemyArray extends TileEntitySpecialRenderer<TileAlchemyArray>
{
public class RenderAlchemyArray extends TileEntitySpecialRenderer<TileAlchemyArray> {
@Override
public void render(TileAlchemyArray alchemyArray, double x, double y, double z, float partialTicks, int destroyStage, float alpha)
{
public void render(TileAlchemyArray alchemyArray, double x, double y, double z, float partialTicks, int destroyStage, float alpha) {
ItemStack inputStack = alchemyArray.getStackInSlot(0);
ItemStack catalystStack = alchemyArray.getStackInSlot(1);
int craftTime = alchemyArray.activeCounter;

View file

@ -22,16 +22,14 @@ import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
import org.lwjgl.opengl.GL11;
public class RenderAltar extends TileEntitySpecialRenderer<TileAltar>
{
public class RenderAltar extends TileEntitySpecialRenderer<TileAltar> {
public static Minecraft mc = Minecraft.getMinecraft();
public static ResourceLocation resource = new ResourceLocation("bloodmagic", "textures/blocks/lifeEssenceStill.png");
public static float minHeight = 0.499f;
public static float maxHeight = 0.745f;
@Override
public void render(TileAltar tileAltar, double x, double y, double z, float partialTicks, int destroyStage, float alpha)
{
public void render(TileAltar tileAltar, double x, double y, double z, float partialTicks, int destroyStage, float alpha) {
ItemStack inputStack = tileAltar.getStackInSlot(0);
float level = ((float) tileAltar.getCurrentBlood()) / (float) tileAltar.getCapacity();
@ -43,14 +41,12 @@ public class RenderAltar extends TileEntitySpecialRenderer<TileAltar>
this.renderItem(tileAltar.getWorld(), inputStack);
GlStateManager.popMatrix();
if (tileAltar.getCurrentTierDisplayed() != EnumAltarTier.ONE)
{
if (tileAltar.getCurrentTierDisplayed() != EnumAltarTier.ONE) {
renderHologram(tileAltar, tileAltar.getCurrentTierDisplayed(), partialTicks);
}
}
private void renderFluid(World world, float fluidLevel)
{
private void renderFluid(World world, float fluidLevel) {
GlStateManager.pushMatrix();
Fluid fluid = BlockLifeEssence.getLifeEssence();
@ -86,20 +82,9 @@ public class RenderAltar extends TileEntitySpecialRenderer<TileAltar>
GlStateManager.popMatrix();
}
private static void setGLColorFromInt(int color)
{
float red = (color >> 16 & 0xFF) / 255.0F;
float green = (color >> 8 & 0xFF) / 255.0F;
float blue = (color & 0xFF) / 255.0F;
GlStateManager.color(red, green, blue, 1.0F);
}
private void renderItem(World world, ItemStack stack)
{
private void renderItem(World world, ItemStack stack) {
RenderItem itemRenderer = mc.getRenderItem();
if (!stack.isEmpty())
{
if (!stack.isEmpty()) {
GlStateManager.translate(0.5, 1, 0.5);
EntityItem entityitem = new EntityItem(world, 0.0D, 0.0D, 0.0D, stack);
entityitem.getItem().setCount(1);
@ -122,8 +107,7 @@ public class RenderAltar extends TileEntitySpecialRenderer<TileAltar>
}
}
private void renderHologram(TileAltar altar, EnumAltarTier tier, float partialTicks)
{
private void renderHologram(TileAltar altar, EnumAltarTier tier, float partialTicks) {
EntityPlayerSP player = mc.player;
World world = player.world;
@ -141,37 +125,34 @@ public class RenderAltar extends TileEntitySpecialRenderer<TileAltar>
double posY = player.lastTickPosY + (player.posY - player.lastTickPosY) * partialTicks;
double posZ = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * partialTicks;
for (AltarComponent altarComponent : tier.getAltarComponents())
{
for (AltarComponent altarComponent : tier.getAltarComponents()) {
vX = vec3.add(altarComponent.getOffset());
double minX = vX.getX() - posX;
double minY = vX.getY() - posY;
double minZ = vX.getZ() - posZ;
if (!world.getBlockState(vX).isOpaqueCube())
{
if (!world.getBlockState(vX).isOpaqueCube()) {
TextureAtlasSprite texture = null;
switch (altarComponent.getComponent())
{
case BLOODRUNE:
texture = ClientHandler.blankBloodRune;
break;
case NOTAIR:
texture = ClientHandler.stoneBrick;
break;
case GLOWSTONE:
texture = ClientHandler.glowstone;
break;
case BLOODSTONE:
texture = ClientHandler.bloodStoneBrick;
break;
case BEACON:
texture = ClientHandler.beacon;
break;
case CRYSTAL:
texture = ClientHandler.crystalCluster;
break;
switch (altarComponent.getComponent()) {
case BLOODRUNE:
texture = ClientHandler.blankBloodRune;
break;
case NOTAIR:
texture = ClientHandler.stoneBrick;
break;
case GLOWSTONE:
texture = ClientHandler.glowstone;
break;
case BLOODSTONE:
texture = ClientHandler.bloodStoneBrick;
break;
case BEACON:
texture = ClientHandler.beacon;
break;
case CRYSTAL:
texture = ClientHandler.crystalCluster;
break;
}
RenderFakeBlocks.drawFakeBlock(texture, minX, minY, minZ);
@ -180,4 +161,12 @@ public class RenderAltar extends TileEntitySpecialRenderer<TileAltar>
GlStateManager.popMatrix();
}
private static void setGLColorFromInt(int color) {
float red = (color >> 16 & 0xFF) / 255.0F;
float green = (color >> 8 & 0xFF) / 255.0F;
float blue = (color & 0xFF) / 255.0F;
GlStateManager.color(red, green, blue, 1.0F);
}
}

View file

@ -16,13 +16,11 @@ import net.minecraftforge.fml.relauncher.SideOnly;
import org.lwjgl.opengl.GL11;
@SideOnly(Side.CLIENT)
public class RenderBloodTank extends TileEntitySpecialRenderer<TileBloodTank>
{
public class RenderBloodTank extends TileEntitySpecialRenderer<TileBloodTank> {
private static final Minecraft mc = Minecraft.getMinecraft();
@Override
public void render(TileBloodTank bloodTank, double x, double y, double z, float partialTicks, int destroyStage, float alpha)
{
public void render(TileBloodTank bloodTank, double x, double y, double z, float partialTicks, int destroyStage, float alpha) {
if (bloodTank == null)
return;
@ -39,8 +37,7 @@ public class RenderBloodTank extends TileEntitySpecialRenderer<TileBloodTank>
GlStateManager.popMatrix();
}
public void renderFluid(float maxHeight, Fluid renderFluid, double x, double y, double z)
{
public void renderFluid(float maxHeight, Fluid renderFluid, double x, double y, double z) {
maxHeight = maxHeight * 0.575F;
GlStateManager.translate(x, y, z);

View file

@ -12,16 +12,14 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
public class RenderDemonCrucible extends TileEntitySpecialRenderer<TileDemonCrucible>
{
public class RenderDemonCrucible extends TileEntitySpecialRenderer<TileDemonCrucible> {
public static Minecraft mc = Minecraft.getMinecraft();
public static ResourceLocation resource = new ResourceLocation("bloodmagic", "textures/blocks/lifeEssenceStill.png");
public static float minHeight = 0.6497f;
public static float maxHeight = 0.79f;
@Override
public void render(TileDemonCrucible tile, double x, double y, double z, float partialTicks, int destroyStage, float alpha)
{
public void render(TileDemonCrucible tile, double x, double y, double z, float partialTicks, int destroyStage, float alpha) {
ItemStack inputStack = tile.getStackInSlot(0);
GlStateManager.pushMatrix();
@ -30,11 +28,9 @@ public class RenderDemonCrucible extends TileEntitySpecialRenderer<TileDemonCruc
GlStateManager.popMatrix();
}
private void renderItem(World world, ItemStack stack, float partialTicks)
{
private void renderItem(World world, ItemStack stack, float partialTicks) {
RenderItem itemRenderer = mc.getRenderItem();
if (!stack.isEmpty())
{
if (!stack.isEmpty()) {
GlStateManager.translate(0.5, 1.5, 0.5);
EntityItem entityitem = new EntityItem(world, 0.0D, 0.0D, 0.0D, stack);
entityitem.getItem().setCount(1);

View file

@ -8,10 +8,8 @@ import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import org.lwjgl.opengl.GL11;
public class RenderFakeBlocks
{
public static void drawFakeBlock(TextureAtlasSprite texture, double minX, double minY, double minZ)
{
public class RenderFakeBlocks {
public static void drawFakeBlock(TextureAtlasSprite texture, double minX, double minY, double minZ) {
if (texture == null)
return;

View file

@ -18,19 +18,15 @@ import org.lwjgl.opengl.GL11;
import java.util.List;
public class RenderItemRoutingNode extends TileEntitySpecialRenderer<TileRoutingNode>
{
public class RenderItemRoutingNode extends TileEntitySpecialRenderer<TileRoutingNode> {
private static final ResourceLocation beamTexture = new ResourceLocation(BloodMagic.MODID, "textures/entities/nodeBeam.png");
private static final Minecraft mc = Minecraft.getMinecraft();
@Override
public void render(TileRoutingNode tileNode, double x, double y, double z, float partialTicks, int destroyStage, float alpha)
{
if (mc.player.getHeldItemMainhand().getItem() instanceof INodeRenderer || ConfigHandler.alwaysRenderRoutingLines)
{
public void render(TileRoutingNode tileNode, double x, double y, double z, float partialTicks, int destroyStage, float alpha) {
if (mc.player.getHeldItemMainhand().getItem() instanceof INodeRenderer || ConfigHandler.alwaysRenderRoutingLines) {
List<BlockPos> connectionList = tileNode.getConnected();
for (BlockPos wantedPos : connectionList)
{
for (BlockPos wantedPos : connectionList) {
BlockPos offsetPos = wantedPos.subtract(tileNode.getPos());
//The beam renders towards the east by default.

View file

@ -1,22 +1,18 @@
package WayofTime.bloodmagic.client.render.block;
import WayofTime.bloodmagic.tile.TileMimic;
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import WayofTime.bloodmagic.tile.TileMimic;
@SideOnly(Side.CLIENT)
public class RenderMimic extends TileEntitySpecialRenderer<TileMimic>
{
public void render(TileMimic mimic, double x, double y, double z, float partialTicks, int destroyStage, float alpha)
{
if (mimic.getStackInSlot(0) != null)
{
public class RenderMimic extends TileEntitySpecialRenderer<TileMimic> {
public void render(TileMimic mimic, double x, double y, double z, float partialTicks, int destroyStage, float alpha) {
if (mimic.getStackInSlot(0) != null) {
TileEntity testTile = mimic.mimicedTile;
if (mimic != null)
{
if (mimic != null) {
TileEntityRendererDispatcher.instance.render(testTile, x, y, z, partialTicks, destroyStage);
}
}