/**
 * Aeronica's mxTune MOD
 * Copyright {2016} Paul Boese a.k.a. Aeronica
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package net.aeronica.mods.mxtune.util;

import net.aeronica.mods.mxtune.blocks.IPlacedInstrument;
import net.aeronica.mods.mxtune.blocks.TileInstrument;
import net.aeronica.mods.mxtune.inventory.IInstrument;
import net.aeronica.mods.mxtune.inventory.IMusic;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.util.math.BlockPos;
import net.minecraftforge.common.util.Constants;

public class SheetMusicUtil
{
    private static SheetMusicUtil INSTANCE = new SheetMusicUtil();
    
    public static SheetMusicUtil getInstance()
    {
       return INSTANCE; 
    }
    
    public static String getMusicTitle(ItemStack stackIn)
    {
        ItemStack sheetMusic = SheetMusicUtil.getSheetMusic(stackIn);
        if (sheetMusic != null)
        {
            NBTTagCompound contents = (NBTTagCompound) sheetMusic.getTagCompound().getTag("MusicBook");
            if (contents != null)
            {
                return sheetMusic.getDisplayName();
            }
        }
        return new String();
    }

    public static ItemStack getSheetMusic(BlockPos pos, EntityPlayer playerIn, boolean isPlaced)
    {
        if (isPlaced)
        {
            if (playerIn.getEntityWorld().getBlockState(pos).getBlock() instanceof IPlacedInstrument)
            {
                Block placedInst = (Block) playerIn.getEntityWorld().getBlockState(pos).getBlock();
                TileInstrument te = ((IPlacedInstrument) placedInst).getTE(playerIn.getEntityWorld(), pos);
                if(te.getInventory().getStackInSlot(0) != null)
                    return te.getInventory().getStackInSlot(0).copy();
            }
        } else
        {
            return SheetMusicUtil.getSheetMusic(playerIn.getHeldItemMainhand());
        }
        return null;
    }
    
    public static ItemStack getSheetMusic(ItemStack stackIn)
    {
        if (stackIn == null) return null;

        if (stackIn.hasTagCompound() && stackIn.getItem() instanceof IInstrument)
        {
            NBTTagList items = stackIn.getTagCompound().getTagList("ItemInventory", Constants.NBT.TAG_COMPOUND);
            if (items.tagCount() == 1)
            {
                NBTTagCompound item = (NBTTagCompound) items.getCompoundTagAt(0);
                ItemStack sheetMusicOld = ItemStack.loadItemStackFromNBT(item);
                if (sheetMusicOld != null && sheetMusicOld.getItem() instanceof IMusic)
                {
                    NBTTagCompound contents = (NBTTagCompound) sheetMusicOld.getTagCompound().getTag("MusicBook");
                    if (contents != null)
                    {
                        return sheetMusicOld;
                    }
                }
            }
        }
        return null;
    }
}

@@ -1189,191 +1189,35 @@
 lic 
-class SheetMusicUtil%0A%7B%0A    private static SheetMusicUtil INSTANCE = new SheetMusicUtil();%0A    %0A    public static SheetMusicUtil getInstance()%0A    
+enum SheetMusicUtil%0A
 %7B%0A    
- 
-  return INSTANCE; %0A    %7D%0A    
+;
 %0A   
@@ -2500,39 +2500,38 @@
 kIn 
-=
+!
 = null)
- return null;%0A%0A
+%0A        %7B%0A   
         
 if (
@@ -2518,32 +2518,33 @@
    %7B%0A           
+ 
 if (stackIn.hasT
@@ -2601,34 +2601,42 @@
 rument)%0A        
-%7B%0A
+    %7B%0A    
             NBTT
@@ -2732,16 +2732,20 @@
 POUND);%0A
+    
         
@@ -2779,34 +2779,42 @@
  1)%0A            
-%7B%0A
+    %7B%0A    
                 
@@ -2879,16 +2879,20 @@
 gAt(0);%0A
+    
         
@@ -2971,32 +2971,36 @@
                 
+    
 if (sheetMusicOl
@@ -3063,34 +3063,42 @@
                 
-%7B%0A
+    %7B%0A    
                 
@@ -3208,32 +3208,36 @@
                 
+ 
+   
 if (contents != 
@@ -3254,34 +3254,42 @@
                 
+   
+ 
 %7B%0A
+    
                 
@@ -3318,16 +3318,42 @@
 sicOld;%0A
+                        %7D%0A
         

Make SheetMusicUtil class and enum. Remove shortcircuit logic in favor of clearer brace indentation. 1.10.2 version only.