mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-28 15:46:01 +00:00
Fix indentation and remove trailing whitespace
This patch provides common/mekanism/*.java with standardized indentation (tabs) and also removes trailing whitespace.
This commit is contained in:
1 parent
9d8a6c9e4c
commit
e5a6eadc45
468 files changed
+25218
-25218
No files matched your search
@@ -23,14 +23,14 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
public class ModelCustomArmor extends ModelBiped
|
||||
{
|
||||
public static ModelCustomArmor INSTANCE = new ModelCustomArmor();
|
||||
|
||||
|
||||
public static GlowArmor GLOW_BIG = new GlowArmor(1.0F);
|
||||
public static GlowArmor GLOW_SMALL = new GlowArmor(0.5F);
|
||||
|
||||
|
||||
public static Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
public ArmorModel modelType;
|
||||
|
||||
|
||||
public ModelCustomArmor()
|
||||
{
|
||||
resetPart(bipedHead, 0, 0, 0);
|
||||
@@ -48,7 +48,7 @@ public class ModelCustomArmor extends ModelBiped
|
||||
public void init(Entity entity, float f, float f1, float f2, float f3, float f4, float size)
|
||||
{
|
||||
reset();
|
||||
|
||||
|
||||
if(entity instanceof EntityLivingBase)
|
||||
{
|
||||
isSneak = ((EntityLivingBase)entity).isSneaking();
|
||||
@@ -57,7 +57,7 @@ public class ModelCustomArmor extends ModelBiped
|
||||
}
|
||||
|
||||
if(modelType.armorSlot == 0)
|
||||
{
|
||||
{
|
||||
bipedHead.isHidden = false;
|
||||
bipedHead.showModel = true;
|
||||
}
|
||||
@@ -76,7 +76,7 @@ public class ModelCustomArmor extends ModelBiped
|
||||
|
||||
setRotationAngles(f, f1, f2, f3, f4, size, entity);
|
||||
}
|
||||
|
||||
|
||||
public void reset()
|
||||
{
|
||||
bipedHead.isHidden = true;
|
||||
@@ -85,7 +85,7 @@ public class ModelCustomArmor extends ModelBiped
|
||||
bipedLeftArm.isHidden = true;
|
||||
bipedRightLeg.isHidden = true;
|
||||
bipedLeftLeg.isHidden = true;
|
||||
|
||||
|
||||
bipedHead.showModel = false;
|
||||
bipedBody.showModel = false;
|
||||
bipedRightArm.showModel = false;
|
||||
@@ -113,7 +113,7 @@ public class ModelCustomArmor extends ModelBiped
|
||||
{
|
||||
public ModelCustomArmor biped;
|
||||
public ModelRenderer partRender;
|
||||
|
||||
|
||||
public ModelCustom(ModelCustomArmor base, ModelRenderer renderer)
|
||||
{
|
||||
super(base);
|
||||
@@ -123,14 +123,14 @@ public class ModelCustomArmor extends ModelBiped
|
||||
|
||||
@Override
|
||||
public void render(float size)
|
||||
{
|
||||
{
|
||||
if(ModelCustomArmor.this.modelType != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0, 0, 0.06F);
|
||||
|
||||
|
||||
mc.renderEngine.bindTexture(modelType.resource);
|
||||
|
||||
|
||||
if(useModel(biped.modelType, partRender, biped))
|
||||
{
|
||||
if(biped.modelType == ArmorModel.JETPACK)
|
||||
@@ -153,7 +153,7 @@ public class ModelCustomArmor extends ModelBiped
|
||||
else if(biped.modelType == ArmorModel.FREERUNNERS)
|
||||
{
|
||||
GL11.glScalef(1.02F, 1.02F, 1.02F);
|
||||
|
||||
|
||||
if(partRender == biped.bipedLeftLeg)
|
||||
{
|
||||
GL11.glTranslatef(-0.1375F, -0.75F, -0.0625F);
|
||||
@@ -166,19 +166,19 @@ public class ModelCustomArmor extends ModelBiped
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float par2, float par3, float par4, float par5, float par6, float par7)
|
||||
{
|
||||
init(entity, par2, par3, par4, par5, par6, par7);
|
||||
super.render(entity, par2, par3, par4, par5, par6, par7);
|
||||
}
|
||||
|
||||
|
||||
public static boolean useModel(ArmorModel type, ModelRenderer partRender, ModelCustomArmor biped)
|
||||
{
|
||||
if(type.armorSlot == 0)
|
||||
@@ -193,11 +193,11 @@ public class ModelCustomArmor extends ModelBiped
|
||||
{
|
||||
return partRender == biped.bipedLeftLeg || partRender == biped.bipedRightLeg;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static enum ArmorModel
|
||||
public static enum ArmorModel
|
||||
{
|
||||
JETPACK(1, MekanismUtils.getResource(ResourceType.RENDER, "Jetpack.png")),
|
||||
ARMOREDJETPACK(1, MekanismUtils.getResource(ResourceType.RENDER, "Jetpack.png")),
|
||||
@@ -207,7 +207,7 @@ public class ModelCustomArmor extends ModelBiped
|
||||
|
||||
public int armorSlot;
|
||||
public ResourceLocation resource;
|
||||
|
||||
|
||||
public static ModelJetpack jetpackModel = new ModelJetpack();
|
||||
public static ModelArmoredJetpack armoredJetpackModel = new ModelArmoredJetpack();
|
||||
public static ModelGasMask gasMaskModel = new ModelGasMask();
|
||||
@@ -220,29 +220,29 @@ public class ModelCustomArmor extends ModelBiped
|
||||
resource = r;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static ModelBiped getGlow(int index)
|
||||
{
|
||||
ModelBiped biped = index != 2 ? GLOW_BIG : GLOW_SMALL;
|
||||
|
||||
biped.bipedHead.showModel = index == 0;
|
||||
biped.bipedHeadwear.showModel = index == 0;
|
||||
biped.bipedBody.showModel = index == 1 || index == 2;
|
||||
biped.bipedRightArm.showModel = index == 1;
|
||||
biped.bipedLeftArm.showModel = index == 1;
|
||||
biped.bipedRightLeg.showModel = index == 2 || index == 3;
|
||||
biped.bipedLeftLeg.showModel = index == 2 || index == 3;
|
||||
|
||||
|
||||
biped.bipedHead.showModel = index == 0;
|
||||
biped.bipedHeadwear.showModel = index == 0;
|
||||
biped.bipedBody.showModel = index == 1 || index == 2;
|
||||
biped.bipedRightArm.showModel = index == 1;
|
||||
biped.bipedLeftArm.showModel = index == 1;
|
||||
biped.bipedRightLeg.showModel = index == 2 || index == 3;
|
||||
biped.bipedLeftLeg.showModel = index == 2 || index == 3;
|
||||
|
||||
return biped;
|
||||
}
|
||||
|
||||
|
||||
public static class GlowArmor extends ModelBiped
|
||||
{
|
||||
public GlowArmor(float size)
|
||||
{
|
||||
super(size);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float par2, float par3, float par4, float par5, float par6, float par7)
|
||||
{
|
||||
@@ -252,9 +252,9 @@ public class ModelCustomArmor extends ModelBiped
|
||||
isRiding = ((EntityLivingBase)entity).isRiding();
|
||||
isChild = ((EntityLivingBase)entity).isChild();
|
||||
}
|
||||
|
||||
|
||||
setRotationAngles(par2, par3, par4, par5, par6, par7, entity);
|
||||
|
||||
|
||||
MekanismRenderer.glowOn();
|
||||
super.render(entity, par2, par3, par4, par5, par6, par7);
|
||||
MekanismRenderer.glowOff();
|
||||
|
||||
Reference in new issue
Block a user