if(mc.thePlayer != null && mc.theWorld != null && !mc.isGamePaused())
{
EntityPlayer player = mc.thePlayer;
World world = mc.thePlayer.worldObj;
FontRenderer font = mc.fontRenderer;
MovingObjectPosition pos = player.rayTrace(40.0D, 1.0F);
if(pos != null)
{
int x = MathHelper.floor_double(pos.blockX);
int y = MathHelper.floor_double(pos.blockY);
int z = MathHelper.floor_double(pos.blockZ);
Coord4D obj = new Coord4D(x, y, z, world.provider.dimensionId);
if(Mekanism.debug && mc.currentScreen == null && !mc.gameSettings.showDebugInfo)
{
String tileDisplay = "";
if(obj.getTileEntity(world) != null)
{
if(obj.getTileEntity(world).getClass() != null)
{
tileDisplay = obj.getTileEntity(world).getClass().getSimpleName();
}
}
font.drawStringWithShadow("Block: " + obj.getBlock(world).getUnlocalizedName(), 1, 1, 0x404040);
font.drawStringWithShadow("Metadata: " + obj.getMetadata(world), 1, 10, 0x404040);
font.drawStringWithShadow("Location: " + MekanismUtils.getCoordDisplay(obj), 1, 19, 0x404040);
font.drawStringWithShadow("TileEntity: " + tileDisplay, 1, 28, 0x404040);
font.drawStringWithShadow("Side: " + pos.sideHit, 1, 37, 0x404040);
}
}
if(player != null && mc.currentScreen == null && player.getEquipmentInSlot(3) != null)
{
ItemStack stack = player.getEquipmentInSlot(3);
ScaledResolution scaledresolution = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
int x = scaledresolution.getScaledWidth();
int y = scaledresolution.getScaledHeight();
if(stack.getItem() instanceof ItemJetpack)
{
ItemJetpack jetpack = (ItemJetpack)stack.getItem();
font.drawStringWithShadow("Mode: " + jetpack.getMode(stack).getName(), 1, y - 20, 0x404040);
font.drawStringWithShadow("Hydrogen: " + jetpack.getStored(stack), 1, y - 11, 0x404040);
}
else if(stack.getItem() instanceof ItemScubaTank)
{
ItemScubaTank scubaTank = (ItemScubaTank)stack.getItem();
String state = (scubaTank.getFlowing(stack) ? EnumColor.DARK_GREEN + "On" : EnumColor.DARK_RED + "Off");
font.drawStringWithShadow("Mode: " + state, 1, y - 20, 0x404040);
font.drawStringWithShadow("Oxygen: " + scubaTank.getStored(stack), 1, y - 11, 0x404040);
}
}
Set<String> copy = (Set)((HashSet)Mekanism.jetpackOn).clone();