src/main/java/codes/biscuit/skyblockaddons/listeners/RenderListener.java
/**
     * This renders a bar for the skeleton hat bones bar.
     */
This renders a bar for the skeleton hat bones bar.
This renders a bar for the skeleton hat bones bar .
public void drawSkeletonBar(Minecraft mc, float scale, ButtonLocation buttonLocation) {
        float x = main.getConfigValues().getActualX(Feature.SKELETON_BAR);
        float y = main.getConfigValues().getActualY(Feature.SKELETON_BAR);
        int bones = 0;
        if (!(mc.currentScreen instanceof LocationEditGui)) {
            for (Entity listEntity : mc.theWorld.loadedEntityList) {
                if (listEntity instanceof EntityItem &&
                        listEntity.ridingEntity instanceof EntityArmorStand && listEntity.ridingEntity.isInvisible() && listEntity.getDistanceToEntity(mc.thePlayer) <= 8) {
                    bones++;
                }
            }
        } else {
            bones = 3;
        }
        if (bones > 3) bones = 3;
        float height = 16;
        float width = 3 * 15;
        x -= Math.round(width * scale / 2);
        y -= Math.round(height * scale / 2);
        x /= scale;
        y /= scale;
        if (buttonLocation != null) {
            int boxXOne = Math.round(x - 4);
            int boxXTwo = Math.round(x + width + 4);
            int boxYOne = Math.round(y - 4);
            int boxYTwo = Math.round(y + height + 4);
            buttonLocation.checkHoveredAndDrawBox(boxXOne, boxXTwo, boxYOne, boxYTwo, scale);
            GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
        }
        for (int boneCounter = 0; boneCounter < bones; boneCounter++) {
            mc.getRenderItem().renderItemIntoGUI(BONE_ITEM, Math.round((x + boneCounter * 15)), Math.round(y));
        }
    }
public void drawSkeletonBar ( Minecraft mc , float scale , ButtonLocation buttonLocation ) { float x = main . getConfigValues ( ) . getActualX ( Feature . SKELETON_BAR ) ; float y = main . getConfigValues ( ) . getActualY ( Feature . SKELETON_BAR ) ; int bones = 0 ; if ( ! ( mc . currentScreen instanceof LocationEditGui ) ) { for ( Entity listEntity : mc . theWorld . loadedEntityList ) { if ( listEntity instanceof EntityItem && listEntity . ridingEntity instanceof EntityArmorStand && listEntity . ridingEntity . isInvisible ( ) && listEntity . getDistanceToEntity ( mc . thePlayer ) <= 8 ) { bones ++ ; } } } else { bones = 3 ; } if ( bones > 3 ) bones = 3 ; float height = 16 ; float width = 3 * 15 ; x -= Math . round ( width * scale / 2 ) ; y -= Math . round ( height * scale / 2 ) ; x /= scale ; y /= scale ; if ( buttonLocation != null ) { int boxXOne = Math . round ( x - 4 ) ; int boxXTwo = Math . round ( x + width + 4 ) ; int boxYOne = Math . round ( y - 4 ) ; int boxYTwo = Math . round ( y + height + 4 ) ; buttonLocation . checkHoveredAndDrawBox ( boxXOne , boxXTwo , boxYOne , boxYTwo , scale ) ; GlStateManager . color ( 1.0F , 1.0F , 1.0F , 1.0F ) ; } for ( int boneCounter = 0 ; boneCounter < bones ; boneCounter ++ ) { mc . getRenderItem ( ) . renderItemIntoGUI ( BONE_ITEM , Math . round ( ( x + boneCounter * 15 ) ) , Math . round ( y ) ) ; } }
This renders a bar for the skeleton hat bones bar.
This renders a bar for the skeleton hat bones bar .