mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-25 14:24:35 +00:00
Move the directory structure around to a more conventional one and start out on the 1.7 update.
3797 errors. We have a long way to go.
This commit is contained in:
1 parent
3a0de87a09
commit
ab47724473
1245 files changed
+1764
-5953
No files matched your search
@@ -0,0 +1,36 @@
|
||||
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");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user