Add templated method to easy get values from TagCompound