Don't spin Contractor if game is paused
This commit is contained in:
parent
5fa79a9807
commit
3539173e6b
3 changed files with 26 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
package resonantinduction;
|
||||
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
@ -50,6 +51,25 @@ public class ClientProxy extends CommonProxy
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isPaused()
|
||||
{
|
||||
if(FMLClientHandler.instance().getClient().isSingleplayer() && !FMLClientHandler.instance().getClient().getIntegratedServer().getPublic())
|
||||
{
|
||||
GuiScreen screen = FMLClientHandler.instance().getClient().currentScreen;
|
||||
|
||||
if(screen != null)
|
||||
{
|
||||
if(screen.doesGuiPauseGame())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderElectricShock(World world, Vector3 start, Vector3 target, float r, float g, float b)
|
||||
|
|
|
@ -39,6 +39,11 @@ public class CommonProxy implements IGuiHandler
|
|||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean isPaused()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public void renderElectricShock(World world, Vector3 start, Vector3 target, float r, float g, float b)
|
||||
{
|
||||
|
|
|
@ -59,7 +59,7 @@ public class RenderEMContractor extends TileEntitySpecialRenderer
|
|||
this.func_110628_a(TEXTURE_PUSH);
|
||||
}
|
||||
|
||||
MODEL.render(0.0625f, ((TileEntityEMContractor)t).canFunction());
|
||||
MODEL.render(0.0625f, ((TileEntityEMContractor)t).canFunction() && ResonantInduction.proxy.isPaused());
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue