Fix a few jetpack things

This commit is contained in:
Aidan Brady 2013-12-04 17:22:00 -05:00
parent bf9d48d86f
commit aca0692cec
3 changed files with 20 additions and 9 deletions

View file

@ -177,12 +177,14 @@ public class ModelJetpack extends ModelBase
GL11.glPushMatrix(); GL11.glPushMatrix();
MekanismRenderer.blendOn(); MekanismRenderer.blendOn();
MekanismRenderer.glowOn(); MekanismRenderer.glowOn();
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glColor4f(1, 1, 1, 0.2F); GL11.glColor4f(1, 1, 1, 0.2F);
WingbladeL.render(size); WingbladeL.render(size);
WingbladeR.render(size); WingbladeR.render(size);
GL11.glColor4f(1, 1, 1, 1); GL11.glColor4f(1, 1, 1, 1);
GL11.glDisable(GL11.GL_CULL_FACE);
MekanismRenderer.glowOff(); MekanismRenderer.glowOff();
MekanismRenderer.blendOff(); MekanismRenderer.blendOff();
GL11.glPopMatrix(); GL11.glPopMatrix();

View file

@ -12,6 +12,8 @@ public class JetpackSound extends Sound
/** The TileEntity this sound is associated with. */ /** The TileEntity this sound is associated with. */
public EntityPlayer player; public EntityPlayer player;
public int ticksSincePlay = 0;
public JetpackSound(String id, String sound, EntityPlayer entity) public JetpackSound(String id, String sound, EntityPlayer entity)
{ {
super(id, sound, entity, new Vector3(entity)); super(id, sound, entity, new Vector3(entity));
@ -22,7 +24,7 @@ public class JetpackSound extends Sound
@Override @Override
public float getMultiplier() public float getMultiplier()
{ {
return 1; return Math.min(1, ((float)ticksSincePlay/20F))*0.3F;
} }
@Override @Override
@ -31,6 +33,14 @@ public class JetpackSound extends Sound
return new Vector3(player); return new Vector3(player);
} }
@Override
public void play()
{
super.play();
ticksSincePlay = 0;
}
@Override @Override
public boolean update(World world) public boolean update(World world)
{ {
@ -59,6 +69,11 @@ public class JetpackSound extends Sound
} }
} }
if(isPlaying)
{
ticksSincePlay++;
}
return true; return true;
} }

View file

@ -5,10 +5,7 @@ import cpw.mods.fml.common.IPlayerTracker;
public class CommonPlayerTracker implements IPlayerTracker public class CommonPlayerTracker implements IPlayerTracker
{ {
@Override @Override
public void onPlayerLogin(EntityPlayer player) public void onPlayerLogin(EntityPlayer player) {}
{
}
@Override @Override
public void onPlayerLogout(EntityPlayer player) public void onPlayerLogout(EntityPlayer player)
@ -17,10 +14,7 @@ public class CommonPlayerTracker implements IPlayerTracker
} }
@Override @Override
public void onPlayerChangedDimension(EntityPlayer player) public void onPlayerChangedDimension(EntityPlayer player) {}
{
}
@Override @Override
public void onPlayerRespawn(EntityPlayer player) {} public void onPlayerRespawn(EntityPlayer player) {}