Mekanism-tilera-Edition/common/mekanism/client/render/entity/RenderRobit.java
Victor Robertson e5a6eadc45 Fix indentation and remove trailing whitespace
This patch provides common/mekanism/*.java with standardized
indentation (tabs) and also removes trailing whitespace.
2014-03-07 19:20:35 -06:00

36 lines
984 B
Java

package mekanism.client.render.entity;
import mekanism.client.model.ModelRobit;
import mekanism.common.entity.EntityRobit;
import mekanism.common.util.MekanismUtils;
import mekanism.common.util.MekanismUtils.ResourceType;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class RenderRobit extends RenderLiving
{
public RenderRobit()
{
super(new ModelRobit(), 0.5F);
}
@Override
protected ResourceLocation getEntityTexture(Entity entity)
{
EntityRobit robit = (EntityRobit)entity;
if((Math.abs(entity.posX-entity.prevPosX) + Math.abs(entity.posX-entity.prevPosX)) > 0.001)
{
if(robit.ticksExisted % 3 == 0)
{
robit.texTick = !robit.texTick;
}
}
return MekanismUtils.getResource(ResourceType.RENDER, "Robit" + (robit.texTick ? "2" : "") + ".png");
}
}