public void render(Graphics2D g) {
        if (!alive) {
            return;
        }
        Image sprite = ResourceResolver.getResourceResolver().resolveResource("/player.png");
        AffineTransform  af = new AffineTransform();
        af.rotate(getDirection(), getWidth() / 2, getHeight() / 2);
        af.translate(getWidth() / 2 - sprite.getWidth(null) / 2, getHeight()/ 2 - sprite.getHeight(null)/ 2);
        g.drawImage(sprite, af, null);
        if (!self) {
            Font f = Fonts.FONT_PRIMARY.deriveFont(8f);
            FontMetrics metrics = g.getFontMetrics(f);
            Rectangle2D bounds = metrics.getStringBounds(name, g);
            
            g.setColor(new Color(0x88000000, true));
            g.fillRect((int) (-bounds.getWidth()/2 - 5 + getWidth()/2), (int) (-bounds.getHeight() - 13), (int) bounds.getWidth() + 10, (int) bounds.getHeight() + 8);
            
            g.setColor(Color.WHITE);
            g.setFont(f);
            g.drawString(name, (int) (-bounds.getWidth()/2 + getWidth()/2), -9);
        }
    }