Advertisement
Guest User

Untitled

a guest
Nov 13th, 2016
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. //If the player is looking at the Power Generator block, print this on screen
  2. if (block == DecimationBlocks.blockPowergenerator) {
  3.  
  4. ScaledResolution res = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
  5.  
  6. FontRenderer fr = mc.fontRendererObj;
  7. String text = "Right-click to charge battery";
  8.  
  9. int width = fr.getStringWidth(text);
  10. int x = (res.getScaledWidth() - width) / 2;
  11. int y = res.getScaledHeight() / 2 - 7 - fr.FONT_HEIGHT + 30;
  12.  
  13. //The string I want to rescale up by 2
  14. fr.drawString(text, x, y, 0xFFFFFF);
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement